Move init plot and ui to sweep thread, draw grid on startup

multi_trace
DiSlord 5 years ago
parent bc34fdb7ad
commit 0e895853dd

@ -114,14 +114,19 @@ static THD_FUNCTION(Thread1, arg)
{ {
(void)arg; (void)arg;
chRegSetThreadName("sweep"); chRegSetThreadName("sweep");
// Init UI and plot grid
area_height = AREA_HEIGHT_NORMAL;
ui_init();
//Initialize graph plotting
plot_init();
#ifdef __SD_CARD_LOAD__ #ifdef __SD_CARD_LOAD__
sd_card_load_config("autoload.ini"); sd_card_load_config("autoload.ini");
#endif #endif
#ifndef TINYSA4 //#ifndef TINYSA4
ui_process(); // ui_process();
#endif //#endif
while (1) { while (1) {
// START_PROFILE // START_PROFILE
@ -2284,10 +2289,6 @@ int main(void)
i2sStart(&I2SD2, &i2sconfig); i2sStart(&I2SD2, &i2sconfig);
i2sStartExchange(&I2SD2); i2sStartExchange(&I2SD2);
#endif #endif
area_height = AREA_HEIGHT_NORMAL;
ui_init();
//Initialize graph plotting
plot_init();
setup_sa(); setup_sa();
// if (setting.mode != -1) { // if (setting.mode != -1) {

@ -2019,7 +2019,8 @@ disable_waterfall(void)
void void
plot_init(void) plot_init(void)
{ {
force_set_markmap(); redraw_request|= REDRAW_AREA | REDRAW_BATTERY | REDRAW_CAL_STATUS | REDRAW_FREQUENCY;
draw_all(true);
} }
#pragma GCC pop_options #pragma GCC pop_options

Loading…
Cancel
Save

Powered by TurnKey Linux.