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
+4 -4
View File
@@ -1,6 +1,6 @@
#include "Brainfuck.h" #include "Brainfuck.h"
#include <tt_app.h> #include <tt_app.h>
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
#include <dirent.h> #include <dirent.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@@ -399,11 +399,11 @@ void Brainfuck::onShow(AppHandle app, lv_obj_t* parent) {
lv_obj_remove_flag(parent, LV_OBJ_FLAG_SCROLLABLE); lv_obj_remove_flag(parent, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
lv_obj_t* toolbar = tt_lvgl_toolbar_create_for_app(parent, app); lv_obj_t* toolbar = lvgl_toolbar_create(parent, "Brainfuck interpreter");
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0); lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
clrBtn = tt_lvgl_toolbar_add_text_button_action(toolbar, LV_SYMBOL_TRASH, onClearClicked, nullptr); clrBtn = lvgl_toolbar_add_text_button_action(toolbar, LV_SYMBOL_TRASH, onClearClicked, nullptr);
lv_obj_add_flag(clrBtn, LV_OBJ_FLAG_HIDDEN); lv_obj_add_flag(clrBtn, LV_OBJ_FLAG_HIDDEN);
tt_lvgl_toolbar_add_text_button_action(toolbar, LV_SYMBOL_LIST, onExamplesClicked, nullptr); lvgl_toolbar_add_text_button_action(toolbar, LV_SYMBOL_LIST, onExamplesClicked, nullptr);
lv_obj_t* cont = lv_obj_create(parent); lv_obj_t* cont = lv_obj_create(parent);
lv_obj_set_width(cont, LV_PCT(100)); lv_obj_set_width(cont, LV_PCT(100));
+2 -2
View File
@@ -2,7 +2,7 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32,esp32s3,esp32c6,esp32p4 target.platforms=esp32,esp32s3,esp32c6,esp32p4
app.id=one.tactility.brainfuck app.id=one.tactility.brainfuck
app.version.name=0.5.0 app.version.name=0.6.0
app.version.code=5 app.version.code=6
app.name=Brainfuck interpreter app.name=Brainfuck interpreter
app.description=Brainfuck esoteric language interpreter app.description=Brainfuck esoteric language interpreter
+6 -5
View File
@@ -7,13 +7,14 @@
#include <cstdio> #include <cstdio>
#include <cmath> #include <cmath>
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
#include <tt_preferences.h> #include <tt_preferences.h>
#include <esp_random.h> #include <esp_random.h>
#include <tt_lvgl_keyboard.h> #include <tactility/device.h>
#include <tactility/drivers/keyboard.h>
#include <lvgl/lvgl.h> #include <lvgl/lvgl.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
constexpr auto* TAG = "Breakout"; constexpr auto* TAG = "Breakout";
@@ -128,7 +129,7 @@ void Breakout::onShow(AppHandle appHandle, lv_obj_t* parent) {
} }
// Toolbar // Toolbar
lv_obj_t* toolbar = tt_lvgl_toolbar_create_for_app(parent, appHandle); lv_obj_t* toolbar = lvgl_toolbar_create(parent, "Breakout");
// Score wrapper in toolbar // Score wrapper in toolbar
lv_obj_t* scoreWrap = lv_obj_create(toolbar); lv_obj_t* scoreWrap = lv_obj_create(toolbar);
@@ -1329,7 +1330,7 @@ void Breakout::updateMessage() {
case GameState::Ready: { case GameState::Ready: {
char buf[64]; char buf[64];
const char* input_hint = "Touch"; const char* input_hint = "Touch";
if (tt_lvgl_hardware_keyboard_is_available()) { if (device_has_active_by_type(&KEYBOARD_TYPE)) {
input_hint = "Space"; input_hint = "Space";
} }
if (level > 1) { if (level > 1) {
+2 -2
View File
@@ -2,7 +2,7 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32,esp32s3,esp32c6,esp32p4 target.platforms=esp32,esp32s3,esp32c6,esp32p4
app.id=one.tactility.breakout app.id=one.tactility.breakout
app.version.name=0.6.0 app.version.name=0.7.0
app.version.code=6 app.version.code=7
app.name=Breakout app.name=Breakout
app.description=Classic brick-breaking arcade game app.description=Classic brick-breaking arcade game
+2 -2
View File
@@ -2,7 +2,7 @@
#include <cstdio> #include <cstdio>
#include <ctype.h> #include <ctype.h>
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
#include <stack> #include <stack>
#include <cstring> #include <cstring>
@@ -148,7 +148,7 @@ void Calculator::onShow(AppHandle appHandle, lv_obj_t* parent) {
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT); lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT);
lv_obj_t* toolbar = tt_lvgl_toolbar_create_for_app(parent, appHandle); lv_obj_t* toolbar = lvgl_toolbar_create(parent, "Calculator");
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0); lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
lv_obj_t* wrapper = lv_obj_create(parent); lv_obj_t* wrapper = lv_obj_create(parent);
+2 -2
View File
@@ -2,6 +2,6 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32,esp32s3,esp32c6,esp32p4 target.platforms=esp32,esp32s3,esp32c6,esp32p4
app.id=one.tactility.calculator app.id=one.tactility.calculator
app.version.name=0.6.0 app.version.name=0.7.0
app.version.code=6 app.version.code=7
app.name=Calculator app.name=Calculator
+8 -9
View File
@@ -1,9 +1,9 @@
#include "Diceware.h" #include "Diceware.h"
#include <tt_app_alertdialog.h> #include <tt_app_alertdialog.h>
#include <tt_lock.h> #include <tactility/filesystem/file_mutex.h>
#include <lvgl/lvgl.h> #include <lvgl/lvgl.h>
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
#include <esp_random.h> #include <esp_random.h>
#include <esp_log.h> #include <esp_log.h>
@@ -39,18 +39,17 @@ static std::string readWordAtLine(const AppHandle handle, const int lineIndex) {
return ""; return "";
} }
auto lock = tt_lock_alloc_for_path(path); struct FileMutex mutex;
file_mutex_get(&mutex, path);
std::string word; std::string word;
if (tt_lock_acquire(lock, tt::kernel::MAX_TICKS)) { file_mutex_lock(&mutex);
FILE* file = fopen(path, "r"); FILE* file = fopen(path, "r");
if (file != nullptr) { if (file != nullptr) {
skipNewlines(file, lineIndex); skipNewlines(file, lineIndex);
word = readWord(file); word = readWord(file);
fclose(file); fclose(file);
} else { ESP_LOGE(TAG, "Failed to open %s", path); } } else { ESP_LOGE(TAG, "Failed to open %s", path); }
tt_lock_release(lock); file_mutex_unlock(&mutex);
} else { ESP_LOGE(TAG, "Failed to acquire lock for %s", path); }
tt_lock_free(lock);
return word; return word;
} }
@@ -123,8 +122,8 @@ void Diceware::onShow(AppHandle appHandle, lv_obj_t* parent) {
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT); lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT);
auto* toolbar = tt_lvgl_toolbar_create_for_app(parent, appHandle); auto* toolbar = lvgl_toolbar_create(parent, "Diceware");
tt_lvgl_toolbar_add_text_button_action(toolbar, "?", onHelpClicked, nullptr); lvgl_toolbar_add_text_button_action(toolbar, "?", onHelpClicked, nullptr);
auto* wrapper = lv_obj_create(parent); auto* wrapper = lv_obj_create(parent);
lv_obj_set_style_border_width(wrapper, 0, LV_STATE_DEFAULT); lv_obj_set_style_border_width(wrapper, 0, LV_STATE_DEFAULT);
+2 -2
View File
@@ -2,6 +2,6 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32,esp32s3,esp32c6,esp32p4 target.platforms=esp32,esp32s3,esp32c6,esp32p4
app.id=one.tactility.diceware app.id=one.tactility.diceware
app.version.name=0.7.0 app.version.name=0.8.0
app.version.code=7 app.version.code=8
app.name=Diceware app.name=Diceware
+2 -2
View File
@@ -1,7 +1,7 @@
#include "EpubReader.h" #include "EpubReader.h"
#include "HtmlStrip.h" // stripHtmlToText #include "HtmlStrip.h" // stripHtmlToText
#include <tt_bundle.h> #include <tt_bundle.h>
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
#include <tt_app_alertdialog.h> #include <tt_app_alertdialog.h>
#include <tt_app_selectiondialog.h> #include <tt_app_selectiondialog.h>
#include <tactility/log.h> #include <tactility/log.h>
@@ -239,7 +239,7 @@ void EpubReader::onShow(AppHandle app, lv_obj_t* parent) {
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
lv_obj_remove_flag(parent, LV_OBJ_FLAG_SCROLLABLE); lv_obj_remove_flag(parent, LV_OBJ_FLAG_SCROLLABLE);
toolbar_ = tt_lvgl_toolbar_create_for_app(parent, app); toolbar_ = lvgl_toolbar_create(parent, "Epub Reader");
wrapperWidget_ = lv_obj_create(parent); wrapperWidget_ = lv_obj_create(parent);
lv_obj_set_width(wrapperWidget_, LV_PCT(100)); lv_obj_set_width(wrapperWidget_, LV_PCT(100));
@@ -1,6 +1,6 @@
#include "EpubReader.h" #include "EpubReader.h"
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
#include <tt_lock.h> #include <tactility/filesystem/file_mutex.h>
#include <tactility/log.h> #include <tactility/log.h>
#include <Tactility/kernel/Kernel.h> #include <Tactility/kernel/Kernel.h>
#include <freertos/FreeRTOS.h> #include <freertos/FreeRTOS.h>
@@ -43,7 +43,7 @@ void EpubReader::spawnOpenTask(EpubReader* self, bool restore) {
// Show a brief placeholder so old content doesn't linger during the open // Show a brief placeholder so old content doesn't linger during the open
lv_obj_clean(self->wrapperWidget_); lv_obj_clean(self->wrapperWidget_);
tt_lvgl_toolbar_clear_actions(self->toolbar_); lvgl_toolbar_clear_actions(self->toolbar_);
lv_obj_t* lbl = lv_label_create(self->wrapperWidget_); lv_obj_t* lbl = lv_label_create(self->wrapperWidget_);
lv_obj_set_style_pad_all(lbl, 8, 0); lv_obj_set_style_pad_all(lbl, 8, 0);
lv_label_set_text(lbl, restore ? "Loading..." : "Opening..."); lv_label_set_text(lbl, restore ? "Loading..." : "Opening...");
@@ -115,14 +115,9 @@ void EpubReader::backgroundOpenTask(void* data) {
// Acquire the filesystem lock before any SD card I/O - prevents concurrent // Acquire the filesystem lock before any SD card I/O - prevents concurrent
// SDMMC access from the background and LVGL tasks (bus errors 0x107/0x108). // SDMMC access from the background and LVGL tasks (bus errors 0x107/0x108).
auto lock = tt_lock_alloc_for_path(a->filePath.c_str()); struct FileMutex mutex;
if (!tt_lock_acquire(lock, tt::kernel::MAX_TICKS)) { file_mutex_get(&mutex, a->filePath.c_str());
LOG_E(TAG, "FS lock timed out, skipping open: %s", a->filePath.c_str()); file_mutex_lock(&mutex);
tt_lock_free(lock);
lv_async_call(asyncOpenComplete, a);
vTaskDelete(nullptr);
return;
}
if (isTextFile(a->filePath)) { if (isTextFile(a->filePath)) {
// Read the entire text file here (under the lock) so asyncOpenComplete // Read the entire text file here (under the lock) so asyncOpenComplete
@@ -146,8 +141,7 @@ void EpubReader::backgroundOpenTask(void* data) {
a->epub = EpubService::open(a->filePath); a->epub = EpubService::open(a->filePath);
} }
tt_lock_release(lock); file_mutex_unlock(&mutex);
tt_lock_free(lock);
// Signal the LVGL task that the work is done // Signal the LVGL task that the work is done
lv_async_call(asyncOpenComplete, a); lv_async_call(asyncOpenComplete, a);
+8 -8
View File
@@ -1,5 +1,5 @@
#include "EpubReader.h" #include "EpubReader.h"
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
#include <tactility/log.h> #include <tactility/log.h>
#include <esp_heap_caps.h> #include <esp_heap_caps.h>
#include <dirent.h> #include <dirent.h>
@@ -37,20 +37,20 @@ static void setListBtnLongMode(lv_obj_t* btn, lv_label_long_mode_t mode) {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
void EpubReader::setReaderToolbarButtons() { void EpubReader::setReaderToolbarButtons() {
tt_lvgl_toolbar_clear_actions(toolbar_); lvgl_toolbar_clear_actions(toolbar_);
tt_lvgl_toolbar_add_text_button_action(toolbar_, LV_SYMBOL_PREV, onPrevPressed, this); lvgl_toolbar_add_text_button_action(toolbar_, LV_SYMBOL_PREV, onPrevPressed, this);
if (!textMode_) { if (!textMode_) {
tt_lvgl_toolbar_add_text_button_action(toolbar_, LV_SYMBOL_LIST, onTocPressed, this); lvgl_toolbar_add_text_button_action(toolbar_, LV_SYMBOL_LIST, onTocPressed, this);
} }
tt_lvgl_toolbar_add_text_button_action(toolbar_, LV_SYMBOL_NEXT, onNextPressed, this); lvgl_toolbar_add_text_button_action(toolbar_, LV_SYMBOL_NEXT, onNextPressed, this);
tt_lvgl_toolbar_add_text_button_action(toolbar_, LV_SYMBOL_DIRECTORY, onBrowsePressed, this); lvgl_toolbar_add_text_button_action(toolbar_, LV_SYMBOL_DIRECTORY, onBrowsePressed, this);
} }
void EpubReader::setBrowserToolbarButtons() { void EpubReader::setBrowserToolbarButtons() {
tt_lvgl_toolbar_clear_actions(toolbar_); lvgl_toolbar_clear_actions(toolbar_);
// Show "Use Folder" button when the current browse path isn't already the saved books folder // Show "Use Folder" button when the current browse path isn't already the saved books folder
if (browsePath_ != booksPath_) { if (browsePath_ != booksPath_) {
tt_lvgl_toolbar_add_text_button_action(toolbar_, LV_SYMBOL_DIRECTORY, onSetBooksFolder, this); lvgl_toolbar_add_text_button_action(toolbar_, LV_SYMBOL_DIRECTORY, onSetBooksFolder, this);
} }
} }
+2 -2
View File
@@ -2,7 +2,7 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32s3,esp32p4 target.platforms=esp32s3,esp32p4
app.id=one.tactility.epubreader app.id=one.tactility.epubreader
app.version.name=0.4.0 app.version.name=0.5.0
app.version.code=4 app.version.code=5
app.name=Epub Reader app.name=Epub Reader
app.description=Epub and text file reader. Requires PSRAM! app.description=Epub and text file reader. Requires PSRAM!
@@ -8,9 +8,8 @@
#include <tt_app.h> #include <tt_app.h>
#include <tt_app_fileselection.h> #include <tt_app_fileselection.h>
#include <tt_bundle.h> #include <tt_bundle.h>
#include <tt_lock.h>
#include <lvgl/lvgl.h> #include <lvgl/lvgl.h>
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
#include <esp_app_desc.h> #include <esp_app_desc.h>
#include <esp_app_format.h> #include <esp_app_format.h>
@@ -656,7 +655,7 @@ void EspNowBridge::onShow(AppHandle app, lv_obj_t* parent) {
lv_obj_remove_flag(parent, LV_OBJ_FLAG_SCROLLABLE); lv_obj_remove_flag(parent, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
lv_obj_t* toolbar = tt_lvgl_toolbar_create_for_app(parent, app); lv_obj_t* toolbar = lvgl_toolbar_create(parent, "ESP-NOW Bridge");
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0); lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
auto* wrapper = lv_obj_create(parent); auto* wrapper = lv_obj_create(parent);
+2 -2
View File
@@ -2,7 +2,7 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32p4 target.platforms=esp32p4
app.id=one.tactility.espnowbridge app.id=one.tactility.espnowbridge
app.version.name=0.2.0 app.version.name=0.3.0
app.version.code=2 app.version.code=3
app.name=ESP-NOW Bridge app.name=ESP-NOW Bridge
app.description=Companion app for updating P4 device C6 co-processor firmware to enable ESP-NOW bridge support. app.description=Companion app for updating P4 device C6 co-processor firmware to enable ESP-NOW bridge support.
+2 -2
View File
@@ -2,7 +2,7 @@
#include <Tactility/kernel/Kernel.h> #include <Tactility/kernel/Kernel.h>
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
#include <lvgl/lvgl.h> #include <lvgl/lvgl.h>
@@ -78,7 +78,7 @@ void Gpio::onShow(AppHandle app, lv_obj_t* parent) {
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT); lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT);
auto* toolbar = tt_lvgl_toolbar_create_for_app(parent, app); auto* toolbar = lvgl_toolbar_create(parent, "GPIO");
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0); lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
// Main content wrapper, enables scrolling content without scrolling the toolbar // Main content wrapper, enables scrolling content without scrolling the toolbar
+2 -2
View File
@@ -2,6 +2,6 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32,esp32s3,esp32c6,esp32p4 target.platforms=esp32,esp32s3,esp32c6,esp32p4
app.id=one.tactility.gpio app.id=one.tactility.gpio
app.version.name=0.8.0 app.version.name=0.9.0
app.version.code=8 app.version.code=9
app.name=GPIO app.name=GPIO
+2 -2
View File
@@ -2,6 +2,6 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32,esp32s3,esp32c6,esp32p4 target.platforms=esp32,esp32s3,esp32c6,esp32p4
app.id=one.tactility.graphicsdemo app.id=one.tactility.graphicsdemo
app.version.name=0.6.0 app.version.name=0.7.0
app.version.code=6 app.version.code=7
app.name=Graphics Demo app.name=Graphics Demo
+2 -2
View File
@@ -1,12 +1,12 @@
#include <tt_app.h> #include <tt_app.h>
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
/** /**
* Note: LVGL and Tactility methods need to be exposed manually from TactilityC/Source/tt_init.cpp * Note: LVGL and Tactility methods need to be exposed manually from TactilityC/Source/tt_init.cpp
* Only C is supported for now (C++ symbols fail to link) * Only C is supported for now (C++ symbols fail to link)
*/ */
static void onShowApp(AppHandle app, void* data, lv_obj_t* parent) { static void onShowApp(AppHandle app, void* data, lv_obj_t* parent) {
lv_obj_t* toolbar = tt_lvgl_toolbar_create_for_app(parent, app); lv_obj_t* toolbar = lvgl_toolbar_create(parent, "Hello World");
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0); lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
lv_obj_t* label = lv_label_create(parent); lv_obj_t* label = lv_label_create(parent);
+2 -2
View File
@@ -2,6 +2,6 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32,esp32s3,esp32c6,esp32p4 target.platforms=esp32,esp32s3,esp32c6,esp32p4
app.id=one.tactility.helloworld app.id=one.tactility.helloworld
app.version.name=0.6.0 app.version.name=0.7.0
app.version.code=6 app.version.code=7
app.name=Hello World app.name=Hello World
@@ -14,7 +14,6 @@
#include "TestUnitLcdGfx.h" #include "TestUnitLcdGfx.h"
#include <tactility/device.h> #include <tactility/device.h>
#include <tt_lvgl_toolbar.h>
#include <esp_log.h> #include <esp_log.h>
constexpr auto* TAG = "M5UnitTest"; constexpr auto* TAG = "M5UnitTest";
+3 -3
View File
@@ -1,13 +1,13 @@
#include "TestListView.h" #include "TestListView.h"
#include "M5UnitTest.h" #include "M5UnitTest.h"
#include "UiScale.h" #include "UiScale.h"
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
void TestListView::onStart(lv_obj_t* parent, AppHandle handle, M5UnitTest* app) { void TestListView::onStart(lv_obj_t* parent, AppHandle handle, M5UnitTest* app) {
app_ = app; app_ = app;
tt_lvgl_toolbar_create_for_app(parent, handle); lvgl_toolbar_create(parent, "M5 Unit Test");
list_ = lv_list_create(parent); list_ = lv_list_create(parent);
lv_obj_set_width(list_, LV_PCT(100)); lv_obj_set_width(list_, LV_PCT(100));
+1 -1
View File
@@ -2,7 +2,7 @@
#include <array> #include <array>
#include <lvgl.h> #include <lvgl.h>
#include <lvgl/lvgl_icon_shared.h> #include <lvgl/icons/shared.h>
#include <tt_app.h> #include <tt_app.h>
class M5UnitTest; class M5UnitTest;
@@ -2,7 +2,7 @@
#include "GroveLookup.h" #include "GroveLookup.h"
#include "UiScale.h" #include "UiScale.h"
#include <tactility/device.h> #include <tactility/device.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
#include <cstring> #include <cstring>
@@ -2,7 +2,7 @@
#include "GroveLookup.h" #include "GroveLookup.h"
#include "UiScale.h" #include "UiScale.h"
#include <tactility/device.h> #include <tactility/device.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
#include <cstring> #include <cstring>
void TestUnitByteButton::onStart(lv_obj_t* parent, AppHandle handle, M5UnitTest* app) { void TestUnitByteButton::onStart(lv_obj_t* parent, AppHandle handle, M5UnitTest* app) {
@@ -3,7 +3,7 @@
#include "UiScale.h" #include "UiScale.h"
#include <tactility/device.h> #include <tactility/device.h>
#include <tactility/drivers/uart_controller.h> #include <tactility/drivers/uart_controller.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
#include <cstring> #include <cstring>
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@@ -1,7 +1,7 @@
#include "TestUnitDualButton.h" #include "TestUnitDualButton.h"
#include "UiScale.h" #include "UiScale.h"
#include <tactility/device.h> #include <tactility/device.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
static constexpr gpio_pin_t PIN_MIN = 0; static constexpr gpio_pin_t PIN_MIN = 0;
static constexpr gpio_pin_t PIN_MAX = 57; static constexpr gpio_pin_t PIN_MAX = 57;
@@ -2,7 +2,7 @@
#include "GroveLookup.h" #include "GroveLookup.h"
#include "UiScale.h" #include "UiScale.h"
#include <tactility/device.h> #include <tactility/device.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
+1 -1
View File
@@ -2,7 +2,7 @@
#include "GroveLookup.h" #include "GroveLookup.h"
#include "UiScale.h" #include "UiScale.h"
#include <tactility/device.h> #include <tactility/device.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
void TestUnitLcd::onStart(lv_obj_t* parent, AppHandle handle, M5UnitTest* app) { void TestUnitLcd::onStart(lv_obj_t* parent, AppHandle handle, M5UnitTest* app) {
app_ = app; app_ = app;
@@ -2,7 +2,7 @@
#include "GroveLookup.h" #include "GroveLookup.h"
#include "UiScale.h" #include "UiScale.h"
#include <tactility/device.h> #include <tactility/device.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
#include <esp_timer.h> #include <esp_timer.h>
#include <cstring> #include <cstring>
#include <cstdio> #include <cstdio>
+1 -1
View File
@@ -2,7 +2,7 @@
#include "GroveLookup.h" #include "GroveLookup.h"
#include "UiScale.h" #include "UiScale.h"
#include <tactility/device.h> #include <tactility/device.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
void TestUnitMidi::onStart(lv_obj_t* parent, AppHandle handle, M5UnitTest* app) { void TestUnitMidi::onStart(lv_obj_t* parent, AppHandle handle, M5UnitTest* app) {
app_ = app; app_ = app;
@@ -3,7 +3,7 @@
#include "UiScale.h" #include "UiScale.h"
#include <tactility/device.h> #include <tactility/device.h>
#include <tactility/drivers/i2c_controller.h> #include <tactility/drivers/i2c_controller.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
void TestUnitPaHub::onStart(lv_obj_t* parent, AppHandle handle, M5UnitTest* app) { void TestUnitPaHub::onStart(lv_obj_t* parent, AppHandle handle, M5UnitTest* app) {
app_ = app; app_ = app;
@@ -2,8 +2,7 @@
#include "GroveLookup.h" #include "GroveLookup.h"
#include "UiScale.h" #include "UiScale.h"
#include <tactility/device.h> #include <tactility/device.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
#include <tt_lvgl_toolbar.h>
#include <algorithm> #include <algorithm>
#include <cstdio> #include <cstdio>
#include <cstring> #include <cstring>
@@ -2,7 +2,7 @@
#include "GroveLookup.h" #include "GroveLookup.h"
#include "UiScale.h" #include "UiScale.h"
#include <tactility/device.h> #include <tactility/device.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
void TestUnitScroll::onStart(lv_obj_t* parent, AppHandle handle, M5UnitTest* app) { void TestUnitScroll::onStart(lv_obj_t* parent, AppHandle handle, M5UnitTest* app) {
app_ = app; app_ = app;
+4 -5
View File
@@ -1,13 +1,12 @@
#include "TestViewBase.h" #include "TestViewBase.h"
#include "M5UnitTest.h" #include "M5UnitTest.h"
#include "UiScale.h" #include "UiScale.h"
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
lv_obj_t* TestViewBase::createToolbar(lv_obj_t* parent, AppHandle handle, const char* title) { lv_obj_t* TestViewBase::createToolbar(lv_obj_t* parent, AppHandle handle, const char* title) {
lv_obj_t* toolbar = tt_lvgl_toolbar_create_for_app(parent, handle); lv_obj_t* toolbar = lvgl_toolbar_create(parent, title);
tt_lvgl_toolbar_set_title(toolbar, title); lvgl_toolbar_add_text_button_action(toolbar, LV_SYMBOL_LEFT, onBackClicked, this);
tt_lvgl_toolbar_add_text_button_action(toolbar, LV_SYMBOL_LEFT, onBackClicked, this);
return toolbar; return toolbar;
} }
+1 -1
View File
@@ -1,6 +1,6 @@
#pragma once #pragma once
#include <lvgl.h> #include <lvgl.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
// Device screen widths in default (portrait) orientation: // Device screen widths in default (portrait) orientation:
// tiny < 200 : small OLEDs, custom breadboard devices // tiny < 200 : small OLEDs, custom breadboard devices
+2 -2
View File
@@ -2,6 +2,6 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32s3,esp32p4 target.platforms=esp32s3,esp32p4
app.id=one.tactility.m5unittest app.id=one.tactility.m5unittest
app.version.name=0.4.0 app.version.name=0.5.0
app.version.code=4 app.version.code=5
app.name=M5 Unit Test app.name=M5 Unit Test
+7 -6
View File
@@ -1,6 +1,7 @@
#include "Magic8Ball.h" #include "Magic8Ball.h"
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
#include <tt_lvgl_keyboard.h> #include <tactility/device.h>
#include <tactility/drivers/keyboard.h>
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
@@ -35,7 +36,7 @@ static const char* responses[] = {
#define NUM_RESPONSES (sizeof(responses) / sizeof(responses[0])) #define NUM_RESPONSES (sizeof(responses) / sizeof(responses[0]))
static const char* getInputHint() { 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 or Space to ask Q to exit";
} }
return "Touch the ball to ask"; 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); lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
/* Toolbar */ /* 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); lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
/* Main container */ /* 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); lv_obj_add_event_cb(ballObj, onBallClick, LV_EVENT_CLICKED, this);
/* Keyboard support - no editing mode needed, just focus the ball */ /* 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(); lv_group_t* grp = lv_group_get_default();
if (grp) { if (grp) {
lv_group_add_obj(grp, ballObj); lv_group_add_obj(grp, ballObj);
@@ -152,7 +153,7 @@ void Magic8Ball::onShow(AppHandle app, lv_obj_t* parent) {
} }
void Magic8Ball::onHide(AppHandle app) { 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); lv_group_remove_obj(ballObj);
} }
answerLabel = nullptr; answerLabel = nullptr;
+2 -2
View File
@@ -2,6 +2,6 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32,esp32s3,esp32c6,esp32p4 target.platforms=esp32,esp32s3,esp32c6,esp32p4
app.id=one.tactility.magic8ball app.id=one.tactility.magic8ball
app.version.name=0.5.0 app.version.name=0.6.0
app.version.code=5 app.version.code=6
app.name=Magic 8-Ball app.name=Magic 8-Ball
+9 -9
View File
@@ -4,9 +4,9 @@
#include <esp_heap_caps.h> #include <esp_heap_caps.h>
#include <freertos/FreeRTOS.h> #include <freertos/FreeRTOS.h>
#include <freertos/task.h> #include <freertos/task.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
#include <lvgl/lvgl.h> #include <lvgl/lvgl.h>
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
static const char* TAG = "MediaKeys"; static const char* TAG = "MediaKeys";
@@ -165,7 +165,7 @@ void MediaKeys::btEventCallback(struct Device* /*device*/, void* context, struct
// Radio dropped while we were active - revert UI // Radio dropped while we were active - revert UI
LOG_I(TAG, "BT radio turned off, disabling HID"); LOG_I(TAG, "BT radio turned off, disabling HID");
if (lvgl_try_lock(1000)) { if (lvgl_try_lock(1000)) {
if (tt_lvgl_hardware_keyboard_is_available()) self->exitKeyMode(); if (device_has_active_by_type(&KEYBOARD_TYPE)) self->exitKeyMode();
self->_hidDevice = nullptr; self->_hidDevice = nullptr;
self->_isEnabled = false; self->_isEnabled = false;
self->_radioEnabling = false; self->_radioEnabling = false;
@@ -208,7 +208,7 @@ void MediaKeys::startHid() {
} }
if (_mainWrapper) lv_obj_remove_flag(_mainWrapper, LV_OBJ_FLAG_HIDDEN); if (_mainWrapper) lv_obj_remove_flag(_mainWrapper, LV_OBJ_FLAG_HIDDEN);
if (tt_lvgl_hardware_keyboard_is_available()) enterKeyMode(); if (device_has_active_by_type(&KEYBOARD_TYPE)) enterKeyMode();
} }
void MediaKeys::teardownBt() { void MediaKeys::teardownBt() {
@@ -276,7 +276,7 @@ void MediaKeys::handleSwitchToggle(bool enabled) {
} }
} else { } else {
_radioEnabling = false; _radioEnabling = false;
if (tt_lvgl_hardware_keyboard_is_available()) exitKeyMode(); if (device_has_active_by_type(&KEYBOARD_TYPE)) exitKeyMode();
// Explicit user toggle-off: stop HID cleanly (safe here since we're on the // Explicit user toggle-off: stop HID cleanly (safe here since we're on the
// LVGL task and the user intentionally disabled, so no race with app teardown). // LVGL task and the user intentionally disabled, so no race with app teardown).
if (_hidDevice) bluetooth_hid_device_stop(_hidDevice); if (_hidDevice) bluetooth_hid_device_stop(_hidDevice);
@@ -307,10 +307,10 @@ void MediaKeys::onShow(AppHandle appHandle, lv_obj_t* parent) {
lv_obj_remove_flag(parent, LV_OBJ_FLAG_SCROLLABLE); lv_obj_remove_flag(parent, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
lv_obj_t* toolbar = tt_lvgl_toolbar_create_for_app(parent, appHandle); lv_obj_t* toolbar = lvgl_toolbar_create(parent, "Media Keys");
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0); lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
_switchWidget = tt_lvgl_toolbar_add_switch_action(toolbar); _switchWidget = lvgl_toolbar_add_switch_action(toolbar);
lv_obj_add_event_cb(_switchWidget, onSwitchToggled, LV_EVENT_VALUE_CHANGED, this); lv_obj_add_event_cb(_switchWidget, onSwitchToggled, LV_EVENT_VALUE_CHANGED, this);
_mainWrapper = lv_obj_create(parent); _mainWrapper = lv_obj_create(parent);
@@ -342,7 +342,7 @@ void MediaKeys::onShow(AppHandle appHandle, lv_obj_t* parent) {
lv_obj_add_event_cb(_buttonMatrix, onButtonPressed, LV_EVENT_VALUE_CHANGED, this); lv_obj_add_event_cb(_buttonMatrix, onButtonPressed, LV_EVENT_VALUE_CHANGED, this);
// Physical keyboard support: key events on the matrix (entered when BT enabled, Q/Esc exits) // Physical keyboard support: key events on the matrix (entered when BT enabled, Q/Esc exits)
if (tt_lvgl_hardware_keyboard_is_available()) { if (device_has_active_by_type(&KEYBOARD_TYPE)) {
lv_obj_add_event_cb(_buttonMatrix, onKeyEvent, LV_EVENT_KEY, this); lv_obj_add_event_cb(_buttonMatrix, onKeyEvent, LV_EVENT_KEY, this);
_keyHighlightTimer = lv_timer_create(onKeyHighlightTimer, 150, this); _keyHighlightTimer = lv_timer_create(onKeyHighlightTimer, 150, this);
lv_timer_pause(_keyHighlightTimer); lv_timer_pause(_keyHighlightTimer);
@@ -364,7 +364,7 @@ void MediaKeys::onShow(AppHandle appHandle, lv_obj_t* parent) {
void MediaKeys::onHide(AppHandle /*appHandle*/) { void MediaKeys::onHide(AppHandle /*appHandle*/) {
_radioEnabling = false; _radioEnabling = false;
_isEnabled = false; _isEnabled = false;
if (tt_lvgl_hardware_keyboard_is_available()) exitKeyMode(); if (device_has_active_by_type(&KEYBOARD_TYPE)) exitKeyMode();
teardownBt(); teardownBt();
if (_keyHighlightTimer) { if (_keyHighlightTimer) {
lv_timer_delete(_keyHighlightTimer); lv_timer_delete(_keyHighlightTimer);
+1 -1
View File
@@ -5,8 +5,8 @@
#include <tactility/device.h> #include <tactility/device.h>
#include <tactility/drivers/bluetooth.h> #include <tactility/drivers/bluetooth.h>
#include <tactility/drivers/bluetooth_hid_device.h> #include <tactility/drivers/bluetooth_hid_device.h>
#include <tactility/drivers/keyboard.h>
#include <tt_app.h> #include <tt_app.h>
#include <tt_lvgl_keyboard.h>
#include <atomic> #include <atomic>
class MediaKeys final : public App { class MediaKeys final : public App {
+2 -2
View File
@@ -2,7 +2,7 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32s3,esp32p4 target.platforms=esp32s3,esp32p4
app.id=one.tactility.mediakeys app.id=one.tactility.mediakeys
app.version.name=0.5.0 app.version.name=0.6.0
app.version.code=5 app.version.code=6
app.name=Media Keys app.name=Media Keys
app.description=Bluetooth media keys. Touch or Physical Keyboard control\nB - previous, P - play/pause, N - next, M - mute, D - volume down, U - volume up.\nQ or ESC to exit focus. app.description=Bluetooth media keys. Touch or Physical Keyboard control\nB - previous, P - play/pause, N - next, M - mute, D - volume down, U - volume up.\nQ or ESC to exit focus.
+2 -2
View File
@@ -2,6 +2,6 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32,esp32s3,esp32c6,esp32p4 target.platforms=esp32,esp32s3,esp32c6,esp32p4
app.id=one.tactility.mystifydemo app.id=one.tactility.mystifydemo
app.version.name=0.7.0 app.version.name=0.8.0
app.version.code=7 app.version.code=8
app.name=Mystify Demo app.name=Mystify Demo
@@ -1,5 +1,5 @@
#include "SerialConsole.h" #include "SerialConsole.h"
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
constexpr auto* TAG = "SerialMonitor"; constexpr auto* TAG = "SerialMonitor";
@@ -43,9 +43,9 @@ void SerialConsole::onShow(AppHandle appHandle, lv_obj_t* parent) {
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT); lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT);
auto* toolbar = tt_lvgl_toolbar_create_for_app(parent, appHandle); auto* toolbar = lvgl_toolbar_create(parent, "Serial Console");
disconnectButton = tt_lvgl_toolbar_add_image_button_action(toolbar, LV_SYMBOL_POWER, onDisconnectPressed, this); disconnectButton = lvgl_toolbar_add_image_button_action(toolbar, LV_SYMBOL_POWER, onDisconnectPressed, this);
lv_obj_add_flag(disconnectButton, LV_OBJ_FLAG_HIDDEN); lv_obj_add_flag(disconnectButton, LV_OBJ_FLAG_HIDDEN);
wrapperWidget = lv_obj_create(parent); wrapperWidget = lv_obj_create(parent);
+2 -2
View File
@@ -2,6 +2,6 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32,esp32s3,esp32c6,esp32p4 target.platforms=esp32,esp32s3,esp32c6,esp32p4
app.id=one.tactility.serialconsole app.id=one.tactility.serialconsole
app.version.name=0.8.0 app.version.name=0.9.0
app.version.code=8 app.version.code=9
app.name=Serial Console app.name=Serial Console
+3 -3
View File
@@ -5,7 +5,7 @@
#include "Snake.h" #include "Snake.h"
#include <inttypes.h> #include <inttypes.h>
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
#include <tt_app_alertdialog.h> #include <tt_app_alertdialog.h>
#include <tt_app_selectiondialog.h> #include <tt_app_selectiondialog.h>
#include <tt_preferences.h> #include <tt_preferences.h>
@@ -13,7 +13,7 @@
#include <TactilityCpp/LvglLock.h> #include <TactilityCpp/LvglLock.h>
#include <lvgl/lvgl.h> #include <lvgl/lvgl.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
constexpr auto* TAG = "Snake"; constexpr auto* TAG = "Snake";
@@ -245,7 +245,7 @@ void Snake::onShow(AppHandle appHandle, lv_obj_t* parent) {
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
// Create toolbar // Create toolbar
toolbar = tt_lvgl_toolbar_create_for_app(parent, appHandle); toolbar = lvgl_toolbar_create(parent, "Snake");
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0); lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
// Create main wrapper // Create main wrapper
+4 -3
View File
@@ -7,7 +7,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include <tt_lvgl_keyboard.h> #include <tactility/device.h>
#include <tactility/drivers/keyboard.h>
// Forward declarations // Forward declarations
static void game_play_event(lv_event_t* e); static void game_play_event(lv_event_t* e);
@@ -36,7 +37,7 @@ static void delete_event(lv_event_t* e) {
} }
// Restore edit mode and remove from group before cleanup // Restore edit mode and remove from group before cleanup
if (tt_lvgl_hardware_keyboard_is_available()) { if (device_has_active_by_type(&KEYBOARD_TYPE)) {
lv_group_t* group = lv_group_get_default(); lv_group_t* group = lv_group_get_default();
if (group) lv_group_set_editing(group, false); if (group) lv_group_set_editing(group, false);
lv_group_remove_obj(game->container); lv_group_remove_obj(game->container);
@@ -397,7 +398,7 @@ lv_obj_t* snake_create(lv_obj_t* parent, uint16_t cell_size, bool wall_collision
lv_obj_add_event_cb(obj, delete_event, LV_EVENT_DELETE, NULL); lv_obj_add_event_cb(obj, delete_event, LV_EVENT_DELETE, NULL);
// Set up keyboard focus if available // Set up keyboard focus if available
if (tt_lvgl_hardware_keyboard_is_available()) { if (device_has_active_by_type(&KEYBOARD_TYPE)) {
lv_group_t* group = lv_group_get_default(); lv_group_t* group = lv_group_get_default();
if (group) { if (group) {
lv_group_add_obj(group, game->container); lv_group_add_obj(group, game->container);
+2 -2
View File
@@ -2,7 +2,7 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32,esp32s3,esp32c6,esp32p4 target.platforms=esp32,esp32s3,esp32c6,esp32p4
app.id=one.tactility.snake app.id=one.tactility.snake
app.version.name=0.9.0 app.version.name=0.10.0
app.version.code=9 app.version.code=10
app.name=Snake app.name=Snake
app.description=Classic Snake game app.description=Classic Snake game
+5 -5
View File
@@ -5,7 +5,7 @@
#include "TamaTac.h" #include "TamaTac.h"
#include "SpriteData.h" #include "SpriteData.h"
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
#include <tt_app_alertdialog.h> #include <tt_app_alertdialog.h>
#include <Tactility/kernel/Kernel.h> #include <Tactility/kernel/Kernel.h>
#include <freertos/FreeRTOS.h> #include <freertos/FreeRTOS.h>
@@ -86,11 +86,11 @@ void TamaTac::onShow(AppHandle context, lv_obj_t* parent) {
lv_obj_set_style_pad_all(parent, 0, 0); lv_obj_set_style_pad_all(parent, 0, 0);
lv_obj_set_style_pad_row(parent, 0, 0); lv_obj_set_style_pad_row(parent, 0, 0);
toolbar = tt_lvgl_toolbar_create_for_app(parent, context); toolbar = lvgl_toolbar_create(parent, "TamaTac");
menuButton = tt_lvgl_toolbar_add_text_button_action(toolbar, LV_SYMBOL_LIST, onMenuClicked, this); menuButton = lvgl_toolbar_add_text_button_action(toolbar, LV_SYMBOL_LIST, onMenuClicked, this);
tt_lvgl_toolbar_add_text_button_action(toolbar, LV_SYMBOL_TRASH, onCleanClicked, this); lvgl_toolbar_add_text_button_action(toolbar, LV_SYMBOL_TRASH, onCleanClicked, this);
tt_lvgl_toolbar_add_text_button_action(toolbar, LV_SYMBOL_REFRESH, onResetClicked, this); lvgl_toolbar_add_text_button_action(toolbar, LV_SYMBOL_REFRESH, onResetClicked, this);
wrapperWidget = lv_obj_create(parent); wrapperWidget = lv_obj_create(parent);
lv_obj_set_width(wrapperWidget, LV_PCT(100)); lv_obj_set_width(wrapperWidget, LV_PCT(100));
+2 -2
View File
@@ -2,7 +2,7 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32,esp32s3,esp32c6,esp32p4 target.platforms=esp32,esp32s3,esp32c6,esp32p4
app.id=one.tactility.tamatac app.id=one.tactility.tamatac
app.version.name=0.4.0 app.version.name=0.5.0
app.version.code=4 app.version.code=5
app.name=TamaTac app.name=TamaTac
app.description=Virtual pet inspired by Tamagotchi. Only runs on devices with PSRAM. app.description=Virtual pet inspired by Tamagotchi. Only runs on devices with PSRAM.
+12 -17
View File
@@ -1,11 +1,10 @@
#include "TodoList.h" #include "TodoList.h"
#include <tt_app.h> #include <tt_app.h>
#include <tt_lock.h> #include <tactility/filesystem/file_mutex.h>
#include <Tactility/kernel/Kernel.h> #include <Tactility/kernel/Kernel.h>
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
#include <tt_lvgl_keyboard.h>
#include <lvgl/lvgl.h> #include <lvgl/lvgl.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@@ -60,9 +59,9 @@ void TodoList::saveTodos() {
char savePath[256]; char savePath[256];
if (!getSaveFilePath(savePath, sizeof(savePath))) return; if (!getSaveFilePath(savePath, sizeof(savePath))) return;
auto lock = tt_lock_alloc_for_path(savePath); struct FileMutex mutex;
if (!lock) return; file_mutex_get(&mutex, savePath);
if (tt_lock_acquire(lock, tt::kernel::MAX_TICKS)) { file_mutex_lock(&mutex);
FILE* f = fopen(savePath, "w"); FILE* f = fopen(savePath, "w");
if (f) { if (f) {
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
@@ -70,19 +69,17 @@ void TodoList::saveTodos() {
} }
fclose(f); fclose(f);
} }
tt_lock_release(lock); file_mutex_unlock(&mutex);
}
tt_lock_free(lock);
} }
void TodoList::loadTodos() { void TodoList::loadTodos() {
char savePath[256]; char savePath[256];
if (!getSaveFilePath(savePath, sizeof(savePath))) return; if (!getSaveFilePath(savePath, sizeof(savePath))) return;
auto lock = tt_lock_alloc_for_path(savePath); struct FileMutex mutex;
if (!lock) return; file_mutex_get(&mutex, savePath);
if (tt_lock_acquire(lock, tt::kernel::MAX_TICKS)) { file_mutex_lock(&mutex);
count = 0; count = 0;
FILE* f = fopen(savePath, "r"); FILE* f = fopen(savePath, "r");
if (f) { if (f) {
@@ -103,9 +100,7 @@ void TodoList::loadTodos() {
} }
fclose(f); fclose(f);
} }
tt_lock_release(lock); file_mutex_unlock(&mutex);
}
tt_lock_free(lock);
} }
/* ── UI Helpers ───────────────────────────────────────────────────── */ /* ── UI Helpers ───────────────────────────────────────────────────── */
@@ -277,7 +272,7 @@ void TodoList::onShow(AppHandle app, lv_obj_t* parent) {
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
/* Toolbar */ /* Toolbar */
lv_obj_t* toolbar = tt_lvgl_toolbar_create_for_app(parent, app); lv_obj_t* toolbar = lvgl_toolbar_create(parent, "Todo List");
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0); lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
lv_obj_t* countWrapper = lv_obj_create(toolbar); lv_obj_t* countWrapper = lv_obj_create(toolbar);
+2 -2
View File
@@ -2,7 +2,7 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32,esp32s3,esp32c6,esp32p4 target.platforms=esp32,esp32s3,esp32c6,esp32p4
app.id=one.tactility.todolist app.id=one.tactility.todolist
app.version.name=0.6.0 app.version.name=0.7.0
app.version.code=6 app.version.code=7
app.name=Todo List app.name=Todo List
app.description=Simple task list manager app.description=Simple task list manager
+3 -3
View File
@@ -5,12 +5,12 @@
#include "TwoEleven.h" #include "TwoEleven.h"
#include <inttypes.h> #include <inttypes.h>
#include <tt_lvgl_toolbar.h> #include <lvgl/widgets/toolbar.h>
#include <tt_app_alertdialog.h> #include <tt_app_alertdialog.h>
#include <tt_app_selectiondialog.h> #include <tt_app_selectiondialog.h>
#include <tt_preferences.h> #include <tt_preferences.h>
#include <lvgl/lvgl.h> #include <lvgl/lvgl.h>
#include <lvgl/lvgl_fonts.h> #include <lvgl/fonts.h>
#include <TactilityCpp/LvglLock.h> #include <TactilityCpp/LvglLock.h>
constexpr auto* TAG = "TwoEleven"; constexpr auto* TAG = "TwoEleven";
@@ -257,7 +257,7 @@ void TwoEleven::onShow(AppHandle appHandle, lv_obj_t* parent) {
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
// Create toolbar // Create toolbar
toolbar = tt_lvgl_toolbar_create_for_app(parent, appHandle); toolbar = lvgl_toolbar_create(parent, "2048");
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0); lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
// Create main wrapper // Create main wrapper
+4 -3
View File
@@ -3,7 +3,8 @@
#include "TwoElevenHelpers.h" #include "TwoElevenHelpers.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <tt_lvgl_keyboard.h> #include <tactility/device.h>
#include <tactility/drivers/keyboard.h>
static void game_play_event(lv_event_t * e); static void game_play_event(lv_event_t * e);
static void btnm_event_cb(lv_event_t * e); static void btnm_event_cb(lv_event_t * e);
@@ -18,7 +19,7 @@ static void delete_event(lv_event_t * e)
twoeleven_t * game_2048 = (twoeleven_t *)lv_obj_get_user_data(obj); twoeleven_t * game_2048 = (twoeleven_t *)lv_obj_get_user_data(obj);
if (game_2048) { if (game_2048) {
// Restore edit mode and remove from group before cleanup // Restore edit mode and remove from group before cleanup
if (tt_lvgl_hardware_keyboard_is_available()) { if (device_has_active_by_type(&KEYBOARD_TYPE)) {
lv_group_t* group = lv_group_get_default(); lv_group_t* group = lv_group_get_default();
if (group) lv_group_set_editing(group, false); if (group) lv_group_set_editing(group, false);
lv_group_remove_obj(game_2048->btnm); lv_group_remove_obj(game_2048->btnm);
@@ -140,7 +141,7 @@ lv_obj_t * twoeleven_create(lv_obj_t * parent, uint16_t matrix_size)
lv_obj_add_event_cb(game_2048->btnm, btnm_event_cb, LV_EVENT_DRAW_TASK_ADDED, NULL); lv_obj_add_event_cb(game_2048->btnm, btnm_event_cb, LV_EVENT_DRAW_TASK_ADDED, NULL);
lv_obj_add_event_cb(obj, delete_event, LV_EVENT_DELETE, NULL); lv_obj_add_event_cb(obj, delete_event, LV_EVENT_DELETE, NULL);
if (tt_lvgl_hardware_keyboard_is_available()) { if (device_has_active_by_type(&KEYBOARD_TYPE)) {
lv_group_t* group = lv_group_get_default(); lv_group_t* group = lv_group_get_default();
if (group) { if (group) {
lv_group_add_obj(group, game_2048->btnm); lv_group_add_obj(group, game_2048->btnm);
+2 -2
View File
@@ -2,7 +2,7 @@ manifest.version=0.2
target.sdk=0.8.0-dev target.sdk=0.8.0-dev
target.platforms=esp32,esp32s3,esp32c6,esp32p4 target.platforms=esp32,esp32s3,esp32c6,esp32p4
app.id=one.tactility.twoeleven app.id=one.tactility.twoeleven
app.version.name=0.8.0 app.version.name=0.9.0
app.version.code=8 app.version.code=9
app.name=2048 app.name=2048
app.description=A fun, customizable 2048 sliding tile game for tactility!\nSlide tiles to combine numbers and reach 2048.\nChoose grid sizes: 3x3 (easy), 4x4 (classic), 5x5, or 6x6 (expert). app.description=A fun, customizable 2048 sliding tile game for tactility!\nSlide tiles to combine numbers and reach 2048.\nChoose grid sizes: 3x3 (easy), 4x4 (classic), 5x5, or 6x6 (expert).