Jog button with rotate

save_scan
erikkaashoek 3 years ago
parent 2692c3de59
commit aaf72f8adb

@ -354,6 +354,9 @@ void set_output_path(freq_t f, float level)
goto common; goto common;
case PATH_DIRECT: case PATH_DIRECT:
if (max2871)
enable_ultra(false);
else
enable_ultra(true); enable_ultra(true);
enable_direct(true); enable_direct(true);
enable_high(true); enable_high(true);

@ -2190,13 +2190,15 @@ void enable_ultra(int s)
{ {
static int old_ultra = 2; static int old_ultra = 2;
if (s != old_ultra) { if (s != old_ultra) {
old_ultra = s;
#ifdef TINYSA4 #ifdef TINYSA4
if (max2871)
s = !s;
if (s) if (s)
palClearLine(LINE_ULTRA); palClearLine(LINE_ULTRA);
else else
palSetLine(LINE_ULTRA); palSetLine(LINE_ULTRA);
#endif #endif
old_ultra = s;
} }
} }
#endif #endif
@ -2246,6 +2248,8 @@ void enable_direct(int s)
if (s == old_direct) if (s == old_direct)
return; return;
old_direct = s; old_direct = s;
if (max2871)
s = !s;
if (s) if (s)
SI4463_set_gpio(4,SI446X_GPIO_MODE_DRIVE0); SI4463_set_gpio(4,SI446X_GPIO_MODE_DRIVE0);
else else

10
ui.c

@ -201,9 +201,9 @@ static int btn_check(void)
if (button_set & (1<<BIT_PUSH)) if (button_set & (1<<BIT_PUSH))
status |= EVT_BUTTON_SINGLE_CLICK; status |= EVT_BUTTON_SINGLE_CLICK;
if (button_set & (1<<BIT_UP1)) if (button_set & (1<<BIT_UP1))
status |= EVT_UP; status |= (config.flip ? EVT_DOWN : EVT_UP);
if (button_set & (1<<BIT_DOWN1)) if (button_set & (1<<BIT_DOWN1))
status |= EVT_DOWN; status |= (config.flip ? EVT_UP : EVT_DOWN);
return status; return status;
} }
@ -238,9 +238,9 @@ static int btn_wait_release(void)
ticks > last_button_repeat_ticks) { ticks > last_button_repeat_ticks) {
int status = 0; int status = 0;
if (cur_button & (1<<BIT_DOWN1)) if (cur_button & (1<<BIT_DOWN1))
status |= EVT_DOWN | EVT_REPEAT; status |= (config.flip ? EVT_UP: EVT_DOWN) | EVT_REPEAT;
if (cur_button & (1<<BIT_UP1)) if (cur_button & (1<<BIT_UP1))
status |= EVT_UP | EVT_REPEAT; status |= (config.flip ? EVT_DOWN:EVT_UP) | EVT_REPEAT;
last_button_repeat_ticks = ticks + BUTTON_REPEAT_TICKS; last_button_repeat_ticks = ticks + BUTTON_REPEAT_TICKS;
return status; return status;
} }
@ -1384,7 +1384,7 @@ static const struct {
[KM_DECAY] = {keypads_positive , "DECAY"}, // KM_DECAY [KM_DECAY] = {keypads_positive , "DECAY"}, // KM_DECAY
[KM_NOISE] = {keypads_positive , "NOISE\nLEVEL"}, // KM_NOISE [KM_NOISE] = {keypads_positive , "NOISE\nLEVEL"}, // KM_NOISE
#ifdef TINYSA4 #ifdef TINYSA4
[KM_FREQ_CORR] = {keypads_freq , "PPB"}, // KM_FREQ_CORR [KM_FREQ_CORR] = {keypads_plusmin , "PPB"}, // KM_FREQ_CORR
#else #else
[KM_10MHZ] = {keypads_freq , "FREQ"}, // KM_10MHz [KM_10MHZ] = {keypads_freq , "FREQ"}, // KM_10MHz
#endif #endif

Loading…
Cancel
Save

Powered by TurnKey Linux.