rfdsatt: interactive help for test + interact mode
This commit is contained in:
parent
b86a2daad1
commit
7d1c8741b8
|
@ -235,7 +235,7 @@ DEFUN(interact, interact_cmd, "interact", "Enter interactive single-key mode")
|
||||||
uint8_t g_stage = 1;
|
uint8_t g_stage = 1;
|
||||||
uint8_t g_val = 0;
|
uint8_t g_val = 0;
|
||||||
|
|
||||||
printf("Entering interactive single-key mode. Press 'X' for exit\r\n");
|
printf("Entering interactive single-key mode. Press 'X' for exit, '?' for help\r\n");
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
int ch, rc;
|
int ch, rc;
|
||||||
|
@ -245,6 +245,15 @@ DEFUN(interact, interact_cmd, "interact", "Enter interactive single-key mode")
|
||||||
} while (ch == EOF);
|
} while (ch == EOF);
|
||||||
|
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
case '?':
|
||||||
|
printf( "'1'..'4': Select channel\r\n"
|
||||||
|
"'0' : Set attenuation of current channel+stage to 0 dB\r\n"
|
||||||
|
"'f' : Set attenuation of current channel+stage to 31 dB\r\n"
|
||||||
|
"'+'/'-' : Increment/decrement attenuation in dB\r\n"
|
||||||
|
"'a'/'b' : Select stage 1/2 within channel\r\n"
|
||||||
|
"'X' : Exit interactive mode\r\n"
|
||||||
|
);
|
||||||
|
break;
|
||||||
case 'X': /* exit */
|
case 'X': /* exit */
|
||||||
return;
|
return;
|
||||||
case '1': case '2': case '3': case '4': /* channel number */
|
case '1': case '2': case '3': case '4': /* channel number */
|
||||||
|
@ -290,12 +299,19 @@ DEFUN(test, test_cmd, "test", "Enter interactive test-ramp mode")
|
||||||
uint8_t g_chan = 1;
|
uint8_t g_chan = 1;
|
||||||
uint8_t g_val = 0;
|
uint8_t g_val = 0;
|
||||||
|
|
||||||
printf("Entering interactive test-ramp mode. Press 'X' for exit\r\n");
|
printf("Interactive test-ramp mode. Press 'X' for exit, '?' for help\r\n");
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
int ch, rc;
|
int ch, rc;
|
||||||
if ((ch = getchar()) != EOF) {
|
if ((ch = getchar()) != EOF) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
case '?':
|
||||||
|
printf( "'1'..'4': Select channel\r\n"
|
||||||
|
"'0' : Set attenuation of current channel to 0 dB\r\n"
|
||||||
|
"'a'/'b' : Select stage 1/2 within channel\r\n"
|
||||||
|
"'X' : Exit interactive test-ramp mode\r\n"
|
||||||
|
);
|
||||||
|
break;
|
||||||
case 'X': /* exit */
|
case 'X': /* exit */
|
||||||
return;
|
return;
|
||||||
case '1': case '2': case '3': case '4': /* channel number */
|
case '1': case '2': case '3': case '4': /* channel number */
|
||||||
|
|
Loading…
Reference in New Issue