From be7a746931c0b310d07ef0079465d49372678e9d Mon Sep 17 00:00:00 2001 From: hodasemi Date: Tue, 17 Jan 2023 16:05:31 +0100 Subject: [PATCH] Fix and improve pedals --- src/overlay/elements/pedals.rs | 4 ++-- src/overlay/elements/ui_files/pedals.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/overlay/elements/pedals.rs b/src/overlay/elements/pedals.rs index 1e326ac..f3ca8c6 100644 --- a/src/overlay/elements/pedals.rs +++ b/src/overlay/elements/pedals.rs @@ -60,9 +60,9 @@ impl DataReceiver for Pedals { if let Some(telemetry) = telemetries.iter().find(|telemetry| telemetry.id == id) { self.brake - .set_progress(telemetry.unfiltered_throttle as f32)?; + .set_progress(1.0 - telemetry.unfiltered_brake as f32)?; self.throttle - .set_progress(telemetry.unfiltered_throttle as f32)?; + .set_progress(1.0 - telemetry.unfiltered_throttle as f32)?; self.gear.set_text(telemetry.gear)?; let fuel = telemetry.fuel; self.fuel.set_text(format!("{:.2}", fuel))?; diff --git a/src/overlay/elements/ui_files/pedals.xml b/src/overlay/elements/ui_files/pedals.xml index cc2ba7c..06b64c2 100644 --- a/src/overlay/elements/ui_files/pedals.xml +++ b/src/overlay/elements/ui_files/pedals.xml @@ -2,10 +2,10 @@ -