diff --git a/Font5x7.c b/Font5x7.c index 2eab2eb..9ab283f 100644 --- a/Font5x7.c +++ b/Font5x7.c @@ -958,8 +958,8 @@ const uint8_t x5x7_bits[] = +--------+ */ 0b01100000|CHAR5x7_WIDTH_5px, 0b10010000, - 0b10110000, - 0b11010000, + 0b10010000, + 0b10010000, 0b10010000, 0b10010000, 0b01100000, diff --git a/Font7x13b.c b/Font7x13b.c index 6b72062..dc882ac 100644 --- a/Font7x13b.c +++ b/Font7x13b.c @@ -1345,8 +1345,8 @@ const uint8_t x7x11b_bits[] = 0b01111000, 0b11001100, 0b11001100, - 0b11011100, - 0b11101100, + 0b11001100, + 0b11001100, 0b11001100, 0b11001100, 0b11001100, diff --git a/main.c b/main.c index 6a72f70..529ef4b 100644 --- a/main.c +++ b/main.c @@ -202,6 +202,10 @@ static THD_FUNCTION(Thread1, arg) } +#pragma GCC push_options +#pragma GCC optimize ("Os") + + int is_paused(void) { @@ -2705,6 +2709,7 @@ static DACConfig dac1cfg1 = { }; #endif +#pragma GCC pop_options static const GPTConfig gpt4cfg = { 1000000, // 1 MHz timer clock. diff --git a/nanovna.h b/nanovna.h index e2de97f..03e950e 100644 --- a/nanovna.h +++ b/nanovna.h @@ -409,7 +409,7 @@ extern const uint8_t numfont16x22[]; #define bFONT_GET_DATA(ch) ( &x7x11b_bits[(ch-bFONT_START_CHAR)*bFONT_GET_HEIGHT]) #define bFONT_GET_WIDTH(ch) (8-(x7x11b_bits[(ch-bFONT_START_CHAR)*bFONT_GET_HEIGHT]&7)) -#if 1 // Set to 0 to save 3kByte +#if 1 // Set to 0 to save 3kByte and loose nice font #define wFONT_START_CHAR 0x17 #define wFONT_MAX_WIDTH 12 #define wFONT_GET_HEIGHT 14 diff --git a/plot.c b/plot.c index fe07e07..299007e 100644 --- a/plot.c +++ b/plot.c @@ -25,7 +25,7 @@ #pragma GCC push_options -// #pragma GCC optimize ("O2") // Makes the code just a bit faster, disable during debugging. +#pragma GCC optimize ("Og") // Makes the code just a bit faster, disable during debugging. #ifdef __SCROLL__ diff --git a/sa_core.c b/sa_core.c index dc7cb68..7a0d1e5 100644 --- a/sa_core.c +++ b/sa_core.c @@ -21,7 +21,7 @@ #include "stdlib.h" #pragma GCC push_options -#pragma GCC optimize ("Os") // "Os" causes problem in selftest!!!!!!!! +#pragma GCC optimize ("Os") //#define __DEBUG_AGC__ If set the AGC value will be shown in the stored trace and FAST_SWEEP rmmode will be disabled @@ -903,10 +903,12 @@ void set_scale(float t) { round_reflevel_to_scale(); } +extern char low_level_help_text[12]; void set_offset(float offset) { setting.offset = offset; + plot_printf(low_level_help_text, sizeof low_level_help_text, "%+d..%+d", -76 + (int)offset, -6 + (int)offset); force_set_markmap(); dirty = true; // No HW update required, only status panel refresh but need to ensure the cached value is updated in the calculation of the RSSI } diff --git a/ui_sa.c b/ui_sa.c index 264dfc9..714e948 100644 --- a/ui_sa.c +++ b/ui_sa.c @@ -1486,11 +1486,12 @@ static const menuitem_t menu_sweep[] = { { MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel }; +char low_level_help_text[12] = "-76..-6"; static const menuitem_t menu_lowoutputmode[] = { { MT_FORM | MT_ADV_CALLBACK, 0, "LOW OUTPUT %s", menu_outputmode_acb}, { MT_FORM | MT_KEYPAD, KM_CENTER, "FREQ: %s", "10kHz..350MHz"}, - { MT_FORM | MT_KEYPAD, KM_LOWOUTLEVEL, "LEVEL: %s", "-76..-6"}, + { MT_FORM | MT_KEYPAD, KM_LOWOUTLEVEL, "LEVEL: %s", low_level_help_text /* "-76..-6" */}, { MT_FORM | MT_ADV_CALLBACK, 0, "MOD: %s", menu_smodulation_acb}, { MT_FORM | MT_ADV_CALLBACK, 0, "%s", menu_sweep_acb}, // { MT_FORM | MT_KEYPAD, KM_SPAN, "SPAN: %s", "0..350MHz"}, @@ -1508,7 +1509,7 @@ static const menuitem_t menu_highoutputmode[] = { { MT_FORM | MT_ADV_CALLBACK, 0, "MOD: %s", menu_smodulation_acb}, { MT_FORM | MT_KEYPAD, KM_SPAN, "SPAN: %s", NULL}, { MT_FORM | MT_KEYPAD, KM_SWEEP_TIME,"SWEEP TIME: %s", "0..600 seconds"}, - { MT_FORM | MT_KEYPAD, KM_OFFSET, "AMP: %s", "-100..+100"}, + { MT_FORM | MT_KEYPAD, KM_OFFSET, "EXTERNAL AMP: %s", "-100..+100"}, { MT_FORM | MT_CANCEL, 0, "MODE", NULL }, { MT_FORM | MT_NONE, 0, NULL, NULL } // sentinel };