fix battery encoding

This commit is contained in:
Peli de Halleux
2018-01-11 08:47:09 -08:00
parent 893dd0f9c4
commit 9d5ca35e83
2 changed files with 3 additions and 3 deletions

View File

@ -30,8 +30,8 @@ namespace pxsim {
data,
beforeMemRead: () => {
//console.log("analog before read");
data[AnalogOff.BatteryTemp] = 21; // TODO simulate this
data[AnalogOff.BatteryCurrent] = 100; // TODO simulate this
util.map16Bit(data, AnalogOff.BatteryTemp, 21);
util.map16Bit(data, AnalogOff.BatteryCurrent, 900);
const inputNodes = ev3board().getInputNodes();
for (let port = 0; port < DAL.NUM_INPUTS; port++) {
const node = inputNodes[port];