pxt-ev3/sim/state/util.ts
Sam El-Husseini 0529759a80 Fix ultrasonic value to use cm instead of 0.1 cm units (#110)
* Fix simulator

* use 250 instead of 255
2017-12-18 20:30:56 -08:00

7 lines
199 B
TypeScript

namespace pxsim.util {
export function map16Bit(buffer: Uint8Array, index: number, value: number) {
buffer[index] = value & 0xFF;
buffer[index + 1] = (value >> 8) & 0xFF;
}
}