mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 14:25:11 +03:00
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:
parent
15a373c1cd
commit
03b65b06b6
12 changed files with 136 additions and 161 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue