Moved drawSplash() into UI task and fixed task prios

This commit is contained in:
Raphael Coeffic
2021-07-31 17:31:50 +02:00
parent 7e4cdaeaca
commit 40609f5d67
4 changed files with 11 additions and 27 deletions
-6
View File
@@ -1950,12 +1950,6 @@ int main()
stackPaint(); stackPaint();
#endif #endif
#if defined(SPLASH) && !defined(STARTUP_ANIMATION)
if (!UNEXPECTED_SHUTDOWN()) {
drawSplash();
}
#endif
#if defined(PCBHORUS) #if defined(PCBHORUS)
if (!IS_FIRMWARE_COMPATIBLE_WITH_BOARD()) { if (!IS_FIRMWARE_COMPATIBLE_WITH_BOARD()) {
runFatalErrorScreen(STR_WRONG_PCBREV); runFatalErrorScreen(STR_WRONG_PCBREV);
-15
View File
@@ -45,10 +45,6 @@ extern "C++" {
extern uint64_t simuTimerMicros(void); extern uint64_t simuTimerMicros(void);
extern uint8_t simuSleep(uint32_t ms); extern uint8_t simuSleep(uint32_t ms);
static inline void RTOS_INIT()
{
}
static inline void RTOS_START() static inline void RTOS_START()
{ {
} }
@@ -184,19 +180,8 @@ template<int SIZE>
StaticSemaphore_t mutex_struct; StaticSemaphore_t mutex_struct;
} RTOS_MUTEX_HANDLE; } RTOS_MUTEX_HANDLE;
// typedef TaskHandle_t RTOS_TASK_HANDLE;
// typedef SemaphoreHandle_t RTOS_MUTEX_HANDLE;
typedef RTOS_MUTEX_HANDLE RTOS_FLAG_HANDLE; typedef RTOS_MUTEX_HANDLE RTOS_FLAG_HANDLE;
//typedef OS_FlagID RTOS_FLAG_HANDLE;
//typedef OS_EventID RTOS_EVENT_HANDLE;
static inline void RTOS_INIT()
{
//CoInitOS();
}
static inline void RTOS_START() static inline void RTOS_START()
{ {
vTaskStartScheduler(); vTaskStartScheduler();
+7 -2
View File
@@ -243,6 +243,13 @@ bool perMainEnabled = true;
TASK_FUNCTION(menusTask) TASK_FUNCTION(menusTask)
{ {
#if defined(SPLASH) && !defined(STARTUP_ANIMATION)
if (!UNEXPECTED_SHUTDOWN()) {
drawSplash();
TRACE("drawSplash() completed");
}
#endif
opentxInit(); opentxInit();
#if defined(PWR_BUTTON_PRESS) #if defined(PWR_BUTTON_PRESS)
@@ -296,8 +303,6 @@ TASK_FUNCTION(menusTask)
void tasksStart() void tasksStart()
{ {
RTOS_INIT();
RTOS_CREATE_MUTEX(audioMutex); RTOS_CREATE_MUTEX(audioMutex);
RTOS_CREATE_MUTEX(mixerMutex); RTOS_CREATE_MUTEX(mixerMutex);
+4 -4
View File
@@ -33,10 +33,10 @@
#define AUDIO_STACK_SIZE 400 #define AUDIO_STACK_SIZE 400
#define CLI_STACK_SIZE 1000 // only consumed with CLI build option #define CLI_STACK_SIZE 1000 // only consumed with CLI build option
#define MIXER_TASK_PRIO 5 #define MIXER_TASK_PRIO (tskIDLE_PRIORITY + 4)
#define AUDIO_TASK_PRIO 7 #define AUDIO_TASK_PRIO (tskIDLE_PRIORITY + 2)
#define MENUS_TASK_PRIO 10 #define MENUS_TASK_PRIO (tskIDLE_PRIORITY + 1)
#define CLI_TASK_PRIO 10 #define CLI_TASK_PRIO (tskIDLE_PRIORITY + 1)
extern RTOS_TASK_HANDLE menusTaskId; extern RTOS_TASK_HANDLE menusTaskId;
extern RTOS_DEFINE_STACK(menusStack, MENUS_STACK_SIZE); extern RTOS_DEFINE_STACK(menusStack, MENUS_STACK_SIZE);