skip redrawing after touch cal to avoid hanging up

pull/4/head
TT 9 years ago
parent 5a63fe6890
commit c30a2730f3

@ -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[])

@ -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…
Cancel
Save

Powered by TurnKey Linux.