mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2025-12-06 03:31:59 +01:00
skip redrawing after touch cal to avoid hanging up
This commit is contained in:
parent
5a63fe6890
commit
c30a2730f3
3
main.c
3
main.c
|
|
@ -1220,6 +1220,7 @@ static void cmd_touchcal(BaseSequentialStream *chp, int argc, char *argv[])
|
|||
//extern int16_t touch_cal[4];
|
||||
int i;
|
||||
|
||||
chMtxLock(&mutex);
|
||||
chprintf(chp, "first touch upper left, then lower right...");
|
||||
touch_cal_exec();
|
||||
chprintf(chp, "done\r\n");
|
||||
|
|
@ -1229,7 +1230,7 @@ static void cmd_touchcal(BaseSequentialStream *chp, int argc, char *argv[])
|
|||
chprintf(chp, "%d ", config.touch_cal[i]);
|
||||
}
|
||||
chprintf(chp, "\r\n");
|
||||
touch_start_watchdog();
|
||||
chMtxUnlock(&mutex);
|
||||
}
|
||||
|
||||
static void cmd_touchtest(BaseSequentialStream *chp, int argc, char *argv[])
|
||||
|
|
|
|||
6
ui.c
6
ui.c
|
|
@ -293,7 +293,7 @@ touch_cal_exec(void)
|
|||
|
||||
do {
|
||||
status = touch_check();
|
||||
} while(status != EVT_TOUCH_PRESSED);
|
||||
} while(status != EVT_TOUCH_RELEASED);
|
||||
x1 = last_touch_x;
|
||||
y1 = last_touch_y;
|
||||
|
||||
|
|
@ -303,7 +303,7 @@ touch_cal_exec(void)
|
|||
|
||||
do {
|
||||
status = touch_check();
|
||||
} while(status != EVT_TOUCH_PRESSED);
|
||||
} while(status != EVT_TOUCH_RELEASED);
|
||||
x2 = last_touch_x;
|
||||
y2 = last_touch_y;
|
||||
|
||||
|
|
@ -312,8 +312,8 @@ touch_cal_exec(void)
|
|||
config.touch_cal[2] = (x2 - x1) * 16 / 320;
|
||||
config.touch_cal[3] = (y2 - y1) * 16 / 240;
|
||||
|
||||
//redraw_all();
|
||||
touch_start_watchdog();
|
||||
redraw_all();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Reference in a new issue