From 0d4a1fae1cd3dd845c2d7f8376a98d739338bfe6 Mon Sep 17 00:00:00 2001 From: Paul Dino Jones Date: Fri, 12 May 2023 21:44:22 +0000 Subject: [PATCH] Use mph on arduino updates --- src/monocoque/devices/serialdevice.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/monocoque/devices/serialdevice.c b/src/monocoque/devices/serialdevice.c index 89cdd7b..e6521ca 100644 --- a/src/monocoque/devices/serialdevice.c +++ b/src/monocoque/devices/serialdevice.c @@ -14,7 +14,14 @@ int serialdev_update(SimDevice* this, SimData* simdata) { SerialDevice* serialdevice = (void *) this->derived; + // not sure if i want to change simapi to mph + // the arduino will use mph as speed in my code + // 255 is a good max top speed in mph + double velocity = simdata->velocity; + simdata->velocity = simdata->velocity * 0.6213712; + arduino_update(serialdevice, simdata); + simdata->velocity = velocity; return 0; }