Constants used ...
This commit is contained in:
+1
-3
@@ -27,8 +27,6 @@
|
||||
extern "C++" {
|
||||
#endif
|
||||
|
||||
#define doNothing() do { } while(0) // seems unused? don't ever use this with SIMU
|
||||
|
||||
#if defined(SIMU)
|
||||
|
||||
#include <pthread.h>
|
||||
@@ -149,7 +147,7 @@ extern "C++" {
|
||||
}
|
||||
#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_MutexID RTOS_MUTEX_HANDLE;
|
||||
|
||||
@@ -122,7 +122,7 @@ TASK_FUNCTION(mixerTask)
|
||||
|
||||
if (!s_pulses_paused) {
|
||||
uint16_t t0 = getTmr2MHz();
|
||||
|
||||
|
||||
DEBUG_TIMER_START(debugTimerMixer);
|
||||
RTOS_LOCK_MUTEX(mixerMutex);
|
||||
doMixerCalculations();
|
||||
@@ -162,11 +162,11 @@ void scheduleNextMixerCalculation(uint8_t module, uint16_t period_ms)
|
||||
{
|
||||
// Schedule next mixer calculation time,
|
||||
// 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);
|
||||
}
|
||||
|
||||
#define MENU_TASK_PERIOD_TICKS 50 // 50ms
|
||||
#define MENU_TASK_PERIOD_TICKS (50 / RTOS_MS_PER_TICK) // 50ms
|
||||
|
||||
#if defined(COLORLCD) && defined(CLI)
|
||||
bool perMainEnabled = true;
|
||||
|
||||
Reference in New Issue
Block a user