|
1 | 1 | /** This file, 'meter.c', is a GUI program that serves as a simple |
2 | 2 | meter to look at HAL signals. It is a user space component and |
3 | | - uses GTK 3 for the GUI code. It allows you to view one pin, |
4 | | - signal, or parameter, and updates its display about 10 times |
| 3 | + uses GTK 3 for the GUI code. It allows you to view one pin or |
| 4 | + signal, and updates its display about 10 times |
5 | 5 | per second. (It is not a realtime program, and heavy loading |
6 | 6 | can temporarily slow or stop the update.) Clicking on the 'Select' |
7 | | - button pops up a dialog that allows you to select what pin/signal/ |
8 | | - parameter you want to monitor. Multiple instances of the program |
| 7 | + button pops up a dialog that allows you to select what pin/signal |
| 8 | + you want to monitor. Multiple instances of the program |
9 | 9 | can be started if you want to monitor more than one item. If you |
10 | 10 | add "pin|sig|par[am] <name>" to the command line, the meter will |
11 | | - initially display the pin/signal/parameter <name>, otherwise it |
| 11 | + initially display the pin/signal <name>, otherwise it |
12 | 12 | will initially display nothing. |
13 | 13 | */ |
14 | 14 | /* Added ability to specify initial window position on command line |
|
70 | 70 | * TYPEDEFS * |
71 | 71 | ************************************************************************/ |
72 | 72 |
|
73 | | -/** a 'probe' is an object that references a HAL pin, signal, or |
74 | | - parameter. The user may select the item that is to be probed. |
| 73 | +/** a 'probe' is an object that references a HAL pin or signal. |
| 74 | + * The user may select the item that is to be probed. |
75 | 75 | */ |
76 | 76 |
|
77 | 77 | #define PROBE_NAME_LEN 63 |
78 | 78 |
|
79 | 79 | typedef struct { |
80 | | - int listnum; /* 0 = pin, 1 = signal, 2 = parameter */ |
| 80 | + int listnum; /* 0 = pin, 1 = signal */ |
81 | 81 | char *pickname; /* name from list, not validated */ |
82 | 82 | hal_pin_t *pin; /* metadata (if it's a pin) */ |
83 | 83 | hal_sig_t *sig; /* metadata (if it's a signal) */ |
84 | 84 | GtkWidget *window; /* selection dialog window */ |
85 | 85 | GtkWidget *notebook; /* pointer to the notebook */ |
86 | | - GtkWidget *lists[2]; /* lists for pins, sigs, and params */ |
| 86 | + GtkWidget *lists[2]; /* lists for pins and sigs */ |
87 | 87 | char probe_name[PROBE_NAME_LEN + 1]; /* name of this probe */ |
88 | 88 | } probe_t; |
89 | 89 |
|
@@ -117,7 +117,7 @@ static meter_t *meter_new(void); |
117 | 117 |
|
118 | 118 | /** 'probe_new()' creates a new probe structure. It also creates |
119 | 119 | a dialog window for the probe that allows the user to pick the |
120 | | - pin, signal, or parameter that the probe will attach to. It |
| 120 | + pin or signal that the probe will attach to. It |
121 | 121 | should be called during the init phase of the program, before |
122 | 122 | the main event loop is started. |
123 | 123 | */ |
@@ -206,13 +206,13 @@ int main(int argc, gchar * argv[]) |
206 | 206 | initial_name = argv[n]; |
207 | 207 | n++; |
208 | 208 | } else { |
209 | | - printf(_("ERROR: no pin/signal/parameter name\n")); |
| 209 | + printf(_("ERROR: no pin/signal name\n")); |
210 | 210 | return -1; |
211 | 211 | } |
212 | 212 | } |
213 | 213 | } |
214 | 214 | if ((initial_name == NULL) && (small == 1)) { |
215 | | - printf(_("ERROR: -s option requires a probe type and a pin/signal/parameter name\n")); |
| 215 | + printf(_("ERROR: -s option requires a probe type and a pin/signal name\n")); |
216 | 216 | return -1; |
217 | 217 | } |
218 | 218 |
|
@@ -250,7 +250,7 @@ int main(int argc, gchar * argv[]) |
250 | 250 | g_signal_connect(main_window, "destroy", |
251 | 251 | G_CALLBACK(gtk_main_quit), NULL); |
252 | 252 |
|
253 | | - /* a vbox to hold the displayed value and the pin/sig/param name */ |
| 253 | + /* a vbox to hold the displayed value and the pin/sig name */ |
254 | 254 | vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 3); |
255 | 255 | gtk_container_set_border_width(GTK_CONTAINER(vbox), 2); |
256 | 256 | gtk_container_add(GTK_CONTAINER(main_window), vbox); |
@@ -400,7 +400,7 @@ void popup_probe_window(GtkWidget * widget, gpointer data) |
400 | 400 |
|
401 | 401 | /* |
402 | 402 | * This part clears the list, then add all items back into the list. |
403 | | - * If a pin, signal, or parameter is showing in the main window, that item |
| 403 | + * If a pin or signal is showing in the main window, that item |
404 | 404 | * should be selected in the "Select item to probe" window, when the window |
405 | 405 | * is displayed again. |
406 | 406 | * |
@@ -577,7 +577,7 @@ static void create_probe_window(probe_t * probe) |
577 | 577 | gtk_container_set_border_width(GTK_CONTAINER(vbox), 2); |
578 | 578 | gtk_container_add(GTK_CONTAINER(probe->window), vbox); |
579 | 579 |
|
580 | | - /* create a notebook to hold pin, signal, and parameter list */ |
| 580 | + /* create a notebook to hold pin and signal list */ |
581 | 581 | probe->notebook = gtk_notebook_new(); |
582 | 582 | gtk_box_pack_start(GTK_BOX(vbox), probe->notebook, TRUE, TRUE, 0); |
583 | 583 |
|
|
0 commit comments