Merge branch 'master' of https://github.com/erikkaashoek/tinySA into DiSlord_test_branch

pull/4/head
DiSlord 6 years ago
commit 741ec58db9

@ -168,17 +168,17 @@ void reset_settings(int m)
uint32_t calc_min_sweep_time_us(void) // Calculate minimum sweep time in uS needed just because of the delays for the RSSI to become stable uint32_t calc_min_sweep_time_us(void) // Calculate minimum sweep time in uS needed just because of the delays for the RSSI to become stable
{ {
float t; uint32_t t;
float a = (SI4432_step_delay + MEASURE_TIME); // Single RSSI delay and measurement time in uS while scanning
if (MODE_OUTPUT(setting.mode)) if (MODE_OUTPUT(setting.mode))
t = 100; t = 100;
else { else {
uint32_t a = (SI4432_step_delay + MEASURE_TIME) * (sweep_points - 1); // Single RSSI delay and measurement time in uS while scanning
if (FREQ_IS_CW()) { if (FREQ_IS_CW()) {
a = MINIMUM_SWEEP_TIME / (sweep_points - 1); // time per step in fast CW mode a = MINIMUM_SWEEP_TIME; // time per step in fast CW mode
if (setting.repeat != 1 || setting.sweep_time_us >= ONE_SECOND_TIME || setting.spur != 0) if (setting.repeat != 1 || setting.sweep_time_us >= ONE_SECOND_TIME || setting.spur != 0)
a = 15000.0 / (sweep_points - 1); // time per step in CW mode with repeat too long for fast delay a = 15000; // time per step in CW mode with repeat too long for fast delay
} }
t = vbwSteps * (sweep_points - 1) * (setting.spur ? 2 : 1) * ( (a + (setting.repeat - 1)* REPEAT_TIME)); t = vbwSteps * (setting.spur ? 2 : 1) * ( (a + (setting.repeat - 1)* ( REPEAT_TIME * (sweep_points - 1))));
} }
return t; return t;
} }
@ -1653,6 +1653,7 @@ sweep_again: // stay in sweep loop when output mo
// if (prev_sweep_time > ONE_SECOND_TIME) { // if (prev_sweep_time > ONE_SECOND_TIME) {
ili9341_fill(OFFSETX, HEIGHT_NOSCROLL+1, WIDTH, 1, 0); ili9341_fill(OFFSETX, HEIGHT_NOSCROLL+1, WIDTH, 1, 0);
// } // }
setting.actual_sweep_time_us = prev_sweep_time; // restore last sweep time when aborting
return false; return false;
} }

@ -1803,7 +1803,7 @@ static void fetch_numeric_target(void)
break; break;
case KM_SAMPLETIME: case KM_SAMPLETIME:
uistat.value = setting.step_delay; uistat.value = setting.step_delay;
plot_printf(uistat.text, sizeof uistat.text, "%3duS", ((int32_t)uistat.value)); plot_printf(uistat.text, sizeof uistat.text, "%3dus", ((int32_t)uistat.value));
break; break;
case KM_REPEAT: case KM_REPEAT:
uistat.value = setting.repeat; uistat.value = setting.repeat;
@ -1851,7 +1851,7 @@ static void fetch_numeric_target(void)
else else
uistat.value = setting.sweep_time_us; uistat.value = setting.sweep_time_us;
uistat.value /= (float)ONE_SECOND_TIME; uistat.value /= (float)ONE_SECOND_TIME;
plot_printf(uistat.text, sizeof uistat.text, "%.3FS", uistat.value); plot_printf(uistat.text, sizeof uistat.text, "%.3Fs", uistat.value);
break; break;
case KM_TRIGGER: case KM_TRIGGER:
uistat.value = setting.trigger_level; uistat.value = setting.trigger_level;

Loading…
Cancel
Save

Powered by TurnKey Linux.