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:
committed by
GitHub
parent
d52fe52d96
commit
42e843b463
@@ -1,13 +1,13 @@
|
||||
#include <Check.h>
|
||||
#include <Thread.h>
|
||||
#include <Kernel.h>
|
||||
#include "Assets.h"
|
||||
#include "TactilityCore.h"
|
||||
|
||||
#include "app/AppContext.h"
|
||||
#include "lvgl.h"
|
||||
#include "app/display/DisplaySettings.h"
|
||||
#include "hal/Display.h"
|
||||
#include "service/loader/Loader.h"
|
||||
#include "lvgl/Style.h"
|
||||
#include "app/display/DisplaySettings.h"
|
||||
|
||||
#include "lvgl.h"
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
#include "sdkconfig.h"
|
||||
@@ -26,7 +26,7 @@ struct Data {
|
||||
};
|
||||
|
||||
static int32_t threadCallback(TT_UNUSED void* context) {
|
||||
TickType_t start_time = tt::get_ticks();
|
||||
TickType_t start_time = tt::kernel::getTicks();
|
||||
|
||||
auto* lvgl_display = lv_display_get_default();
|
||||
tt_assert(lvgl_display != nullptr);
|
||||
@@ -37,11 +37,11 @@ static int32_t threadCallback(TT_UNUSED void* context) {
|
||||
hal_display->setBacklightDuty(backlight_duty);
|
||||
}
|
||||
|
||||
TickType_t end_time = tt::get_ticks();
|
||||
TickType_t end_time = tt::kernel::getTicks();
|
||||
TickType_t ticks_passed = end_time - start_time;
|
||||
TickType_t minimum_ticks = (CONFIG_TT_SPLASH_DURATION / portTICK_PERIOD_MS);
|
||||
if (minimum_ticks > ticks_passed) {
|
||||
tt::delay_ticks(minimum_ticks - ticks_passed);
|
||||
tt::kernel::delayTicks(minimum_ticks - ticks_passed);
|
||||
}
|
||||
tt::service::loader::stopApp();
|
||||
tt::service::loader::startApp("Desktop");
|
||||
|
||||
Reference in New Issue
Block a user