Jog button with rotate

save_scan
erikkaashoek 3 years ago
parent 2692c3de59
commit aaf72f8adb

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

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

10
ui.c

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

Loading…
Cancel
Save

Powered by TurnKey Linux.