C++ conversions (#111)

* Remove version from artifact name
* Target C++ 20 and higher
* Use cpp string
* Better crash implementation
* String utils in cpp style
* Replace parameter methods with start() method
* MutexType to Mutex::Type
* Kernel c to cpp style
* Cleanup event flag
* More cpp conversions
* Test fixes
* Updated ideas docs
This commit is contained in:
Ken Van Hoeylandt
2024-12-07 12:24:28 +01:00
committed by GitHub
parent d52fe52d96
commit 42e843b463
66 changed files with 272 additions and 258 deletions
+2 -2
View File
@@ -39,7 +39,7 @@ typedef struct {
} Statusbar;
static void statusbar_init() {
statusbar_data.mutex = tt_mutex_alloc(MutexTypeRecursive);
statusbar_data.mutex = tt_mutex_alloc(Mutex::TypeRecursive);
statusbar_data.pubsub = std::make_shared<PubSub>();
for (int i = 0; i < STATUSBAR_ICON_LIMIT; i++) {
statusbar_data.icons[i].image = nullptr;
@@ -83,7 +83,7 @@ static const lv_obj_class_t statusbar_class = {
static void statusbar_pubsub_event(TT_UNUSED const void* message, void* obj) {
TT_LOG_I(TAG, "event");
auto* statusbar = static_cast<Statusbar*>(obj);
if (lock(ms_to_ticks(100))) {
if (lock(kernel::millisToTicks(100))) {
update_main(statusbar);
lv_obj_invalidate(&statusbar->obj);
unlock();