Use mph on arduino updates
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user