Fix ultrasonic value to use cm instead of 0.1 cm units (#110)

* Fix simulator

* use 250 instead of 255
This commit is contained in:
Sam El-Husseini
2017-12-18 20:30:56 -08:00
committed by Peli de Halleux
parent b07f157181
commit 0529759a80
6 changed files with 19 additions and 11 deletions

View File

@ -38,7 +38,7 @@ namespace pxsim {
data[AnalogOff.InConn + port] = node.isUart() ? DAL.CONN_INPUT_UART : DAL.CONN_INPUT_DUMB;
if (node.isAnalog() && node.hasData()) {
//data[AnalogOff.InPin6 + 2 * port] = node.getValue();
util.map16Bit(data, AnalogOff.InPin6 + 2 * port, node.getValue())
util.map16Bit(data, AnalogOff.InPin6 + 2 * port, Math.floor(node.getValue()));
}
}
}