Add checks

This commit is contained in:
Ken Van Hoeylandt 2026-08-24 22:19:22 +02:00
parent 13a8c5b017
commit bc0fd4859e
43 changed files with 134 additions and 86 deletions

View File

@ -11,6 +11,7 @@
#include <lvgl/icons/shared.h>
#include <lvgl/widgets/toolbar.h>
#include <tactility/check.h>
#include <tactility/drivers/uart_controller.h>
#include <tactility/log.h>
@ -209,7 +210,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -234,7 +235,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -7,6 +7,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/log.h>
#include <lvgl.h>
@ -108,7 +109,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -127,7 +128,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return ctx.result;

View File

@ -16,6 +16,7 @@
#include <Tactility/file/File.h>
#include <Tactility/lvgl/Style.h>
#include <tactility/check.h>
#include <tactility/log.h>
constexpr auto* TAG = "AppDetails";
@ -120,7 +121,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -151,7 +152,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -14,6 +14,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/log.h>
#include <lvgl/lvgl.h>
@ -207,7 +208,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create_ext(appInstanceId, createWidgets, destroyWidgets, &ctx);
@ -229,7 +230,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -18,6 +18,7 @@
#include <lvgl/lvgl.h>
#include <lvgl/widgets/toolbar.h>
#include <tactility/check.h>
#include <tactility/log.h>
#include <atomic>
@ -236,7 +237,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -270,7 +271,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -5,6 +5,8 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <lvgl.h>
#include <algorithm>
#include <cstring>
@ -87,7 +89,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, nullptr);
@ -106,7 +108,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;
}

View File

