Move pause and resume to bottom of stack

master
erikkaashoek 5 years ago
parent 94cfd46996
commit 312c959bfe

@ -2369,8 +2369,8 @@ static const VNAShellCommand commands[] =
{"test" , cmd_test , 0}, {"test" , cmd_test , 0},
{"touchcal" , cmd_touchcal , CMD_WAIT_MUTEX}, {"touchcal" , cmd_touchcal , CMD_WAIT_MUTEX},
{"touchtest" , cmd_touchtest , CMD_WAIT_MUTEX}, {"touchtest" , cmd_touchtest , CMD_WAIT_MUTEX},
{"pause" , cmd_pause , 0}, {"pause" , cmd_pause , CMD_WAIT_MUTEX},
{"resume" , cmd_resume , 0}, {"resume" , cmd_resume , CMD_WAIT_MUTEX},
{"caloutput" , cmd_caloutput , 0}, {"caloutput" , cmd_caloutput , 0},
#ifdef __VNA__ #ifdef __VNA__
{"cal" , cmd_cal , CMD_WAIT_MUTEX}, {"cal" , cmd_cal , CMD_WAIT_MUTEX},

@ -214,6 +214,7 @@ void set_clear_storage(void);
void set_subtract_storage(void); void set_subtract_storage(void);
void toggle_normalize(void); void toggle_normalize(void);
void toggle_waterfall(void); void toggle_waterfall(void);
void disable_waterfall(void);
void set_mode(int); void set_mode(int);
int GetMode(void); int GetMode(void);
void set_reflevel(float); void set_reflevel(float);

@ -2477,6 +2477,18 @@ toggle_waterfall(void)
ili9341_fill(OFFSETX, graph_bottom, LCD_WIDTH - OFFSETX, CHART_BOTTOM - graph_bottom, 0); ili9341_fill(OFFSETX, graph_bottom, LCD_WIDTH - OFFSETX, CHART_BOTTOM - graph_bottom, 0);
request_to_redraw_grid(); request_to_redraw_grid();
} }
void
disable_waterfall(void)
{
graph_bottom = NO_WATERFALL;
waterfall = W_OFF;
_grid_y = graph_bottom / NGRIDY;
ili9341_fill(OFFSETX, graph_bottom, LCD_WIDTH - OFFSETX, CHART_BOTTOM - graph_bottom, 0);
request_to_redraw_grid();
}
void void
plot_init(void) plot_init(void)
{ {

@ -592,13 +592,17 @@ VNA_SHELL_FUNCTION(cmd_scanraw)
if (argc == 3) { if (argc == 3) {
points = my_atoi(argv[2]); points = my_atoi(argv[2]);
} }
// if (get_waterfall())
// disable_waterfall(); // display dma hangs when waterfall is enabled
uint32_t old_step = setting.frequency_step; uint32_t old_step = setting.frequency_step;
float f_step = (stop-start)/ points; float f_step = (stop-start)/ points;
setting.frequency_step = (uint32_t)f_step; setting.frequency_step = (uint32_t)f_step;
streamPut(shell_stream, '{'); streamPut(shell_stream, '{');
static uint32_t old_start=0, old_stop=0, old_points=0; static uint32_t old_start=0, old_stop=0, old_points=0;
if (old_start != start || old_stop != stop || old_points != points) { if (old_start != start || old_stop != stop || old_points != points) { // To prevent dirty for every sweep
dirty = true; dirty = true;
old_start = start; old_start = start;
old_stop = stop; old_stop = stop;

@ -1331,7 +1331,7 @@ int binary_search_frequency(int f) // Search which index in the frequency t
return -1; return -1;
} }
uint32_t interpolate_maximum(int m) void interpolate_maximum(int m)
{ {
const int idx = markers[m].index; const int idx = markers[m].index;
markers[m].frequency = frequencies[idx]; markers[m].frequency = frequencies[idx];
@ -2177,6 +2177,9 @@ sweep_again: // stay in sweep loop when output mo
} }
// scandirty = true; // To show trigger happened // scandirty = true; // To show trigger happened
} }
if (setting.actual_sweep_time_us > ONE_SECOND_TIME && MODE_INPUT(setting.mode))
ili9341_fill(OFFSETX, CHART_BOTTOM+1, WIDTH, 1, 0); // Erase progress bar before updating actual_sweep_time
// ---------------------- process measured actual sweep time ----------------- // ---------------------- process measured actual sweep time -----------------
// For CW mode value calculated in SI4432_Fill // For CW mode value calculated in SI4432_Fill
@ -2559,7 +2562,6 @@ sweep_again: // stay in sweep loop when output mo
// redraw_marker(peak_marker, FALSE); // redraw_marker(peak_marker, FALSE);
// STOP_PROFILE; // STOP_PROFILE;
ili9341_fill(OFFSETX, CHART_BOTTOM+1, WIDTH, 1, 0);
palSetPad(GPIOB, GPIOB_LED); palSetPad(GPIOB, GPIOB_LED);
return true; return true;

Loading…
Cancel
Save

Powered by TurnKey Linux.