Reduce differences

master
erikkaashoek 5 years ago
parent 17697051bc
commit 5901b61126

@ -364,7 +364,7 @@ extern uint16_t graph_bottom;
// Maximum menu buttons count // Maximum menu buttons count
#define MENU_BUTTON_MAX 8 #define MENU_BUTTON_MAX 8
#define MENU_BUTTON_WIDTH 80 #define MENU_BUTTON_WIDTH 80
#define MENU_BUTTON_HEIGHT (LCD_HEIGHT/8-2) #define MENU_BUTTON_HEIGHT (LCD_HEIGHT/8-1)
#define MENU_BUTTON_BORDER 1 #define MENU_BUTTON_BORDER 1
#define KEYBOARD_BUTTON_BORDER 2 #define KEYBOARD_BUTTON_BORDER 2
#define FORM_BUTTON_BORDER 2 #define FORM_BUTTON_BORDER 2

@ -2394,7 +2394,7 @@ redraw_frame(void)
static void update_waterfall(void){ static void update_waterfall(void){
int i; int i;
int w_width = area_width < POINTS_COUNT ? area_width : POINTS_COUNT; int w_width = area_width < WIDTH ? area_width : WIDTH;
// Waterfall only in 290 or 145 points // Waterfall only in 290 or 145 points
// if (!(sweep_points == 290 || sweep_points == 145)) // if (!(sweep_points == 290 || sweep_points == 145))
// return; // return;
@ -2447,7 +2447,7 @@ static void update_waterfall(void){
else color = RGB565( 0, 124-((y-160)*4), 252-((y-160)*4)); else color = RGB565( 0, 124-((y-160)*4), 252-((y-160)*4));
#endif #endif
while (j * sweep_points < (i+1) * 290) { // Scale waterfall to 290 points while (j * sweep_points < (i+1) * WIDTH) { // Scale waterfall to WIDTH points
spi_buffer[j++] = color; spi_buffer[j++] = color;
} }
} }

@ -1009,9 +1009,7 @@ void apply_settings(void) // Ensure all settings in the setting structure
if (setting.mode == M_LOW) { if (setting.mode == M_LOW) {
} }
#ifdef __SI4432__
set_calibration_freq(setting.refer); set_calibration_freq(setting.refer);
#endif
update_rbw(); update_rbw();
calculate_step_delay(); calculate_step_delay();
} }
@ -1767,10 +1765,10 @@ modulation_again:
if (MODE_HIGH(setting.mode)) { if (MODE_HIGH(setting.mode)) {
local_IF = 0; local_IF = 0;
} else if (MODE_LOW(setting.mode)){ // All low mode } else if (MODE_LOW(setting.mode)){ // All low mode
if (!setting.auto_IF) { if (!setting.auto_IF)
local_IF = setting.frequency_IF; local_IF = setting.frequency_IF;
} else
local_IF = DEFAULT_IF; local_IF = DEFAULT_IF;
if (setting.mode == M_LOW) { if (setting.mode == M_LOW) {
if (tracking) { // VERY SPECIAL CASE!!!!! Measure BPF if (tracking) { // VERY SPECIAL CASE!!!!! Measure BPF
local_IF += lf - reffer_freq[setting.refer]; // Offset so fundamental of reffer is visible local_IF += lf - reffer_freq[setting.refer]; // Offset so fundamental of reffer is visible
@ -1884,8 +1882,8 @@ modulation_again:
// jump here if in zero span mode and all HW frequency setup is done. // jump here if in zero span mode and all HW frequency setup is done.
#ifdef __SI4432__
#ifdef __FAST_SWEEP__ #ifdef __FAST_SWEEP__
#ifdef __SI4432__
if (i == 0 && setting.frequency_step == 0 && setting.trigger == T_AUTO && S_STATE(setting.spur_removal) == 0 && SI4432_step_delay == 0 && setting.repeat == 1 && setting.sweep_time_us < 100*ONE_MS_TIME) { if (i == 0 && setting.frequency_step == 0 && setting.trigger == T_AUTO && S_STATE(setting.spur_removal) == 0 && SI4432_step_delay == 0 && setting.repeat == 1 && setting.sweep_time_us < 100*ONE_MS_TIME) {
// if ultra fast scanning is needed prefill the SI4432 RSSI read buffer // if ultra fast scanning is needed prefill the SI4432 RSSI read buffer
SI4432_Fill(MODE_SELECT(setting.mode), 0); SI4432_Fill(MODE_SELECT(setting.mode), 0);
@ -1957,7 +1955,7 @@ modulation_again:
} }
#ifdef __SPUR__ #ifdef __SPUR__
static pureRSSI_t spur_RSSI = -1; // Initialization only to avoid warning. static pureRSSI_t spur_RSSI = -1; // Initialization only to avoid warning.
if (S_STATE(setting.spur_removal)) { if (setting.mode == M_LOW && S_STATE(setting.spur_removal)) {
if (!spur_second_pass) { // If first spur pass if (!spur_second_pass) { // If first spur pass
spur_RSSI = pureRSSI; // remember measure RSSI spur_RSSI = pureRSSI; // remember measure RSSI
spur_second_pass = true; spur_second_pass = true;
@ -2624,7 +2622,7 @@ sweep_again: // stay in sweep loop when output mo
palSetPad(GPIOB, GPIOB_LED); palSetPad(GPIOB, GPIOB_LED);
#endif #endif
#ifdef TINYSA4 #ifdef TINYSA4
palSetPad(GPIOC, GPIOC_LED); palSetLine(LINE_LED);
#endif #endif
return true; return true;

Loading…
Cancel
Save

Powered by TurnKey Linux.