Constants used ...
This commit is contained in:
+1
-3
@@ -27,8 +27,6 @@
|
|||||||
extern "C++" {
|
extern "C++" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define doNothing() do { } while(0) // seems unused? don't ever use this with SIMU
|
|
||||||
|
|
||||||
#if defined(SIMU)
|
#if defined(SIMU)
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
@@ -149,7 +147,7 @@ extern "C++" {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define RTOS_MS_PER_TICK (CFG_CPU_FREQ / CFG_SYSTICK_FREQ / (CFG_CPU_FREQ / 1000)) // RTOS timer tick length in ms (currently 2)
|
#define RTOS_MS_PER_TICK ((CFG_CPU_FREQ / CFG_SYSTICK_FREQ) / (CFG_CPU_FREQ / 1000)) // RTOS timer tick length in ms (currently 2)
|
||||||
|
|
||||||
typedef OS_TID RTOS_TASK_HANDLE;
|
typedef OS_TID RTOS_TASK_HANDLE;
|
||||||
typedef OS_MutexID RTOS_MUTEX_HANDLE;
|
typedef OS_MutexID RTOS_MUTEX_HANDLE;
|
||||||
|
|||||||
@@ -162,11 +162,11 @@ void scheduleNextMixerCalculation(uint8_t module, uint16_t period_ms)
|
|||||||
{
|
{
|
||||||
// Schedule next mixer calculation time,
|
// Schedule next mixer calculation time,
|
||||||
// for now assume mixer calculation takes 2 ms.
|
// for now assume mixer calculation takes 2 ms.
|
||||||
nextMixerTime[module] = (uint32_t)RTOS_GET_TIME() + period_ms - 1 /*1.2ms before next pulse*/;
|
nextMixerTime[module] = (uint32_t)RTOS_GET_TIME() + (period_ms / RTOS_MS_PER_TICK) - 1 /* 1 tick in advance*/;
|
||||||
DEBUG_TIMER_STOP(debugTimerMixerCalcToUsage);
|
DEBUG_TIMER_STOP(debugTimerMixerCalcToUsage);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MENU_TASK_PERIOD_TICKS 50 // 50ms
|
#define MENU_TASK_PERIOD_TICKS (50 / RTOS_MS_PER_TICK) // 50ms
|
||||||
|
|
||||||
#if defined(COLORLCD) && defined(CLI)
|
#if defined(COLORLCD) && defined(CLI)
|
||||||
bool perMainEnabled = true;
|
bool perMainEnabled = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user