From ed929366aaee62f9a1c08b5afeccbadf30d8fdd0 Mon Sep 17 00:00:00 2001 From: Peret <19463568+peret2000@users.noreply.github.com> Date: Mon, 8 Sep 2025 10:13:35 +0200 Subject: [PATCH] If any of the active devices is a footpod, simulated speed will not be used, as it is a treadmill (#4702) --- src/Train/TrainSidebar.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Train/TrainSidebar.cpp b/src/Train/TrainSidebar.cpp index 3314b8543..82d8a31d4 100644 --- a/src/Train/TrainSidebar.cpp +++ b/src/Train/TrainSidebar.cpp @@ -1881,6 +1881,8 @@ void TrainSidebar::guiUpdate() // refreshes the telemetry double distanceTick = 0; + // If any of the active devices is a footpod, simulated speed will not be used, as it is a treadmill + bool deviceIsFootpod = false; // fetch the right data from each device... foreach(int dev, activeDevices) { @@ -1953,12 +1955,15 @@ void TrainSidebar::guiUpdate() // refreshes the telemetry rtData.setTrainerConfigRequired(local.getTrainerConfigRequired()); rtData.setTrainerBrakeFault(local.getTrainerBrakeFault()); } + if (Devices[dev].type == DEV_ANTLOCAL && Devices[dev].deviceProfile.contains("o")) { + deviceIsFootpod = true; + } } // If simulated speed is *not* checked then you get speed reported by // trainer which in ergo mode will be dictated by your gear and cadence, // and in slope mode is whatever the trainer happens to implement. - if (useSimulatedSpeed) { + if (useSimulatedSpeed && !deviceIsFootpod) { BicycleSimState newState(rtData); SpeedDistance ret = bicycle.SampleSpeed(newState);