diff --git a/README.md b/README.md index 9ea334b7..1f52f869 100644 --- a/README.md +++ b/README.md @@ -3,22 +3,20 @@ Tactility is a front-end application platform for ESP32. It is mainly intended for touchscreen devices. It provides an application framework that is based on code from the [Flipper Zero](https://github.com/flipperdevices/flipperzero-firmware/) project. +![photo of devices running Tactility](docs/pics/tactility-devices.webp) + **Status: Alpha** -Tactility features a desktop that can launch apps: +Tactility features a desktop with a set of applications: -![screenshot of desktop app](docs/pics/screenshot-desktop.png) ![screenshot of files app](docs/pics/screenshot-files.png) +![screenshot of desktop app](docs/pics/screenshot-desktop.png) ![screenshot of settings app](docs/pics/screenshot-settings.png) -![screenshot of system info app](docs/pics/screenshot-systeminfo.png) ![hello world app screenshot](docs/pics/screenshot-helloworld.png) +![screenshot of system info app](docs/pics/screenshot-systeminfo.png) ![screenshot of files app](docs/pics/screenshot-files.png) -Through the Settings app you can connect to Wi-Fi or change the display settings: - -![screenshot of settings app](docs/pics/screenshot-settings.png) ![screenshot of display settings app](docs/pics/screenshot-display.png) +![screenshot of GPIO app](docs/pics/screenshot-gpio.png) Play with the built-in apps or build your own! Use one of the supported devices or set up the drivers for your own hardware platform. -![photo of devices running Tactility](docs/pics/tactility-devices.jpg) - Noteworthy features: - Touch UI capabilities (via LVGL) with support for input devices such as on-device trackball or keyboard. - An application platform that can run apps and services. diff --git a/data/screenshot-files.png b/data/screenshot-files.png new file mode 100644 index 00000000..ff869c02 Binary files /dev/null and b/data/screenshot-files.png differ diff --git a/docs/pics/screenshot-desktop.png b/docs/pics/screenshot-desktop.png index cc62f3e6..f76598df 100644 Binary files a/docs/pics/screenshot-desktop.png and b/docs/pics/screenshot-desktop.png differ diff --git a/docs/pics/screenshot-display.png b/docs/pics/screenshot-display.png deleted file mode 100644 index 313165f1..00000000 Binary files a/docs/pics/screenshot-display.png and /dev/null differ diff --git a/docs/pics/screenshot-files.png b/docs/pics/screenshot-files.png index 1865e392..ff869c02 100644 Binary files a/docs/pics/screenshot-files.png and b/docs/pics/screenshot-files.png differ diff --git a/docs/pics/screenshot-gpio.png b/docs/pics/screenshot-gpio.png new file mode 100644 index 00000000..0e6084cf Binary files /dev/null and b/docs/pics/screenshot-gpio.png differ diff --git a/docs/pics/screenshot-helloworld.png b/docs/pics/screenshot-helloworld.png deleted file mode 100644 index 729c4f6a..00000000 Binary files a/docs/pics/screenshot-helloworld.png and /dev/null differ diff --git a/docs/pics/screenshot-settings.png b/docs/pics/screenshot-settings.png index dc616742..a7769216 100644 Binary files a/docs/pics/screenshot-settings.png and b/docs/pics/screenshot-settings.png differ diff --git a/docs/pics/screenshot-systeminfo.png b/docs/pics/screenshot-systeminfo.png index 91413d4c..1b0df418 100644 Binary files a/docs/pics/screenshot-systeminfo.png and b/docs/pics/screenshot-systeminfo.png differ diff --git a/docs/pics/tactility-devices.jpg b/docs/pics/tactility-devices.jpg deleted file mode 100644 index c5c4bb78..00000000 Binary files a/docs/pics/tactility-devices.jpg and /dev/null differ diff --git a/docs/pics/tactility-devices.webp b/docs/pics/tactility-devices.webp new file mode 100644 index 00000000..01206b80 Binary files /dev/null and b/docs/pics/tactility-devices.webp differ diff --git a/tactility/src/apps/gpio/gpio.c b/tactility/src/apps/gpio/gpio.c index 88520b07..98f49ade 100644 --- a/tactility/src/apps/gpio/gpio.c +++ b/tactility/src/apps/gpio/gpio.c @@ -1,11 +1,9 @@ -#ifdef ESP_TARGET - #include "services/loader/loader.h" #include "ui/toolbar.h" #include "thread.h" #include "mutex.h" -#include "driver/gpio.h" +#include "gpio_hal.h" #include "ui/lvgl_sync.h" typedef struct { @@ -136,7 +134,7 @@ static void app_show(App app, lv_obj_t* parent) { lv_obj_align(row_wrapper, LV_ALIGN_TOP_MID, 0, 0); lock(gpio); - for (int i = GPIO_NUM_0; i < GPIO_NUM_MAX; ++i) { + for (int i = GPIO_NUM_MIN; i < GPIO_NUM_MAX; ++i) { // Add the GPIO number before the first item on a row if (column == 0) { @@ -206,5 +204,3 @@ const AppManifest gpio_app = { .on_show = &app_show, .on_hide = &on_hide }; - -#endif // ESP_TARGET \ No newline at end of file diff --git a/tactility/src/apps/gpio/gpio_hal.c b/tactility/src/apps/gpio/gpio_hal.c new file mode 100644 index 00000000..9237d535 --- /dev/null +++ b/tactility/src/apps/gpio/gpio_hal.c @@ -0,0 +1,7 @@ +#ifndef ESP_PLATFORM + +int gpio_get_level(int gpio_num) { + return gpio_num % 3; +} + +#endif diff --git a/tactility/src/apps/gpio/gpio_hal.h b/tactility/src/apps/gpio/gpio_hal.h new file mode 100644 index 00000000..f90708a1 --- /dev/null +++ b/tactility/src/apps/gpio/gpio_hal.h @@ -0,0 +1,21 @@ +#pragma once + +#ifdef ESP_PLATFORM +#include "driver/gpio.h" +#define GPIO_NUM_MIN GPIO_NUM_0 +#else +#define GPIO_NUM_MIN 0 +#define GPIO_NUM_MAX 50 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef ESP_PLATFORM +int gpio_get_level(int gpio_num); +#endif + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/tactility/src/tactility.c b/tactility/src/tactility.c index 66355eac..3e29adbd 100644 --- a/tactility/src/tactility.c +++ b/tactility/src/tactility.c @@ -35,6 +35,7 @@ static const ServiceManifest* const system_services[] = { extern const AppManifest desktop_app; extern const AppManifest display_app; extern const AppManifest files_app; +extern const AppManifest gpio_app; extern const AppManifest image_viewer_app; extern const AppManifest power_app; extern const AppManifest settings_app; @@ -43,9 +44,7 @@ extern const AppManifest text_viewer_app; extern const AppManifest wifi_connect_app; extern const AppManifest wifi_manage_app; -#ifdef ESP_PLATFORM -extern const AppManifest gpio_app; -#else +#ifndef ESP_PLATFORM extern const AppManifest screenshot_app; #endif @@ -53,15 +52,14 @@ static const AppManifest* const system_apps[] = { &desktop_app, &display_app, &files_app, + &gpio_app, &image_viewer_app, &settings_app, &system_info_app, &text_viewer_app, &wifi_connect_app, &wifi_manage_app, -#ifdef ESP_PLATFORM - &gpio_app, -#else +#ifndef ESP_PLATFORM &screenshot_app, // Screenshots don't work yet on ESP32 #endif };