Use mph on arduino updates

This commit is contained in:
Paul Dino Jones 2023-05-12 21:44:22 +00:00
parent a50b68f3b6
commit 0d4a1fae1c
1 changed files with 7 additions and 0 deletions

View File

@ -14,7 +14,14 @@ int serialdev_update(SimDevice* this, SimData* simdata)
{ {
SerialDevice* serialdevice = (void *) this->derived; 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); arduino_update(serialdevice, simdata);
simdata->velocity = velocity;
return 0; return 0;
} }