Cleanup (#43)
- Updated README.md, screenshot layout - Cleanup of incorrect `TT_UNUSED` usage
This commit is contained in:
parent
3250943345
commit
159118f19a
@ -7,7 +7,9 @@ It provides an application framework that is based on code from the [Flipper Zer
|
||||
|
||||
Tactility features a desktop that can launch apps:
|
||||
|
||||
  
|
||||
 
|
||||
|
||||
 
|
||||
|
||||
Through the Settings app you can connect to Wi-Fi or change the display settings:
|
||||
|
||||
@ -37,7 +39,7 @@ UI is created with [lvgl](https://github.com/lvgl/lvgl) which has lots of [widge
|
||||
Creating a touch-capable UI is [easy](https://docs.lvgl.io/8.3/get-started/quick-overview.html) and doesn't require your own render loop!
|
||||
|
||||
```c
|
||||
static void app_show(TT_UNUSED App app, lv_obj_t* parent) {
|
||||
static void app_show(App app, lv_obj_t* parent) {
|
||||
// Default toolbar with app name and close button
|
||||
lv_obj_t* toolbar = tt_toolbar_create_for_app(parent, app);
|
||||
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#include "lvgl.h"
|
||||
#include "ui/toolbar.h"
|
||||
|
||||
static void app_show(TT_UNUSED App app, lv_obj_t* parent) {
|
||||
static void app_show(App app, lv_obj_t* parent) {
|
||||
lv_obj_t* toolbar = tt_toolbar_create_for_app(parent, app);
|
||||
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ extern const ServiceManifest wifi_service;
|
||||
extern const AppManifest wifi_connect_app;
|
||||
extern const AppManifest wifi_manage_app;
|
||||
|
||||
TT_UNUSED void app_main(void) {
|
||||
void app_main(void) {
|
||||
static const Config config = {
|
||||
/**
|
||||
* Auto-select a board based on the ./sdkconfig.board.* file
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#include "services/loader/loader.h"
|
||||
#include "ui/toolbar.h"
|
||||
|
||||
static void app_show(TT_UNUSED App app, lv_obj_t* parent) {
|
||||
static void app_show(App app, lv_obj_t* parent) {
|
||||
lv_obj_t* toolbar = tt_toolbar_create_for_app(parent, app);
|
||||
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ static uint32_t task_max_sleep_ms = 10;
|
||||
static QueueHandle_t task_mutex = NULL;
|
||||
static bool task_running = false;
|
||||
|
||||
static void lvgl_task(TT_UNUSED void* arg);
|
||||
static void lvgl_task(void* arg);
|
||||
|
||||
static bool task_lock(int timeout_ticks) {
|
||||
assert(task_mutex != NULL);
|
||||
|
||||
@ -20,7 +20,7 @@ static void create_app_widget(const AppManifest* manifest, void* parent) {
|
||||
lv_obj_add_event_cb(btn, &on_app_pressed, LV_EVENT_CLICKED, (void*)manifest);
|
||||
}
|
||||
|
||||
static void desktop_show(TT_UNUSED App app, TT_UNUSED lv_obj_t* parent) {
|
||||
static void desktop_show(TT_UNUSED App app, lv_obj_t* parent) {
|
||||
lv_obj_t* list = lv_list_create(parent);
|
||||
lv_obj_set_size(list, LV_PCT(100), LV_PCT(100));
|
||||
lv_obj_center(list);
|
||||
|
||||
@ -28,7 +28,7 @@ static void on_mode_set(lv_event_t* event) {
|
||||
update_mode(ui);
|
||||
}
|
||||
|
||||
static void on_start_pressed(TT_UNUSED lv_event_t* event) {
|
||||
static void on_start_pressed(lv_event_t* event) {
|
||||
ScreenshotUi* ui = event->user_data;
|
||||
|
||||
if (tt_screenshot_is_started()) {
|
||||
|
||||
@ -66,7 +66,7 @@ static void on_orientation_set(lv_event_t* event) {
|
||||
}
|
||||
}
|
||||
|
||||
static void app_show(TT_UNUSED App app, lv_obj_t* parent) {
|
||||
static void app_show(App app, lv_obj_t* parent) {
|
||||
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
|
||||
|
||||
tt_toolbar_create_for_app(parent, app);
|
||||
|
||||
@ -21,7 +21,7 @@ static void create_app_widget(const AppManifest* manifest, void* parent) {
|
||||
lv_obj_add_event_cb(btn, &on_app_pressed, LV_EVENT_CLICKED, (void*)manifest);
|
||||
}
|
||||
|
||||
static void on_show(TT_UNUSED App app, lv_obj_t* parent) {
|
||||
static void on_show(App app, lv_obj_t* parent) {
|
||||
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
|
||||
|
||||
tt_toolbar_create_for_app(parent, app);
|
||||
|
||||
@ -46,7 +46,7 @@ static bool is_image_file(const char* filename) {
|
||||
|
||||
static void update_views(FilesData* data);
|
||||
|
||||
static void on_navigate_up_pressed(TT_UNUSED lv_event_t* event) {
|
||||
static void on_navigate_up_pressed(lv_event_t* event) {
|
||||
FilesData* files_data = (FilesData*)event->user_data;
|
||||
if (strcmp(files_data->current_path, "/") != 0) {
|
||||
TT_LOG_I(TAG, "Navigating upwards");
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
#define TAG "sdcard_service"
|
||||
|
||||
static int32_t sdcard_task(TT_UNUSED void* context);
|
||||
static int32_t sdcard_task(void* context);
|
||||
|
||||
typedef struct {
|
||||
Mutex* mutex;
|
||||
|
||||
@ -93,7 +93,7 @@ static void register_and_start_user_services(const ServiceManifest* const servic
|
||||
}
|
||||
}
|
||||
|
||||
TT_UNUSED void tt_init(const Config* config) {
|
||||
void tt_init(const Config* config) {
|
||||
TT_LOG_I(TAG, "tt_init started");
|
||||
|
||||
// Assign early so starting services can use it
|
||||
|
||||
@ -21,7 +21,7 @@ typedef struct {
|
||||
* Attempts to initialize Tactility and all configured hardware.
|
||||
* @param config
|
||||
*/
|
||||
TT_UNUSED void tt_init(const Config* config);
|
||||
void tt_init(const Config* config);
|
||||
|
||||
/**
|
||||
* While technically nullable, this instance is always set if tt_init() succeeds.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user