Update apps for SDK updates (#38)

The updates mainly relate to lvgl-module changes.
This commit is contained in:
Ken Van Hoeylandt
2026-07-26 17:20:01 +02:00
committed by GitHub
parent 4f635d38e3
commit b1e7eb999a
54 changed files with 178 additions and 190 deletions
+7 -6
View File
@@ -1,6 +1,7 @@
#include "Magic8Ball.h"
#include <tt_lvgl_toolbar.h>
#include <tt_lvgl_keyboard.h>
#include <lvgl/widgets/toolbar.h>
#include <tactility/device.h>
#include <tactility/drivers/keyboard.h>
#include <stdlib.h>
#include <time.h>
@@ -35,7 +36,7 @@ static const char* responses[] = {
#define NUM_RESPONSES (sizeof(responses) / sizeof(responses[0]))
static const char* getInputHint() {
if (tt_lvgl_hardware_keyboard_is_available()) {
if (device_has_active_by_type(&KEYBOARD_TYPE)) {
return "Touch or Space to ask Q to exit";
}
return "Touch the ball to ask";
@@ -92,7 +93,7 @@ void Magic8Ball::onShow(AppHandle app, lv_obj_t* parent) {
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
/* Toolbar */
lv_obj_t* toolbar = tt_lvgl_toolbar_create_for_app(parent, app);
lv_obj_t* toolbar = lvgl_toolbar_create(parent, "Magic 8-Ball");
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
/* Main container */
@@ -141,7 +142,7 @@ void Magic8Ball::onShow(AppHandle app, lv_obj_t* parent) {
lv_obj_add_event_cb(ballObj, onBallClick, LV_EVENT_CLICKED, this);
/* Keyboard support - no editing mode needed, just focus the ball */
if (tt_lvgl_hardware_keyboard_is_available()) {
if (device_has_active_by_type(&KEYBOARD_TYPE)) {
lv_group_t* grp = lv_group_get_default();
if (grp) {
lv_group_add_obj(grp, ballObj);
@@ -152,7 +153,7 @@ void Magic8Ball::onShow(AppHandle app, lv_obj_t* parent) {
}
void Magic8Ball::onHide(AppHandle app) {
if (tt_lvgl_hardware_keyboard_is_available() && ballObj) {
if (device_has_active_by_type(&KEYBOARD_TYPE) && ballObj) {
lv_group_remove_obj(ballObj);
}
answerLabel = nullptr;
+2 -2
View File
@@ -2,6 +2,6 @@ manifest.version=0.2
target.sdk=0.8.0-dev
target.platforms=esp32,esp32s3,esp32c6,esp32p4
app.id=one.tactility.magic8ball
app.version.name=0.5.0
app.version.code=5
app.version.name=0.6.0
app.version.code=6
app.name=Magic 8-Ball