mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-08-17 23:55:04 +00:00
Module improvements: lvgl, gps, crypt (#585)
This commit is contained in:
parent
ca5b071859
commit
db7468d0c8
@ -1,7 +1,7 @@
|
|||||||
#include <tactility/delay.h>
|
#include <tactility/delay.h>
|
||||||
#include <tactility/error.h>
|
#include <tactility/error.h>
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
#include <tactility/module.h>
|
#include <tactility/module.h>
|
||||||
|
|
||||||
#include <Tactility/SystemEvents.h>
|
#include <Tactility/SystemEvents.h>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <tactility/error.h>
|
#include <tactility/error.h>
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
#include <Tactility/SystemEvents.h>
|
#include <Tactility/SystemEvents.h>
|
||||||
#include <Tactility/LogMessages.h>
|
#include <Tactility/LogMessages.h>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
#include <tactility/module.h>
|
#include <tactility/module.h>
|
||||||
|
|
||||||
#include <Tactility/SystemEvents.h>
|
#include <Tactility/SystemEvents.h>
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
#include <tactility/drivers/i2c_controller.h>
|
#include <tactility/drivers/i2c_controller.h>
|
||||||
#include <tactility/drivers/keyboard.h>
|
#include <tactility/drivers/keyboard.h>
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
#include <tactility/module.h>
|
#include <tactility/module.h>
|
||||||
|
|
||||||
#include <driver/gpio.h>
|
#include <driver/gpio.h>
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
## Higher Priority
|
## Higher Priority
|
||||||
|
|
||||||
|
- Improve kernel_init.cpp (and other modules): create driver_ensure_added() and driver_ensure_destructed()
|
||||||
- Remove and migrate `Include/Tactility/kernel/Kernel.h` into `tactility/delay.h`
|
- Remove and migrate `Include/Tactility/kernel/Kernel.h` into `tactility/delay.h`
|
||||||
- Drivers/audio-codec-module is not a module. Move it somewhere else. Or make it an actual module.
|
- Drivers/audio-codec-module is not a module. Move it somewhere else. Or make it an actual module.
|
||||||
- LilyGO T-Dongle S3: 1 button control, stop auto-launching web server
|
- LilyGO T-Dongle S3: 1 button control, stop auto-launching web server
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <tactility/module.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
#include <tactility/crypt.h>
|
#include <crypt/crypt.h>
|
||||||
|
|
||||||
#include <tactility/check.h>
|
#include <tactility/check.h>
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
#include <tactility/hash.h>
|
#include <crypt/hash.h>
|
||||||
|
|
||||||
uint32_t djb2_str(const char* str) {
|
uint32_t djb2_str(const char* str) {
|
||||||
uint32_t hash = 5381;
|
uint32_t hash = 5381;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
#include <tactility/crypt.h>
|
#include <crypt/crypt.h>
|
||||||
#include <tactility/hash.h>
|
#include <crypt/hash.h>
|
||||||
#include <tactility/module.h>
|
#include <crypt/module.h>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
#include <gps/gps_module.h>
|
#include <gps/module.h>
|
||||||
#include <gps/private/gps_ledger.h>
|
#include <gps/private/gps_ledger.h>
|
||||||
|
|
||||||
#include <tactility/error.h>
|
#include <tactility/error.h>
|
||||||
|
|||||||
@ -1,21 +1,13 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/**
|
#include <stdint.h>
|
||||||
* @file lvgl_module.h
|
#include <stdbool.h>
|
||||||
* @brief LVGL module for Tactility.
|
|
||||||
*
|
|
||||||
* This module manages the lifecycle of the LVGL library, including initialization,
|
|
||||||
* task management, and thread-safety.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
/** Affects LVGL widget style */
|
/** Affects LVGL widget style */
|
||||||
enum UiDensity {
|
enum UiDensity {
|
||||||
/** Ideal for very small non-touch screen devices (e.g. Waveshare S3 LCD 1.3") */
|
/** Ideal for very small non-touch screen devices (e.g. Waveshare S3 LCD 1.3") */
|
||||||
@ -24,47 +16,6 @@ enum UiDensity {
|
|||||||
LVGL_UI_DENSITY_DEFAULT
|
LVGL_UI_DENSITY_DEFAULT
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief The LVGL module instance.
|
|
||||||
*/
|
|
||||||
extern struct Module lvgl_module;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Configuration for the LVGL module.
|
|
||||||
*/
|
|
||||||
struct LvglModuleConfig {
|
|
||||||
/**
|
|
||||||
* @brief Callback invoked when the LVGL task starts.
|
|
||||||
* Use this to add devices (e.g. displays, pointers), start services, create widgets, etc.
|
|
||||||
*/
|
|
||||||
void (*on_start)(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Callback invoked when the LVGL task stops.
|
|
||||||
* Use this to remove devices, stop services, etc.
|
|
||||||
*/
|
|
||||||
void (*on_stop)(void);
|
|
||||||
|
|
||||||
/** @brief Priority of the LVGL task. */
|
|
||||||
int task_priority;
|
|
||||||
|
|
||||||
/** @brief Stack size of the LVGL task in bytes. */
|
|
||||||
int task_stack_size;
|
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
|
||||||
/** @brief CPU affinity of the LVGL task (ESP32 specific). */
|
|
||||||
int task_affinity;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Configures the LVGL module.
|
|
||||||
*
|
|
||||||
* @warning This must be called before starting the module.
|
|
||||||
* @param config The configuration to apply.
|
|
||||||
*/
|
|
||||||
void lvgl_module_configure(struct LvglModuleConfig config);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Locks the LVGL mutex.
|
* @brief Locks the LVGL mutex.
|
||||||
*
|
*
|
||||||
@ -1,10 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
@ -13,6 +9,10 @@ extern "C" {
|
|||||||
#include <tactility/device.h>
|
#include <tactility/device.h>
|
||||||
#include <tactility/error.h>
|
#include <tactility/error.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Configuration for binding a kernel DisplayApi device to an lv_display_t.
|
* @brief Configuration for binding a kernel DisplayApi device to an lv_display_t.
|
||||||
*/
|
*/
|
||||||
@ -14,17 +14,17 @@ enum LvglFontSize {
|
|||||||
FONT_SIZE_LARGE,
|
FONT_SIZE_LARGE,
|
||||||
};
|
};
|
||||||
|
|
||||||
const lv_font_t* lvgl_get_shared_icon_font();
|
const lv_font_t* lvgl_get_shared_icon_font(void);
|
||||||
uint32_t lvgl_get_shared_icon_font_height();
|
uint32_t lvgl_get_shared_icon_font_height(void);
|
||||||
|
|
||||||
const lv_font_t* lvgl_get_text_font(enum LvglFontSize font_size);
|
const lv_font_t* lvgl_get_text_font(enum LvglFontSize font_size);
|
||||||
uint32_t lvgl_get_text_font_height(enum LvglFontSize font_size);
|
uint32_t lvgl_get_text_font_height(enum LvglFontSize font_size);
|
||||||
|
|
||||||
const lv_font_t* lvgl_get_launcher_icon_font();
|
const lv_font_t* lvgl_get_launcher_icon_font(void);
|
||||||
uint32_t lvgl_get_launcher_icon_font_height();
|
uint32_t lvgl_get_launcher_icon_font_height(void);
|
||||||
|
|
||||||
const lv_font_t* lvgl_get_statusbar_icon_font();
|
const lv_font_t* lvgl_get_statusbar_icon_font(void);
|
||||||
uint32_t lvgl_get_statusbar_icon_font_height();
|
uint32_t lvgl_get_statusbar_icon_font_height(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
@ -1,15 +1,15 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
#include <tactility/device.h>
|
#include <tactility/device.h>
|
||||||
#include <tactility/error.h>
|
#include <tactility/error.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates an lv_indev_t bound to the given KEYBOARD_TYPE device and registers a read callback
|
* @brief Creates an lv_indev_t bound to the given KEYBOARD_TYPE device and registers a read callback
|
||||||
* that polls the device through its KeyboardApi.
|
* that polls the device through its KeyboardApi.
|
||||||
@ -1,15 +1,18 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
#include <tactility/device.h>
|
#include <tactility/device.h>
|
||||||
#include <tactility/error.h>
|
#include <tactility/error.h>
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Linear per-axis calibration range for raw pointer coordinates.
|
* @brief Linear per-axis calibration range for raw pointer coordinates.
|
||||||
*
|
*
|
||||||
51
Modules/lvgl-module/include/lvgl/module.h
Normal file
51
Modules/lvgl-module/include/lvgl/module.h
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The LVGL module instance.
|
||||||
|
*/
|
||||||
|
extern struct Module lvgl_module;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Configuration for the LVGL module.
|
||||||
|
*/
|
||||||
|
struct LvglModuleConfig {
|
||||||
|
/**
|
||||||
|
* @brief Callback invoked when the LVGL task starts.
|
||||||
|
* Use this to add devices (e.g. displays, pointers), start services, create widgets, etc.
|
||||||
|
*/
|
||||||
|
void (*on_start)(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Callback invoked when the LVGL task stops.
|
||||||
|
* Use this to remove devices, stop services, etc.
|
||||||
|
*/
|
||||||
|
void (*on_stop)(void);
|
||||||
|
|
||||||
|
/** @brief Priority of the LVGL task. */
|
||||||
|
int task_priority;
|
||||||
|
|
||||||
|
/** @brief Stack size of the LVGL task in bytes. */
|
||||||
|
int task_stack_size;
|
||||||
|
|
||||||
|
#ifdef ESP_PLATFORM
|
||||||
|
/** @brief CPU affinity of the LVGL task (ESP32 specific). */
|
||||||
|
int task_affinity;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Configures the LVGL module.
|
||||||
|
*
|
||||||
|
* @warning This must be called before starting the module.
|
||||||
|
* @param config The configuration to apply.
|
||||||
|
*/
|
||||||
|
void lvgl_module_configure(struct LvglModuleConfig config);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@ -3,9 +3,10 @@
|
|||||||
|
|
||||||
#include <esp_lvgl_port.h>
|
#include <esp_lvgl_port.h>
|
||||||
|
|
||||||
#include <tactility/time.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
#include <lvgl/module.h>
|
||||||
#include <tactility/error.h>
|
#include <tactility/error.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <tactility/time.h>
|
||||||
|
|
||||||
extern struct LvglModuleConfig lvgl_module_config;
|
extern struct LvglModuleConfig lvgl_module_config;
|
||||||
extern void lvgl_devices_attach();
|
extern void lvgl_devices_attach();
|
||||||
|
|||||||
@ -10,7 +10,8 @@
|
|||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
#include <lvgl/module.h>
|
||||||
|
|
||||||
extern struct LvglModuleConfig lvgl_module_config;
|
extern struct LvglModuleConfig lvgl_module_config;
|
||||||
extern void lvgl_devices_attach();
|
extern void lvgl_devices_attach();
|
||||||
|
|||||||
6
Modules/lvgl-module/source/lvgl.c
Normal file
6
Modules/lvgl-module/source/lvgl.c
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
|
enum UiDensity lvgl_get_ui_density(void) {
|
||||||
|
return TT_LVGL_UI_DENSITY;
|
||||||
|
}
|
||||||
@ -3,10 +3,10 @@
|
|||||||
#include <tactility/drivers/keyboard.h>
|
#include <tactility/drivers/keyboard.h>
|
||||||
#include <tactility/drivers/pointer.h>
|
#include <tactility/drivers/pointer.h>
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_display.h>
|
#include <lvgl/lvgl_display.h>
|
||||||
#include <tactility/lvgl_keyboard.h>
|
#include <lvgl/lvgl_keyboard.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
#include <tactility/lvgl_pointer.h>
|
#include <lvgl/lvgl_pointer.h>
|
||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
#include <tactility/lvgl_display.h>
|
#include <lvgl/lvgl_display.h>
|
||||||
|
|
||||||
#include <tactility/lvgl_ppa.h>
|
#include <lvgl/lvgl_ppa.h>
|
||||||
|
|
||||||
#include <tactility/device.h>
|
#include <tactility/device.h>
|
||||||
#include <tactility/driver.h>
|
#include <tactility/driver.h>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
#include <tactility/lvgl_fonts.h>
|
#include <lvgl/lvgl_fonts.h>
|
||||||
#include <tactility/check.h>
|
#include <tactility/check.h>
|
||||||
|
|
||||||
// The preprocessor definitions that are used below are defined in the CMakeLists.txt from this module.
|
// The preprocessor definitions that are used below are defined in the CMakeLists.txt from this module.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
#include <tactility/lvgl_keyboard.h>
|
#include <lvgl/lvgl_keyboard.h>
|
||||||
|
|
||||||
#include <tactility/drivers/keyboard.h>
|
#include <tactility/drivers/keyboard.h>
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
#include <tactility/lvgl_pointer.h>
|
#include <lvgl/lvgl_pointer.h>
|
||||||
|
|
||||||
#include <tactility/drivers/pointer.h>
|
#include <tactility/drivers/pointer.h>
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
#include <tactility/lvgl_ppa.h>
|
#include <lvgl/lvgl_ppa.h>
|
||||||
|
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
#include <lvgl.h>
|
#include <lvgl/module.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <tactility/module.h>
|
#include <tactility/module.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
extern const struct ModuleSymbol lvgl_module_symbols[];
|
extern const struct ModuleSymbol lvgl_module_symbols[];
|
||||||
error_t lvgl_arch_start();
|
error_t lvgl_arch_start();
|
||||||
@ -60,10 +60,6 @@ bool lvgl_is_running() {
|
|||||||
return is_running;
|
return is_running;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum UiDensity lvgl_get_ui_density(void) {
|
|
||||||
return TT_LVGL_UI_DENSITY;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct Module lvgl_module = {
|
struct Module lvgl_module = {
|
||||||
.name = "lvgl",
|
.name = "lvgl",
|
||||||
.start = start,
|
.start = start,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
#include <tactility/lvgl_fonts.h>
|
#include <lvgl/lvgl_fonts.h>
|
||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
#include <tactility/module.h>
|
#include <tactility/module.h>
|
||||||
|
|||||||
@ -20,11 +20,12 @@
|
|||||||
#include <Tactility/service/audio/Audio.h>
|
#include <Tactility/service/audio/Audio.h>
|
||||||
#include <Tactility/settings/TimePrivate.h>
|
#include <Tactility/settings/TimePrivate.h>
|
||||||
|
|
||||||
#include <gps/gps_module.h>
|
#include <gps/module.h>
|
||||||
#include <gps_generic/gps_generic_module.h>
|
#include <gps_generic/gps_generic_module.h>
|
||||||
|
|
||||||
|
#include <crypt/module.h>
|
||||||
|
#include <lvgl/module.h>
|
||||||
#include <tactility/concurrent/thread.h>
|
#include <tactility/concurrent/thread.h>
|
||||||
#include <tactility/crypt_module.h>
|
|
||||||
#include <tactility/drivers/audio_stream.h>
|
#include <tactility/drivers/audio_stream.h>
|
||||||
#include <tactility/drivers/display.h>
|
#include <tactility/drivers/display.h>
|
||||||
#include <tactility/drivers/grove.h>
|
#include <tactility/drivers/grove.h>
|
||||||
@ -34,7 +35,6 @@
|
|||||||
#include <tactility/filesystem/file_system.h>
|
#include <tactility/filesystem/file_system.h>
|
||||||
#include <tactility/kernel_init.h>
|
#include <tactility/kernel_init.h>
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_module.h>
|
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
#include <Tactility/InitEsp.h>
|
#include <Tactility/InitEsp.h>
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include <tactility/drivers/uart_controller.h>
|
#include <tactility/drivers/uart_controller.h>
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
#include <gps/gps.h>
|
#include <gps/gps.h>
|
||||||
#include <gps/gps_settings.h>
|
#include <gps/gps_settings.h>
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <format>
|
#include <format>
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,8 @@
|
|||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include <tactility/lvgl_fonts.h>
|
#include <lvgl/lvgl_fonts.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
namespace tt::app::applist {
|
namespace tt::app::applist {
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#include <tactility/lvgl_fonts.h>
|
#include <lvgl/lvgl_fonts.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
#include <Tactility/app/AppRegistration.h>
|
#include <Tactility/app/AppRegistration.h>
|
||||||
#include <Tactility/app/appdetails/AppDetails.h>
|
#include <Tactility/app/appdetails/AppDetails.h>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#include <Tactility/Tactility.h>
|
#include <Tactility/Tactility.h>
|
||||||
|
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
#include <Tactility/PubSub.h>
|
#include <Tactility/PubSub.h>
|
||||||
#include <Tactility/app/App.h>
|
#include <Tactility/app/App.h>
|
||||||
@ -10,7 +10,7 @@
|
|||||||
#include <Tactility/service/audio/Audio.h>
|
#include <Tactility/service/audio/Audio.h>
|
||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
namespace tt::app::audiosettings {
|
namespace tt::app::audiosettings {
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
#include <Tactility/lvgl/LvglSync.h>
|
#include <Tactility/lvgl/LvglSync.h>
|
||||||
|
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
namespace tt::app::btmanage {
|
namespace tt::app::btmanage {
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#include <format>
|
#include <format>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
#include <Tactility/app/btmanage/View.h>
|
#include <Tactility/app/btmanage/View.h>
|
||||||
#include <Tactility/app/btmanage/BtManagePrivate.h>
|
#include <Tactility/app/btmanage/BtManagePrivate.h>
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace tt::app::chat {
|
namespace tt::app::chat {
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
#include <Tactility/file/PropertiesFile.h>
|
#include <Tactility/file/PropertiesFile.h>
|
||||||
#include <Tactility/Paths.h>
|
#include <Tactility/Paths.h>
|
||||||
|
|
||||||
#include <tactility/crypt.h>
|
#include <crypt/crypt.h>
|
||||||
|
|
||||||
#include <esp_random.h>
|
#include <esp_random.h>
|
||||||
|
|
||||||
|
|||||||
@ -12,8 +12,8 @@
|
|||||||
#include <Tactility/service/wifi/Wifi.h>
|
#include <Tactility/service/wifi/Wifi.h>
|
||||||
|
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
@ -31,11 +31,10 @@ class DevelopmentApp final : public App {
|
|||||||
std::shared_ptr<service::development::DevelopmentService> service;
|
std::shared_ptr<service::development::DevelopmentService> service;
|
||||||
|
|
||||||
Timer timer = Timer(Timer::Type::Periodic, pdMS_TO_TICKS(1000), [this] {
|
Timer timer = Timer(Timer::Type::Periodic, pdMS_TO_TICKS(1000), [this] {
|
||||||
auto lockable = lvgl::getSyncLock();
|
if (lvgl_is_running()) {
|
||||||
auto lock = lockable->asScopedLock();
|
lvgl_lock();
|
||||||
// TODO: There's a crash when this is called when the app is being destroyed
|
|
||||||
if (lock.lock(lvgl::defaultLockTime) && module_is_started(&lvgl_module)) {
|
|
||||||
updateViewState();
|
updateViewState();
|
||||||
|
lvgl_unlock();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -158,11 +157,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void onHide(AppContext& appContext) override {
|
void onHide(AppContext& appContext) override {
|
||||||
auto lockable = lvgl::getSyncLock();
|
lvgl_lock();
|
||||||
auto lock = lockable->asScopedLock();
|
|
||||||
// Ensure that the update isn't already happening
|
// Ensure that the update isn't already happening
|
||||||
lock.lock();
|
|
||||||
timer.stop();
|
timer.stop();
|
||||||
|
lvgl_unlock();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,19 +1,13 @@
|
|||||||
|
#include <lvgl/lvgl.h>
|
||||||
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
#include "tactility/lvgl_module.h"
|
|
||||||
|
|
||||||
|
|
||||||
#include <Tactility/Tactility.h>
|
#include <Tactility/Tactility.h>
|
||||||
|
|
||||||
|
|
||||||
#include <Tactility/Timer.h>
|
#include <Tactility/Timer.h>
|
||||||
#include <Tactility/app/AppManifest.h>
|
#include <Tactility/app/AppManifest.h>
|
||||||
#include <Tactility/app/alertdialog/AlertDialog.h>
|
#include <Tactility/app/alertdialog/AlertDialog.h>
|
||||||
#include <Tactility/lvgl/LvglSync.h>
|
|
||||||
#include <Tactility/lvgl/Toolbar.h>
|
#include <Tactility/lvgl/Toolbar.h>
|
||||||
|
|
||||||
#include <tactility/device.h>
|
#include <tactility/device.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -181,38 +175,35 @@ class GpsSettingsApp final : public App {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void updateDeviceStates() {
|
void updateDeviceStates() {
|
||||||
auto lockable = lvgl::getSyncLock();
|
lvgl_lock();
|
||||||
auto lock = lockable->asScopedLock();
|
for (const auto& row : deviceRows) {
|
||||||
if (lock.lock(100 / portTICK_PERIOD_MS)) {
|
const char* text = "Start";
|
||||||
for (auto& row : deviceRows) {
|
bool enabled = true;
|
||||||
const char* text = "Start";
|
|
||||||
bool enabled = true;
|
|
||||||
|
|
||||||
if (device_is_ready(row.device)) {
|
if (device_is_ready(row.device)) {
|
||||||
switch (gps_get_state(row.device)) {
|
switch (gps_get_state(row.device)) {
|
||||||
case GPS_STATE_PENDING_ON:
|
case GPS_STATE_PENDING_ON:
|
||||||
text = "Starting...";
|
text = "Starting...";
|
||||||
enabled = false;
|
enabled = false;
|
||||||
break;
|
break;
|
||||||
case GPS_STATE_PENDING_OFF:
|
case GPS_STATE_PENDING_OFF:
|
||||||
text = "Stopping...";
|
text = "Stopping...";
|
||||||
enabled = false;
|
enabled = false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
text = "Stop";
|
text = "Stop";
|
||||||
enabled = true;
|
enabled = true;
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
lv_label_set_text(row.buttonLabel, text);
|
|
||||||
if (enabled) {
|
|
||||||
lv_obj_remove_state(row.button, LV_STATE_DISABLED);
|
|
||||||
} else {
|
|
||||||
lv_obj_add_state(row.button, LV_STATE_DISABLED);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lv_label_set_text(row.buttonLabel, text);
|
||||||
|
if (enabled) {
|
||||||
|
lv_obj_remove_state(row.button, LV_STATE_DISABLED);
|
||||||
|
} else {
|
||||||
|
lv_obj_add_state(row.button, LV_STATE_DISABLED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
lvgl_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include <tactility/device.h>
|
#include <tactility/device.h>
|
||||||
#include <tactility/drivers/grove.h>
|
#include <tactility/drivers/grove.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
#include <Tactility/Tactility.h>
|
#include <Tactility/Tactility.h>
|
||||||
#include <Tactility/lvgl/Toolbar.h>
|
#include <Tactility/lvgl/Toolbar.h>
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
#include <format>
|
#include <format>
|
||||||
|
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
namespace tt::app::i2cscanner {
|
namespace tt::app::i2cscanner {
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
#include <tactility/drivers/display.h>
|
#include <tactility/drivers/display.h>
|
||||||
#include <tactility/error.h>
|
#include <tactility/error.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
#include <tactility/device.h>
|
#include <tactility/device.h>
|
||||||
#include <tactility/drivers/backlight.h>
|
#include <tactility/drivers/backlight.h>
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
#include <Tactility/Tactility.h>
|
#include <Tactility/Tactility.h>
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include <tactility/device.h>
|
#include <tactility/device.h>
|
||||||
#include <tactility/drivers/backlight.h>
|
#include <tactility/drivers/backlight.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
|
|||||||
@ -13,9 +13,9 @@
|
|||||||
#include <tactility/device.h>
|
#include <tactility/device.h>
|
||||||
#include <tactility/drivers/power_supply.h>
|
#include <tactility/drivers/power_supply.h>
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_fonts.h>
|
#include <lvgl/lvgl_fonts.h>
|
||||||
#include <tactility/lvgl_icon_launcher.h>
|
#include <lvgl/lvgl_icon_launcher.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
namespace tt::app::launcher {
|
namespace tt::app::launcher {
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
#include <Tactility/settings/Language.h>
|
#include <Tactility/settings/Language.h>
|
||||||
#include <Tactility/settings/SystemSettings.h>
|
#include <Tactility/settings/SystemSettings.h>
|
||||||
|
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
namespace tt::app::notes {
|
namespace tt::app::notes {
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include <tactility/device.h>
|
#include <tactility/device.h>
|
||||||
#include <tactility/drivers/power_supply.h>
|
#include <tactility/drivers/power_supply.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
|
|||||||
@ -9,8 +9,8 @@
|
|||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
#include <tactility/device.h>
|
#include <tactility/device.h>
|
||||||
#include <tactility/drivers/power_supply.h>
|
#include <tactility/drivers/power_supply.h>
|
||||||
#include <tactility/lvgl_fonts.h>
|
#include <lvgl/lvgl_fonts.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
namespace tt::app::poweroff {
|
namespace tt::app::poweroff {
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
#include <Tactility/Timer.h>
|
#include <Tactility/Timer.h>
|
||||||
|
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
namespace tt::app::screenshot {
|
namespace tt::app::screenshot {
|
||||||
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
#include <Tactility/service/loader/Loader.h>
|
#include <Tactility/service/loader/Loader.h>
|
||||||
|
|
||||||
#include <tactility/check.h>
|
#include <tactility/check.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
#include <tactility/lvgl_fonts.h>
|
#include <lvgl/lvgl_fonts.h>
|
||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#include <tactility/lvgl_fonts.h>
|
#include <lvgl/lvgl_fonts.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
#include <Tactility/app/App.h>
|
#include <Tactility/app/App.h>
|
||||||
#include <Tactility/app/AppManifest.h>
|
#include <Tactility/app/AppManifest.h>
|
||||||
|
|||||||
@ -11,9 +11,9 @@
|
|||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include <tactility/lvgl_fonts.h>
|
#include <lvgl/lvgl_fonts.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
#include <esp_vfs_fat.h>
|
#include <esp_vfs_fat.h>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
|
|
||||||
#include <Tactility/RecursiveMutex.h>
|
#include <Tactility/RecursiveMutex.h>
|
||||||
@ -13,7 +13,7 @@
|
|||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
namespace tt::app::timedatesettings {
|
namespace tt::app::timedatesettings {
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#include <tactility/lvgl_fonts.h>
|
#include <lvgl/lvgl_fonts.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
#include <Tactility/app/AppContext.h>
|
#include <Tactility/app/AppContext.h>
|
||||||
#include <Tactility/app/AppManifest.h>
|
#include <Tactility/app/AppManifest.h>
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
#include <Tactility/settings/TouchCalibrationSettings.h>
|
#include <Tactility/settings/TouchCalibrationSettings.h>
|
||||||
|
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
#include <tactility/lvgl_pointer.h>
|
#include <lvgl/lvgl_pointer.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
#include <Tactility/Tactility.h>
|
#include <Tactility/Tactility.h>
|
||||||
#include <Tactility/settings/TrackballSettings.h>
|
#include <Tactility/settings/TrackballSettings.h>
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
#define TAG "usb_settings"
|
#define TAG "usb_settings"
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
#include <esp_netif.h>
|
#include <esp_netif.h>
|
||||||
#include <esp_wifi.h>
|
#include <esp_wifi.h>
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
#include <Tactility/Tactility.h>
|
#include <Tactility/Tactility.h>
|
||||||
|
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
namespace tt::app::wifimanage {
|
namespace tt::app::wifimanage {
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
#include <Tactility/service/loader/Loader.h>
|
#include <Tactility/service/loader/Loader.h>
|
||||||
|
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_icon_shared.h>
|
#include <lvgl/lvgl_icon_shared.h>
|
||||||
|
|
||||||
namespace tt::app::wifimanage {
|
namespace tt::app::wifimanage {
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
#include <tactility/drivers/spi_controller.h>
|
#include <tactility/drivers/spi_controller.h>
|
||||||
#include <tactility/filesystem/file_mutex.h>
|
#include <tactility/filesystem/file_mutex.h>
|
||||||
#include <tactility/filesystem/file_system.h>
|
#include <tactility/filesystem/file_system.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
constexpr auto* TAG = "file_mutex_lvgl";
|
constexpr auto* TAG = "file_mutex_lvgl";
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#include "Tactility/lvgl/LvglSync.h"
|
#include "Tactility/lvgl/LvglSync.h"
|
||||||
|
|
||||||
#include <Tactility/Mutex.h>
|
#include <Tactility/Mutex.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
namespace tt::lvgl {
|
namespace tt::lvgl {
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <Tactility/lvgl/SliderBox.h>
|
#include <Tactility/lvgl/SliderBox.h>
|
||||||
|
|
||||||
#include <tactility/lvgl_fonts.h>
|
#include <lvgl/lvgl_fonts.h>
|
||||||
|
|
||||||
namespace tt::lvgl {
|
namespace tt::lvgl {
|
||||||
|
|
||||||
|
|||||||
@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
#include <tactility/check.h>
|
#include <tactility/check.h>
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_fonts.h>
|
#include <lvgl/lvgl_fonts.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|||||||
@ -9,8 +9,8 @@
|
|||||||
#include <Tactility/service/loader/Loader.h>
|
#include <Tactility/service/loader/Loader.h>
|
||||||
|
|
||||||
#include <tactility/check.h>
|
#include <tactility/check.h>
|
||||||
#include <tactility/lvgl_fonts.h>
|
#include <lvgl/lvgl_fonts.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
namespace tt::lvgl {
|
namespace tt::lvgl {
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <lvgl.h>
|
#include <lvgl.h>
|
||||||
|
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
#include <Tactility/service/gui/GuiService.h>
|
#include <Tactility/service/gui/GuiService.h>
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/drivers/display.h>
|
#include <tactility/drivers/display.h>
|
||||||
#include <tactility/drivers/backlight.h>
|
#include <tactility/drivers/backlight.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
namespace tt::service::displayidle {
|
namespace tt::service::displayidle {
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
#include <Tactility/service/loader/Loader.h>
|
#include <Tactility/service/loader/Loader.h>
|
||||||
|
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
namespace tt::service::gui {
|
namespace tt::service::gui {
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
#include <tactility/device.h>
|
#include <tactility/device.h>
|
||||||
#include <tactility/drivers/backlight.h>
|
#include <tactility/drivers/backlight.h>
|
||||||
#include <tactility/drivers/keyboard.h>
|
#include <tactility/drivers/keyboard.h>
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
namespace tt::service::keyboardidle {
|
namespace tt::service::keyboardidle {
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
#include <Tactility/service/ServiceManifest.h>
|
#include <Tactility/service/ServiceManifest.h>
|
||||||
#include <Tactility/service/memorychecker/MemoryCheckerService.h>
|
#include <Tactility/service/memorychecker/MemoryCheckerService.h>
|
||||||
|
|
||||||
#include <tactility/lvgl_icon_statusbar.h>
|
#include <lvgl/lvgl_icon_statusbar.h>
|
||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
|
|
||||||
namespace tt::service::memorychecker {
|
namespace tt::service::memorychecker {
|
||||||
|
|||||||
@ -22,8 +22,8 @@
|
|||||||
#include <tactility/log.h>
|
#include <tactility/log.h>
|
||||||
#include <tactility/module.h>
|
#include <tactility/module.h>
|
||||||
|
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
#include <tactility/lvgl_icon_statusbar.h>
|
#include <lvgl/lvgl_icon_statusbar.h>
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
@ -268,8 +268,8 @@ class StatusbarService final : public Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void update() {
|
void update() {
|
||||||
if (module_is_started(&lvgl_module)) {
|
if (lvgl_is_running()) {
|
||||||
if (lvgl_try_lock(100)) {
|
if (lvgl_try_lock(200)) {
|
||||||
updateGpsIcon();
|
updateGpsIcon();
|
||||||
updateBluetoothIcon();
|
updateBluetoothIcon();
|
||||||
updateWifiIcon();
|
updateWifiIcon();
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
#include <lv_screenshot.h>
|
#include <lv_screenshot.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <tactility/lvgl_icon_statusbar.h>
|
#include <lvgl/lvgl_icon_statusbar.h>
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include <Tactility/file/File.h>
|
#include <Tactility/file/File.h>
|
||||||
|
|
||||||
#include <tactility/crypt.h>
|
#include <crypt/crypt.h>
|
||||||
|
|
||||||
#include <Tactility/service/ServicePaths.h>
|
#include <Tactility/service/ServicePaths.h>
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +0,0 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct DisplayPlaceholderConfig {
|
|
||||||
uint8_t _unused;
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
#include <tactility/drivers/display_placeholder.h>
|
|
||||||
#include <tactility/device.h>
|
|
||||||
#include <tactility/driver.h>
|
|
||||||
#include <tactility/drivers/display.h>
|
|
||||||
#include <tactility/module.h>
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
|
|
||||||
static error_t start(Device*) { return ERROR_NONE; }
|
|
||||||
static error_t stop(Device*) { return ERROR_NONE; }
|
|
||||||
|
|
||||||
extern Module root_module;
|
|
||||||
|
|
||||||
Driver display_placeholder_driver = {
|
|
||||||
.name = "display_placeholder",
|
|
||||||
.compatible = (const char*[]) { "display-placeholder", nullptr },
|
|
||||||
.start_device = start,
|
|
||||||
.stop_device = stop,
|
|
||||||
.api = nullptr,
|
|
||||||
.device_type = &DISPLAY_TYPE,
|
|
||||||
.owner = &root_module,
|
|
||||||
.internal = nullptr
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -14,8 +14,6 @@ extern const ModuleSymbol KERNEL_SYMBOLS[];
|
|||||||
static error_t start() {
|
static error_t start() {
|
||||||
extern Driver root_driver;
|
extern Driver root_driver;
|
||||||
if (driver_construct_add(&root_driver) != ERROR_NONE) return ERROR_RESOURCE;
|
if (driver_construct_add(&root_driver) != ERROR_NONE) return ERROR_RESOURCE;
|
||||||
extern Driver display_placeholder_driver;
|
|
||||||
if (driver_construct_add(&display_placeholder_driver) != ERROR_NONE) return ERROR_RESOURCE;
|
|
||||||
extern Driver battery_sense_driver;
|
extern Driver battery_sense_driver;
|
||||||
if (driver_construct_add(&battery_sense_driver) != ERROR_NONE) return ERROR_RESOURCE;
|
if (driver_construct_add(&battery_sense_driver) != ERROR_NONE) return ERROR_RESOURCE;
|
||||||
extern Driver battery_sense_power_supply_driver;
|
extern Driver battery_sense_power_supply_driver;
|
||||||
|
|||||||
@ -13,26 +13,30 @@
|
|||||||
#include <tactility/drivers/bluetooth_midi.h>
|
#include <tactility/drivers/bluetooth_midi.h>
|
||||||
#include <tactility/drivers/bluetooth_hid_device.h>
|
#include <tactility/drivers/bluetooth_hid_device.h>
|
||||||
#include <tactility/drivers/camera.h>
|
#include <tactility/drivers/camera.h>
|
||||||
#include <tactility/drivers/usb_host_hid.h>
|
|
||||||
#include <tactility/drivers/usb_host_midi.h>
|
|
||||||
#include <tactility/drivers/usb_host_msc.h>
|
|
||||||
#include <tactility/drivers/display.h>
|
#include <tactility/drivers/display.h>
|
||||||
#include <tactility/drivers/gpio_controller.h>
|
#include <tactility/drivers/gpio_controller.h>
|
||||||
#include <tactility/drivers/grove.h>
|
#include <tactility/drivers/grove.h>
|
||||||
|
#include <tactility/drivers/haptic.h>
|
||||||
#include <tactility/drivers/i2c_controller.h>
|
#include <tactility/drivers/i2c_controller.h>
|
||||||
#include <tactility/drivers/i2s_controller.h>
|
#include <tactility/drivers/i2s_controller.h>
|
||||||
#include <tactility/drivers/i8080_controller.h>
|
#include <tactility/drivers/i8080_controller.h>
|
||||||
#include <tactility/drivers/keyboard.h>
|
#include <tactility/drivers/keyboard.h>
|
||||||
#include <tactility/drivers/pointer.h>
|
#include <tactility/drivers/pointer.h>
|
||||||
#include <tactility/drivers/power_supply.h>
|
#include <tactility/drivers/power_supply.h>
|
||||||
|
#include <tactility/drivers/pwm.h>
|
||||||
|
#include <tactility/drivers/rgb_led.h>
|
||||||
#include <tactility/drivers/root.h>
|
#include <tactility/drivers/root.h>
|
||||||
#include <tactility/drivers/rtc.h>
|
#include <tactility/drivers/rtc.h>
|
||||||
#include <tactility/drivers/sdcard.h>
|
#include <tactility/drivers/sdcard.h>
|
||||||
#include <tactility/drivers/spi_controller.h>
|
#include <tactility/drivers/spi_controller.h>
|
||||||
#include <tactility/drivers/uart_controller.h>
|
#include <tactility/drivers/uart_controller.h>
|
||||||
|
#include <tactility/drivers/usb_host_hid.h>
|
||||||
|
#include <tactility/drivers/usb_host_midi.h>
|
||||||
|
#include <tactility/drivers/usb_host_msc.h>
|
||||||
#include <tactility/drivers/wifi.h>
|
#include <tactility/drivers/wifi.h>
|
||||||
#include <tactility/error.h>
|
#include <tactility/error.h>
|
||||||
#include <tactility/filesystem/file_system.h>
|
#include <tactility/filesystem/file_system.h>
|
||||||
|
#include <tactility/filesystem/file_mutex.h>
|
||||||
#include <tactility/module.h>
|
#include <tactility/module.h>
|
||||||
#include <tactility/wifi_auto_scan.h>
|
#include <tactility/wifi_auto_scan.h>
|
||||||
#include <tactility/service/service_instance.h>
|
#include <tactility/service/service_instance.h>
|
||||||
@ -151,6 +155,17 @@ const struct ModuleSymbol KERNEL_SYMBOLS[] = {
|
|||||||
DEFINE_MODULE_SYMBOL(display_get_frame_buffer_count),
|
DEFINE_MODULE_SYMBOL(display_get_frame_buffer_count),
|
||||||
DEFINE_MODULE_SYMBOL(display_get_backlight),
|
DEFINE_MODULE_SYMBOL(display_get_backlight),
|
||||||
DEFINE_MODULE_SYMBOL(DISPLAY_TYPE),
|
DEFINE_MODULE_SYMBOL(DISPLAY_TYPE),
|
||||||
|
// file_mutex
|
||||||
|
DEFINE_MODULE_SYMBOL(file_mutex_register),
|
||||||
|
DEFINE_MODULE_SYMBOL(file_mutex_get),
|
||||||
|
DEFINE_MODULE_SYMBOL(file_mutex_lock),
|
||||||
|
DEFINE_MODULE_SYMBOL(file_mutex_try_lock),
|
||||||
|
DEFINE_MODULE_SYMBOL(file_mutex_unlock),
|
||||||
|
// file system
|
||||||
|
DEFINE_MODULE_SYMBOL(file_system_mount),
|
||||||
|
DEFINE_MODULE_SYMBOL(file_system_unmount),
|
||||||
|
DEFINE_MODULE_SYMBOL(file_system_is_mounted),
|
||||||
|
DEFINE_MODULE_SYMBOL(file_system_get_path),
|
||||||
// drivers/gpio_controller
|
// drivers/gpio_controller
|
||||||
DEFINE_MODULE_SYMBOL(gpio_descriptor_acquire),
|
DEFINE_MODULE_SYMBOL(gpio_descriptor_acquire),
|
||||||
DEFINE_MODULE_SYMBOL(gpio_descriptor_release),
|
DEFINE_MODULE_SYMBOL(gpio_descriptor_release),
|
||||||
@ -174,6 +189,12 @@ const struct ModuleSymbol KERNEL_SYMBOLS[] = {
|
|||||||
DEFINE_MODULE_SYMBOL(grove_set_mode),
|
DEFINE_MODULE_SYMBOL(grove_set_mode),
|
||||||
DEFINE_MODULE_SYMBOL(grove_get_mode),
|
DEFINE_MODULE_SYMBOL(grove_get_mode),
|
||||||
DEFINE_MODULE_SYMBOL(GROVE_TYPE),
|
DEFINE_MODULE_SYMBOL(GROVE_TYPE),
|
||||||
|
// drivers/haptic
|
||||||
|
DEFINE_MODULE_SYMBOL(haptic_set_waveform),
|
||||||
|
DEFINE_MODULE_SYMBOL(haptic_select_library),
|
||||||
|
DEFINE_MODULE_SYMBOL(haptic_start_playback),
|
||||||
|
DEFINE_MODULE_SYMBOL(haptic_stop_playback),
|
||||||
|
DEFINE_MODULE_SYMBOL(HAPTIC_TYPE),
|
||||||
// drivers/i2c_controller
|
// drivers/i2c_controller
|
||||||
DEFINE_MODULE_SYMBOL(i2c_controller_read),
|
DEFINE_MODULE_SYMBOL(i2c_controller_read),
|
||||||
DEFINE_MODULE_SYMBOL(i2c_controller_write),
|
DEFINE_MODULE_SYMBOL(i2c_controller_write),
|
||||||
@ -230,6 +251,23 @@ const struct ModuleSymbol KERNEL_SYMBOLS[] = {
|
|||||||
DEFINE_MODULE_SYMBOL(power_supply_supports_power_off),
|
DEFINE_MODULE_SYMBOL(power_supply_supports_power_off),
|
||||||
DEFINE_MODULE_SYMBOL(power_supply_power_off),
|
DEFINE_MODULE_SYMBOL(power_supply_power_off),
|
||||||
DEFINE_MODULE_SYMBOL(POWER_SUPPLY_TYPE),
|
DEFINE_MODULE_SYMBOL(POWER_SUPPLY_TYPE),
|
||||||
|
// drivers/pwm
|
||||||
|
DEFINE_MODULE_SYMBOL(pwm_set_period),
|
||||||
|
DEFINE_MODULE_SYMBOL(pwm_get_period),
|
||||||
|
DEFINE_MODULE_SYMBOL(pwm_set_duty),
|
||||||
|
DEFINE_MODULE_SYMBOL(pwm_get_duty),
|
||||||
|
DEFINE_MODULE_SYMBOL(pwm_set_inverted),
|
||||||
|
DEFINE_MODULE_SYMBOL(pwm_is_inverted),
|
||||||
|
DEFINE_MODULE_SYMBOL(pwm_enable),
|
||||||
|
DEFINE_MODULE_SYMBOL(pwm_disable),
|
||||||
|
DEFINE_MODULE_SYMBOL(pwm_is_enabled),
|
||||||
|
DEFINE_MODULE_SYMBOL(PWM_TYPE),
|
||||||
|
// drivers/rgb_led
|
||||||
|
DEFINE_MODULE_SYMBOL(rgb_led_set_color),
|
||||||
|
DEFINE_MODULE_SYMBOL(rgb_led_get_color),
|
||||||
|
DEFINE_MODULE_SYMBOL(rgb_led_enable),
|
||||||
|
DEFINE_MODULE_SYMBOL(rgb_led_disable),
|
||||||
|
DEFINE_MODULE_SYMBOL(RGB_LED_TYPE),
|
||||||
// drivers/root
|
// drivers/root
|
||||||
DEFINE_MODULE_SYMBOL(root_is_model),
|
DEFINE_MODULE_SYMBOL(root_is_model),
|
||||||
// drivers/rtc
|
// drivers/rtc
|
||||||
@ -383,11 +421,6 @@ const struct ModuleSymbol KERNEL_SYMBOLS[] = {
|
|||||||
DEFINE_MODULE_SYMBOL(timer_set_callback_priority),
|
DEFINE_MODULE_SYMBOL(timer_set_callback_priority),
|
||||||
// error
|
// error
|
||||||
DEFINE_MODULE_SYMBOL(error_to_string),
|
DEFINE_MODULE_SYMBOL(error_to_string),
|
||||||
// file system
|
|
||||||
DEFINE_MODULE_SYMBOL(file_system_mount),
|
|
||||||
DEFINE_MODULE_SYMBOL(file_system_unmount),
|
|
||||||
DEFINE_MODULE_SYMBOL(file_system_is_mounted),
|
|
||||||
DEFINE_MODULE_SYMBOL(file_system_get_path),
|
|
||||||
// log
|
// log
|
||||||
#ifndef ESP_PLATFORM
|
#ifndef ESP_PLATFORM
|
||||||
DEFINE_MODULE_SYMBOL(log_generic),
|
DEFINE_MODULE_SYMBOL(log_generic),
|
||||||
@ -22,7 +22,7 @@
|
|||||||
#include <tactility/module.h>
|
#include <tactility/module.h>
|
||||||
#include <tactility/time.h>
|
#include <tactility/time.h>
|
||||||
|
|
||||||
#include <tactility/lvgl_module.h>
|
#include <lvgl/lvgl.h>
|
||||||
|
|
||||||
#include <drivers/bm8563.h>
|
#include <drivers/bm8563.h>
|
||||||
#include <drivers/bmi270.h>
|
#include <drivers/bmi270.h>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#include "doctest.h"
|
#include "doctest.h"
|
||||||
#include <tactility/crypt.h>
|
#include <crypt/crypt.h>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
TEST_CASE("crypt_encrypt followed by crypt_decrypt returns the original data") {
|
TEST_CASE("crypt_encrypt followed by crypt_decrypt returns the original data") {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#include "doctest.h"
|
#include "doctest.h"
|
||||||
#include <tactility/hash.h>
|
#include <crypt/hash.h>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
TEST_CASE("djb2_str of an empty string returns the DJB2 seed value") {
|
TEST_CASE("djb2_str of an empty string returns the DJB2 seed value") {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user