@ -10,6 +10,8 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <lvgl/widgets/toolbar.h>
#include <lvgl.h>
#include <algorithm>
@ -96,7 +98,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, nullptr);
@ -118,7 +120,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -13,6 +13,7 @@
#include <lvgl.h>
#include <lvgl/widgets/toolbar.h>
#include <tactility/check.h>
#include <tactility/log.h>
namespace tt::app::apwebserver {
@ -132,7 +133,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -173,7 +174,7 @@ int32_t appMain(int argc, char* argv[]) {
});
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -9,6 +9,8 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <lvgl/lvgl.h>
#include <lvgl/widgets/sliderbox.h>
#include <lvgl/widgets/toolbar.h>
@ -221,7 +223,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -248,7 +250,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -1,5 +1,6 @@
#include "tactility/system_event.h"
#include <tactility/check.h>
#include <tactility/delay.h>
#include <tactility/drivers/backlight.h>
#include <tactility/drivers/display.h>
@ -298,7 +299,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
bootWindowId = window_manager_create(appInstanceId, createSplashWidgets, nullptr);
@ -324,7 +325,7 @@ int32_t appMain(int argc, char* argv[]) {
if (bootWindowId != 0) {
window_manager_remove(bootWindowId);
}
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -12,6 +12,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/log.h>
namespace tt::app::btmanage {
@ -226,7 +227,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -276,7 +277,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -15,6 +15,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/device.h>
#include <tactility/drivers/bluetooth.h>
#include <tactility/log.h>
@ -205,7 +206,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -246,7 +247,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -14,6 +14,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/log.h>
#include <lvgl/lvgl.h>
@ -191,7 +192,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -213,7 +214,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
service::espnow::unsubscribeReceiver(ctx.receiveSubscription);

View File

@ -14,6 +14,7 @@
#include <lvgl.h>
#include <qrcode.h>
#include <tactility/check.h>
#include <tactility/drivers/pointer.h>
#include <tactility/log.h>
@ -159,7 +160,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -183,7 +184,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
bool continuePressed = ctx.continuePressed;

View File

@ -14,6 +14,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/log.h>
#include <lvgl.h>
@ -180,7 +181,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -222,7 +223,7 @@ int32_t appMain(int argc, char* argv[]) {
lvgl_unlock();
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -1,4 +1,5 @@
#include <lvgl/lvgl.h>
#include <tactility/check.h>
#include <tactility/device.h>
#include <tactility/drivers/backlight.h>
#include <tactility/drivers/display.h>
@ -313,7 +314,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -336,7 +337,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -8,6 +8,8 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <memory>
namespace tt::app::files {
@ -36,7 +38,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &createContext);
@ -63,7 +65,7 @@ int32_t appMain(int argc, char* argv[]) {
view.deinit();
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -9,6 +9,8 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <memory>
#include <string>
@ -68,7 +70,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -87,7 +89,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return ctx.result;

View File

@ -13,6 +13,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/device.h>
#include <tactility/time.h>
@ -273,7 +274,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
ctx.timer->start();
@ -317,7 +318,7 @@ int32_t appMain(int argc, char* argv[]) {
ctx.timer->stop();
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -2,6 +2,7 @@
#include <lvgl.h>
#include <tactility/check.h>
#include <tactility/device.h>
#include <tactility/drivers/grove.h>
@ -99,7 +100,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -121,7 +122,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -13,6 +13,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/drivers/i2c_controller.h>
#include <tactility/log.h>
#include <tactility/preferences.h>
@ -394,7 +395,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -417,7 +418,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -95,7 +95,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -117,7 +117,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -8,6 +8,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <lvgl/widgets/toolbar.h>
#include <tactility/check.h>
#include <tactility/log.h>
#include <lvgl.h>
@ -117,7 +118,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -136,7 +137,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return ctx.result;

View File

@ -11,6 +11,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/device.h>
#include <tactility/drivers/backlight.h>
@ -215,7 +216,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -238,7 +239,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -15,6 +15,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/device.h>
#include <tactility/drivers/power_supply.h>
#include <tactility/log.h>
@ -240,7 +241,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, nullptr);
@ -261,7 +262,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;
}

View File

@ -13,6 +13,8 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <lvgl/widgets/toolbar.h>
#include <lvgl.h>
@ -151,7 +153,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -173,7 +175,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -12,6 +12,7 @@
#include <lvgl.h>
#include <lvgl/lvgl.h>
#include <lvgl/widgets/toolbar.h>
#include <tactility/check.h>
#include <tactility/log.h>
namespace tt::app::notes {
@ -196,7 +197,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -240,7 +241,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -8,6 +8,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/device.h>
#include <tactility/drivers/power_supply.h>
#include <tactility/time.h>
@ -246,7 +247,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
ctx.timer->start();
@ -270,7 +271,7 @@ int32_t appMain(int argc, char* argv[]) {
ctx.timer->stop();
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -10,6 +10,7 @@
#include <lvgl.h>
#include <lvgl/fonts.h>
#include <tactility/check.h>
#include <tactility/device.h>
#include <tactility/drivers/power_supply.h>
@ -142,7 +143,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -164,7 +165,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -16,6 +16,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/log.h>
#include <lvgl.h>
@ -256,7 +257,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -282,7 +283,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -7,6 +7,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/log.h>
#include <lvgl.h>
@ -110,7 +111,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -129,7 +130,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return ctx.result;

View File

@ -85,7 +85,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, nullptr);
@ -104,7 +104,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;
}

View File

@ -15,6 +15,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/log.h>
#include <lvgl/fonts.h>
@ -235,7 +236,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -264,7 +265,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -1,3 +1,4 @@
#include <tactility/check.h>
#include "tactility/time.h"
#include <Tactility/DeprecatedPaths.h>
@ -423,7 +424,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
ctx.memoryTimer->start(); // Memory: every 10s
@ -449,7 +450,7 @@ int32_t appMain(int argc, char* argv[]) {
ctx.memoryTimer->stop();
ctx.tasksTimer->stop();
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -10,6 +10,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/log.h>
#include <lvgl/lvgl.h>
@ -163,7 +164,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -200,7 +201,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -13,6 +13,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/log.h>
#include <lvgl/lvgl.h>
@ -246,7 +247,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
ctx.updateTimer->start();
@ -267,7 +268,7 @@ int32_t appMain(int argc, char* argv[]) {
ctx.updateTimer->stop();
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return ctx.result;

View File

@ -12,6 +12,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/log.h>
#include <lvgl/lvgl.h>
#include <lvgl/devices/pointer.h>
@ -239,7 +240,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -261,7 +262,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
// finishCalibration() already applied a new calibration on success. On cancel/failure,

View File

@ -5,6 +5,7 @@
#include <lvgl/lvgl.h>
#include <lvgl/widgets/toolbar.h>
#include <tactility/check.h>
#include <tactility/drivers/trackball.h>
#include <Tactility/Assets.h>
@ -278,7 +279,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -301,7 +302,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -7,6 +7,8 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <lvgl.h>
#include <lvgl/widgets/toolbar.h>
@ -91,7 +93,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -113,7 +115,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -12,6 +12,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/log.h>
#include <lvgl.h>
@ -368,7 +369,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
WindowId window = window_manager_create(appInstanceId, createWidgets, &ctx);
@ -428,7 +429,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -13,6 +13,7 @@
#include <lvgl/lvgl.h>
#include <lvgl/widgets/toolbar.h>
#include <tactility/check.h>
#include <tactility/device.h>
#include <tactility/log.h>
@ -227,7 +228,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
Device* wifi_device = nullptr;
if (device_get_first_by_type(&WIFI_TYPE, &wifi_device) == ERROR_NONE) {
@ -309,7 +310,7 @@ int32_t appMain(int argc, char* argv[]) {
device_put(ctx.wifiDevice);
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -15,6 +15,7 @@
#include <lvgl/widgets/spinner.h>
#include <lvgl/widgets/toolbar.h>
#include <tactility/check.h>
#include <tactility/device.h>
#include <tactility/log.h>
@ -313,7 +314,7 @@ int32_t appMain(int argc, char* argv[]) {
task_event_group_construct(&event_group);
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
Device* wifi_device = nullptr;
if (device_get_first_by_type(&WIFI_TYPE, &wifi_device) == ERROR_NONE) {
@ -370,7 +371,7 @@ int32_t appMain(int argc, char* argv[]) {
device_put(ctx.wifiDevice);
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;

View File

@ -11,6 +11,7 @@
#include <lvgl_window_manager/window_manager.h>
#include <tactility/check.h>
#include <tactility/device.h>
#include <tactility/log.h>
@ -147,7 +148,7 @@ int32_t appMain(int argc, char* argv[]) {
}
AppEventSubscription sub {};
app_event_subscribe(&sub, &event_group);
check(app_event_subscribe(&sub, &event_group) == ERROR_NONE);
Device* wifi_device = nullptr;
if (device_get_first_by_type(&WIFI_TYPE, &wifi_device) == ERROR_NONE) {
@ -229,7 +230,7 @@ int32_t appMain(int argc, char* argv[]) {
}
window_manager_remove(window);
app_event_unsubscribe(&sub);
check(app_event_unsubscribe(&sub) == ERROR_NONE);
task_event_group_destruct(&event_group);
return 0;