Use mph on arduino updates
This commit is contained in:
parent
a50b68f3b6
commit
0d4a1fae1c
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue