zero strike removed and listen in preset

pull/51/head
erikkaashoek 3 years ago
parent 9825888eb6
commit 328911d5d5

@ -471,12 +471,12 @@ const uint8_t x10x14_bits[(127-wFONT_START_CHAR)*wFONT_GET_HEIGHT*2] =
_BMP16(0b0111111110000000), // | ******** |
_BMP16(0b1111001111000000), // |**** **** |
_BMP16(0b1110000111000000), // |*** *** |
_BMP16(0b1110001111000000), // |*** **** |
_BMP16(0b1110011111000000), // |*** ***** |
_BMP16(0b1110110111000000), // |*** ** *** |
_BMP16(0b1110110111000000), // |*** ** *** |
_BMP16(0b1111100111000000), // |***** *** |
_BMP16(0b1111000111000000), // |**** *** |
_BMP16(0b1110000111000000), // |*** **** |
_BMP16(0b1110000111000000), // |*** **** |
_BMP16(0b1110000111000000), // |*** *** |
_BMP16(0b1110000111000000), // |*** *** |
_BMP16(0b1110000111000000), // |*** *** |
_BMP16(0b1110000111000000), // |*** *** |
_BMP16(0b1110000111000000), // |*** *** |
_BMP16(0b1111001111000000), // |**** **** |
_BMP16(0b0111111110000000), // | ******** |

@ -679,8 +679,8 @@ const uint8_t x7x11b_bits[] =
0b01111000, // | **** |
0b11001100, // |** ** |
0b11001100, // |** ** |
0b11011100, // |** *** |
0b11101100, // |*** ** |
0b11001100, // |** ** |
0b11001100, // |** ** |
0b11001100, // |** ** |
0b11001100, // |** ** |
0b11001100, // |** ** |

@ -237,6 +237,7 @@ caldata_recall(uint16_t id)
set_reflevel(setting.reflevel);
set_waterfall();
set_level_meter();
sweep_mode = SWEEP_ENABLE;
#ifdef __ULTRA__
ultra_start = (config.ultra_start == ULTRA_AUTO ? DEFAULT_ULTRA_THRESHOLD : config.ultra_start);
#endif

@ -170,11 +170,19 @@ static THD_FUNCTION(Thread1, arg)
while (i--)
*t++ = *f++;
#ifdef __LISTEN__
if (setting.listen && markers[active_marker].enabled == M_ENABLED) {
perform(false, 0, getFrequency(markers[active_marker].index), false);
SI4432_Listen(MODE_SELECT(setting.mode));
} else
#endif
{
completed = sweep(true);
if (sweep_once_count>1) {
sweep_once_count--;
} else
sweep_mode&=~SWEEP_ONCE;
}
} else if (sweep_mode & SWEEP_SELFTEST) {
// call from lowest level to save stack space
self_test(setting.test);
@ -184,13 +192,6 @@ static THD_FUNCTION(Thread1, arg)
} else if (sweep_mode & SWEEP_REMOTE) {
sweep_remote();
#endif
#ifdef __LISTEN__
} else if (sweep_mode & SWEEP_LISTEN) {
if (markers[active_marker].enabled == M_ENABLED) {
perform(false, 0, getFrequency(markers[active_marker].index), false);
SI4432_Listen(MODE_SELECT(setting.mode));
}
#endif
#ifdef __CALIBRATE__
} else if (sweep_mode & SWEEP_CALIBRATE) {
// call from lowest level to save stack space

@ -320,10 +320,10 @@ enum {
#define SWEEP_SELFTEST 0x08
#define SWEEP_REMOTE 0x10
#ifdef __LISTEN__
#define SWEEP_LISTEN 0x20
#define SWEEP_CALIBRATE_HARMONIC 0x40
//#define SWEEP_LISTEN 0x20
//#define SWEEP_FACTORY 0x20
#endif
#define SWEEP_CALIBRATE_HARMONIC 0x40
#define SWEEP_UI_MODE 0x80
extern uint8_t sweep_mode;
@ -1166,6 +1166,7 @@ typedef struct setting
uint8_t spur_removal; // enum
uint8_t disable_correction;
int8_t normalized_trace;
uint8_t listen;
int8_t tracking; // -1...1 Can NOT convert to bool!!!!!!
uint8_t atten_step; // 0...1 !!! need convert to bool
@ -1383,7 +1384,7 @@ typedef struct properties {
//sizeof(properties_t) == 0x1200
#define CONFIG_MAGIC 0x434f4e5B /* 'CONF' */
#define CONFIG_MAGIC 0x434f4e5C /* 'CONF' */
extern int16_t lastsaveid;
//extern properties_t *active_props;

17
ui.c

@ -1959,26 +1959,13 @@ static UI_FUNCTION_ADV_CALLBACK(menu_listen_acb)
(void)data;
(void)item;
if (b){
b->icon = (sweep_mode & SWEEP_LISTEN) ? BUTTON_ICON_CHECK : BUTTON_ICON_NOCHECK;
b->icon = (setting.listen) ? BUTTON_ICON_CHECK : BUTTON_ICON_NOCHECK;
return;
}
if (sweep_mode & SWEEP_LISTEN) {
sweep_mode = SWEEP_ENABLE;
} else {
sweep_mode = SWEEP_LISTEN;
}
setting.listen = !setting.listen;
ui_mode_normal();
redraw_frame();
request_to_redraw_grid();
#if 0
if (markers[active_marker].enabled == M_ENABLED) {
do {
perform(false,0,frequencies[markers[active_marker].index], false);
SI4432_Listen(MODE_SELECT(setting.mode));
} while (ui_process_listen_lever());
}
#endif
}
#endif
#ifdef TINYSA4

Loading…
Cancel
Save

Powered by TurnKey Linux.