Simplify app registration with TactilityCpp (#7)

- Simplified app registration with a C++ wrapper for the TactilityC.
- Rename the various app classes from `Application` to more specific names like `Calculator` etc.
This commit is contained in:
Ken Van Hoeylandt
2025-10-05 22:38:26 +02:00
committed by GitHub
parent e1579d3cbd
commit b39bd6b6f5
12 changed files with 117 additions and 114 deletions
+34
View File
@@ -0,0 +1,34 @@
#pragma once
#include <TactilityCpp/App.h>
#include <tt_app.h>
#include <tt_mutex.h>
#include <tt_timer.h>
#include <lvgl.h>
#include <vector>
class Gpio final : public App {
std::vector<lv_obj_t*> pinWidgets;
std::vector<bool> pinStates;
TimerHandle timer;
MutexHandle mutex;
static lv_obj_t* createGpioRowWrapper(lv_obj_t* parent);
static void onTimer(void* parameter);
public:
void onCreate(AppHandle app) override;
void onDestroy(AppHandle app) override;
void onShow(AppHandle context, lv_obj_t* parent) override;
void onHide(AppHandle context) override;
void startTask();
void stopTask();
void updatePinStates();
void updatePinWidgets();
};