Statusbar improvements (#36)
- Added sdcard service: it updates a statusbar icon and it can auto-unmount sdcards that were physically ejected by the user. - Added `is_mounted` check for sdcard drivers - Refactored assets: moved them from `tactility-esp/` to `data/` - Made assets work with sim build - Refactored wifi statusbar icons - Refactored wifi_manage app access point icons - Support not having an initial image icon when registering a new icon in statusbars. When a statusbar icon is added, it is now visible/invisible depending on whether an image was specified. - Keep track of app memory on app start to find memory leaks (needs fine-tuning in the future) - `tt_init()` assigns `config_instance` earlier, so it can be used during service init
This commit is contained in:
committed by
GitHub
parent
29ea47a7ba
commit
5558edccce
@@ -13,7 +13,7 @@ LIST_DEF(PubSubSubscriptionList, PubSubSubscription, M_POD_OPLIST);
|
||||
|
||||
struct PubSub {
|
||||
PubSubSubscriptionList_t items;
|
||||
Mutex* mutex;
|
||||
Mutex mutex;
|
||||
};
|
||||
|
||||
PubSub* tt_pubsub_alloc() {
|
||||
|
||||
@@ -80,7 +80,6 @@ static void tt_thread_body(void* context) {
|
||||
tt_thread_set_state(thread, ThreadStateRunning);
|
||||
|
||||
thread->ret = thread->callback(thread->context);
|
||||
TT_LOG_I(TAG, "thread returned: %s", thread->name ?: "[no name]");
|
||||
|
||||
tt_assert(thread->state == ThreadStateRunning);
|
||||
|
||||
@@ -170,7 +169,7 @@ void tt_thread_mark_as_static(Thread* thread) {
|
||||
thread->is_static = true;
|
||||
}
|
||||
|
||||
bool tt_thread_mark_is_service(ThreadId thread_id) {
|
||||
bool tt_thread_mark_is_static(ThreadId thread_id) {
|
||||
TaskHandle_t hTask = (TaskHandle_t)thread_id;
|
||||
assert(!TT_IS_IRQ_MODE() && (hTask != NULL));
|
||||
Thread* thread = (Thread*)pvTaskGetThreadLocalStoragePointer(hTask, 0);
|
||||
|
||||
@@ -275,7 +275,12 @@ void tt_thread_resume(ThreadId thread_id);
|
||||
*/
|
||||
bool tt_thread_is_suspended(ThreadId thread_id);
|
||||
|
||||
bool tt_thread_mark_is_service(ThreadId thread_id);
|
||||
/** Check if the thread was created with static memory
|
||||
*
|
||||
* @param thread_id thread id
|
||||
* @return true if thread memory is static
|
||||
*/
|
||||
bool tt_thread_mark_is_static(ThreadId thread_id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user