Projectkk2glider/issue 4479 slow joystick (#4569)
* Missing debug timer * USB driver cleanup * Re #4479: Joystick update called from mixer thread every 10ms * Cosmetics * Compilation fix * Cosmetics * Another compilation fix
This commit is contained in:
committed by
Bertrand Songis
parent
15a373c1cd
commit
03b65b06b6
+10
-1
@@ -143,7 +143,11 @@ void mixerTask(void * pdata)
|
||||
|
||||
uint32_t now = CoGetOSTime();
|
||||
bool run = false;
|
||||
if ((now - lastRunTime) > 10) { // run at least every 20ms
|
||||
#if defined(USB_JOYSTICK) && !defined(SIMU)
|
||||
if ((now - lastRunTime) >= (usbStarted() ? 5 : 10)) { // run at least every 20ms (every 10ms if USB is active)
|
||||
#else
|
||||
if ((now - lastRunTime) >= 10) { // run at least every 20ms
|
||||
#endif
|
||||
run = true;
|
||||
}
|
||||
else if (now == nextMixerTime[0]) {
|
||||
@@ -171,6 +175,10 @@ void mixerTask(void * pdata)
|
||||
CoLeaveMutexSection(mixerMutex);
|
||||
DEBUG_TIMER_STOP(debugTimerMixer);
|
||||
|
||||
#if defined(USB_JOYSTICK) && !defined(SIMU)
|
||||
usbJoystickUpdate();
|
||||
#endif
|
||||
|
||||
#if defined(TELEMETRY_FRSKY) || defined(TELEMETRY_MAVLINK)
|
||||
DEBUG_TIMER_START(debugTimerTelemetryWakeup);
|
||||
telemetryWakeup();
|
||||
@@ -217,6 +225,7 @@ void menusTask(void * pdata)
|
||||
#endif
|
||||
uint32_t start = (uint32_t)CoGetOSTime();
|
||||
DEBUG_TIMER_START(debugTimerPerMain);
|
||||
DEBUG_TIMER_SAMPLE(debugTimerPerMainPeriod);
|
||||
perMain();
|
||||
DEBUG_TIMER_STOP(debugTimerPerMain);
|
||||
// TODO remove completely massstorage from sky9x firmware
|
||||
|
||||
Reference in New Issue
Block a user