Merge branch 'master' into tinySA-V4-SI4463

Removed_REF_marker
erikkaashoek 5 years ago
commit 93f37a7c7a

@ -331,11 +331,11 @@ int chvprintf(BaseSequentialStream *chp, const char *fmt, va_list ap) {
state|=DEFAULT_PRESCISION; state|=DEFAULT_PRESCISION;
//Get [length] //Get [length]
if (c == 'l' || c == 'L') { if (c == 'l' || c == 'L') {
state|=IS_LONG; // state|=IS_LONG; // Ignore Long
if (*fmt) if (*fmt)
c = *fmt++; c = *fmt++;
} }
/* /*
else if ((c >= 'A') && (c <= 'Z')) else if ((c >= 'A') && (c <= 'Z'))
state|=IS_LONG; state|=IS_LONG;
*/ */

@ -326,7 +326,7 @@ void set_attack(int);
void set_noise(int); void set_noise(int);
void toggle_tracking_output(void); void toggle_tracking_output(void);
extern int32_t frequencyExtra; extern int32_t frequencyExtra;
void set_30mhz(freq_t f); void set_30mhz(freq_t);
void set_modulation(int); void set_modulation(int);
void set_modulation_frequency(int); void set_modulation_frequency(int);
int search_maximum(int m, freq_t center, int span); int search_maximum(int m, freq_t center, int span);
@ -563,7 +563,7 @@ typedef struct config {
int16_t touch_cal[4]; int16_t touch_cal[4];
uint32_t _serial_speed; uint32_t _serial_speed;
#ifdef __VNA__ #ifdef __VNA__
uint32_t harmonic_freq_threshold; freq_t harmonic_freq_threshold;
#endif #endif
uint16_t dac_value; uint16_t dac_value;
uint16_t vbat_offset; uint16_t vbat_offset;
@ -588,7 +588,7 @@ typedef struct config {
int8_t ultra; int8_t ultra;
uint32_t dummy; uint32_t dummy;
// uint8_t _reserved[22]; // uint8_t _reserved[22];
uint32_t checksum; freq_t checksum;
} config_t; } config_t;
extern config_t config; extern config_t config;

@ -60,6 +60,8 @@ void clear_frequency_cache(void)
ADF4351_force_refresh(); ADF4351_force_refresh();
} }
static freq_t old_freq[4] = { 0, 0, 0, 0};
static freq_t real_old_freq[4] = { 0, 0, 0, 0};
//int setting.refer = -1; // Off by default //int setting.refer = -1; // Off by default
const int reffer_freq[] = {30000000, 15000000, 10000000, 4000000, 3000000, 2000000, 1000000}; const int reffer_freq[] = {30000000, 15000000, 10000000, 4000000, 3000000, 2000000, 1000000};
@ -1601,7 +1603,7 @@ void update_rbw(void) // calculate the actual_rbw and the vbwSteps (#
} else { } else {
setting.vbw_x10 = 3000; // trick to get right default rbw in zero span mode setting.vbw_x10 = 3000; // trick to get right default rbw in zero span mode
} }
uint32_t temp_actual_rbw_x10 = setting.rbw_x10; // requested rbw , 32 bit !!!!!! freq_t temp_actual_rbw_x10 = setting.rbw_x10; // requested rbw , 32 bit !!!!!!
if (temp_actual_rbw_x10 == 0) { // if auto rbw if (temp_actual_rbw_x10 == 0) { // if auto rbw
if (setting.step_delay_mode==SD_FAST) { // if in fast scanning if (setting.step_delay_mode==SD_FAST) { // if in fast scanning
#ifdef __SI4432__ #ifdef __SI4432__
@ -2462,7 +2464,7 @@ modulation_again:
if (MODE_OUTPUT(setting.mode)) { // No substepping and no RSSI in output mode if (MODE_OUTPUT(setting.mode)) { // No substepping and no RSSI in output mode
if (break_on_operation && operation_requested) // break subscanning if requested if (break_on_operation && operation_requested) // break subscanning if requested
return(0); // abort return(0); // abort
if (i == 1 && MODE_OUTPUT(setting.mode) && setting.modulation != MO_NONE && setting.modulation != MO_EXTERNAL) { // if in output mode with modulation if ( i==1 && MODE_OUTPUT(setting.mode) && setting.modulation != MO_NONE && setting.modulation != MO_EXTERNAL) { // if in output mode with modulation and LO setup done
// i = 1; // Everything set so skip LO setting // i = 1; // Everything set so skip LO setting
goto modulation_again; // Keep repeating sweep loop till user aborts by input goto modulation_again; // Keep repeating sweep loop till user aborts by input
} }
@ -2950,7 +2952,7 @@ sweep_again: // stay in sweep loop when output mo
#define AUTO_TARGET_LEVEL -30 #define AUTO_TARGET_LEVEL -30
#define AUTO_TARGET_WINDOW 2 #define AUTO_TARGET_WINDOW 2
if (!in_selftest && setting.mode == M_LOW && setting.auto_attenuation && max_index[0] > 0) { // calculate and apply auto attenuate if (!in_selftest && setting.mode == M_LOW && setting.auto_attenuation) { // calculate and apply auto attenuate
setting.atten_step = false; // No step attenuate in low mode auto attenuate setting.atten_step = false; // No step attenuate in low mode auto attenuate
int changed = false; int changed = false;
int delta = 0; int delta = 0;
@ -3892,7 +3894,7 @@ void self_test(int test)
setting.frequency_step = 30000; setting.frequency_step = 30000;
if (setting.test_argument > 0) if (setting.test_argument > 0)
setting.frequency_step=setting.test_argument; setting.frequency_step=setting.test_argument;
uint32_t f = 400000; // Start search at 400kHz freq_t f = 400000; // Start search at 400kHz
// int i = 0; // Index in spur table (temp_t) // int i = 0; // Index in spur table (temp_t)
set_RBW(setting.frequency_step/100); set_RBW(setting.frequency_step/100);
last_spur = 0; last_spur = 0;

@ -1276,6 +1276,7 @@ menu_move_back(void)
if (current_menu_is_form()) { if (current_menu_is_form()) {
redraw_frame(); redraw_frame();
redraw_request |= REDRAW_BATTERY;
area_width = 0; area_width = 0;
} else { } else {
// redraw_frame(); // redraw_frame();
@ -1311,6 +1312,7 @@ menu_push_submenu(const menuitem_t *submenu)
ensure_selection(); ensure_selection();
if (menu_is_form(submenu)) { if (menu_is_form(submenu)) {
redraw_frame(); redraw_frame();
redraw_request |= REDRAW_BATTERY;
area_width = 0; area_width = 0;
} else { } else {
// redraw_frame(); // redraw_frame();
@ -2119,7 +2121,7 @@ menu_select_touch(int i, int pos)
step = setting.slider_span; step = setting.slider_span;
break; break;
} }
if (step < 0 && get_sweep_frequency(ST_CENTER) < (unsigned int)-step) if (step < 0 && get_sweep_frequency(ST_CENTER) < (freq_t)(-step))
uistat.value = 0; uistat.value = 0;
else else
uistat.value = get_sweep_frequency(ST_CENTER) + step; uistat.value = get_sweep_frequency(ST_CENTER) + step;

Loading…
Cancel
Save

Powered by TurnKey Linux.