From bd420b1ad43efaf9b1a145145b8b139396f92b75 Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Wed, 10 May 2023 14:15:59 +0200 Subject: [PATCH] Enable LO output on tinySA4 This reverts commit dd97453cebc6f631cae8f2ac8ffe46f136536372. --- nanovna.h | 4 ++-- sa_core.c | 4 ++-- si4468.c | 10 +++++----- ui.c | 6 ++---- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/nanovna.h b/nanovna.h index e5c6b97..5b3a5da 100644 --- a/nanovna.h +++ b/nanovna.h @@ -18,7 +18,7 @@ */ #include "ch.h" -//#ifdef TINYSA_F303 +#ifdef TINYSA_F303 #ifdef TINYSA_F072 #error "Remove comment for #ifdef TINYSA_F303" #endif @@ -26,7 +26,7 @@ #define TINYSA4 #endif #define TINYSA4_PROTO -//#endif +#endif #ifdef TINYSA_F072 #ifdef TINYSA_F303 diff --git a/sa_core.c b/sa_core.c index 2980a42..3e562c9 100644 --- a/sa_core.c +++ b/sa_core.c @@ -970,13 +970,13 @@ void set_tracking_output(int t) dirty = true; } -#ifndef TINYSA4 +//#ifndef TINYSA4 void toggle_tracking_output(void) { setting.tracking_output = !setting.tracking_output; dirty = true; } -#endif +//#endif void toggle_pulse(void) { diff --git a/si4468.c b/si4468.c index 38f99bf..6ec2f23 100644 --- a/si4468.c +++ b/si4468.c @@ -338,7 +338,7 @@ static const enum { bool refDouble = false; static const bool refDiv2 = false; static const bool rfEnable = true; -static const bool auxEnable = false; +static bool auxEnable = false; static const bool feedbackFromDivided = true; static const bool LDF = false; // for fractional mode @@ -684,6 +684,8 @@ void ADF4351_aux_drive(int p) auxPower = p; sendConfig(); } +#endif + void ADF4351_enable_aux_out(int s) { if ( auxEnable == s) @@ -692,8 +694,6 @@ void ADF4351_enable_aux_out(int s) sendConfig(); } -#endif - void ADF4351_enable(int s) { @@ -2703,10 +2703,10 @@ static int old_high = 2; void enable_ADF_output(int f, int t) { - (void) t; +// (void) t; ADF4351_enable(f); ADF4351_enable_out(f); -// ADF4351_enable_aux_out(t); + ADF4351_enable_aux_out(t); } #ifdef __NEW_SWITCHES__ diff --git a/ui.c b/ui.c index 77785a1..b82d3f2 100644 --- a/ui.c +++ b/ui.c @@ -3796,7 +3796,7 @@ static UI_FUNCTION_ADV_CALLBACK(menu_settings_ultra_acb){ } #endif -#ifndef TINYSA4 +//#ifdef TINYSA4 static UI_FUNCTION_ADV_CALLBACK(menu_lo_output_acb){ (void)item; (void)data; @@ -3806,7 +3806,7 @@ static UI_FUNCTION_ADV_CALLBACK(menu_lo_output_acb){ } toggle_tracking_output(); } -#endif +//#endif static UI_FUNCTION_ADV_CALLBACK(menu_pause_acb) { @@ -4765,9 +4765,7 @@ static const menuitem_t menu_lock_display[] = { static const menuitem_t menu_config2[] = { { MT_ADV_CALLBACK, 0, "PULSE\nHIGH", menu_settings_pulse_acb}, -#ifndef TINYSA4 { MT_ADV_CALLBACK | MT_LOW, 0,"LO OUTPUT", menu_lo_output_acb}, -#endif #ifdef __ULTRA__ { MT_ADV_CALLBACK, 0, "ENABLE\nULTRA", menu_ultra_acb}, #endif