From aaf72f8adb0f222023a9511e2c4a25ad1e0c870b Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Sat, 1 Apr 2023 11:15:20 +0200 Subject: [PATCH] Jog button with rotate --- sa_core.c | 5 ++++- si4468.c | 6 +++++- ui.c | 10 +++++----- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/sa_core.c b/sa_core.c index cd0754e..73a5b8a 100644 --- a/sa_core.c +++ b/sa_core.c @@ -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); diff --git a/si4468.c b/si4468.c index d1bfcf0..f46749b 100644 --- a/si4468.c +++ b/si4468.c @@ -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 diff --git a/ui.c b/ui.c index f800734..95af9c2 100644 --- a/ui.c +++ b/ui.c @@ -201,9 +201,9 @@ static int btn_check(void) if (button_set & (1< last_button_repeat_ticks) { int status = 0; if (cur_button & (1<