feat: better microsecond timer (#4112)

This commit is contained in:
Raphael Coeffic
2023-09-26 18:30:55 +02:00
committed by GitHub
parent 6f40ea44ad
commit 6abd4263a4
22 changed files with 135 additions and 195 deletions
+6 -1
View File
@@ -63,7 +63,7 @@ Clipboard clipboard;
GlobalData globalData;
uint16_t maxMixerDuration; // step = 0.01ms
uint32_t maxMixerDuration; // microseconds
uint8_t heartbeat;
#if defined(OVERRIDE_CHANNEL_FUNCTION)
@@ -138,6 +138,9 @@ void checkValidMCU(void)
void per10ms()
{
DEBUG_TIMER_START(debugTimerPer10ms);
DEBUG_TIMER_SAMPLE(debugTimerPer10msPeriod);
g_tmr10ms++;
#if defined(GUI)
@@ -203,6 +206,8 @@ void per10ms()
outputTelemetryBuffer.per10ms();
heartbeat |= HEART_TIMER_10MS;
DEBUG_TIMER_STOP(debugTimerPer10ms);
}
FlightModeData *flightModeAddress(uint8_t idx)