add manual controls menu, remove demu screens
This commit is contained in:
+1
-18
@@ -8,10 +8,8 @@
|
||||
#include "drawing.h"
|
||||
|
||||
static void gui_thread(void *arg);
|
||||
static void gui_tick(TimerHandle_t xTimer);
|
||||
|
||||
TaskHandle_t hGuiThread = NULL;
|
||||
static TimerHandle_t hTicker = NULL;
|
||||
|
||||
void gui_init() {
|
||||
printf("GUI init\n");
|
||||
@@ -20,20 +18,6 @@ void gui_init() {
|
||||
|
||||
int rv = xTaskCreate(gui_thread, "gui", 4096, NULL, 6, &hGuiThread);
|
||||
assert (rv == pdPASS);
|
||||
|
||||
hTicker = xTimerCreate(
|
||||
"gui_tick", /* name */
|
||||
pdMS_TO_TICKS(10), /* period/time */
|
||||
pdTRUE, /* auto reload */
|
||||
(void*)0, /* timer ID */
|
||||
gui_tick); /* callback */
|
||||
assert(hTicker != NULL);
|
||||
|
||||
xTimerStart(hTicker, portMAX_DELAY);
|
||||
}
|
||||
|
||||
static void gui_tick(TimerHandle_t xTimer) {
|
||||
xTaskNotify(hGuiThread, 0b10000, eSetBits);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,8 +43,7 @@ static void __attribute__((noreturn)) gui_thread(void *arg) {
|
||||
xTaskNotifyWait(0, ULONG_MAX, &value, pdMS_TO_TICKS(10));
|
||||
uint32_t time = xTaskGetTickCount();
|
||||
|
||||
if (value & 0b10000) {
|
||||
// TICK
|
||||
if (time - last_time >= pdMS_TO_TICKS(2)) {
|
||||
want_repaint |= Liquid_handleTick(liquid, time - last_time);
|
||||
last_time = time;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user