more tinkering

This commit is contained in:
Peli de Halleux
2019-10-18 22:03:50 -07:00
parent fb4a0c2e16
commit aad9f0fd8a
4 changed files with 6 additions and 9 deletions

View File

@ -106,7 +106,7 @@ namespace sensors.internal {
}
}
function init() {
export function init() {
if (sensorInfos) return
sensorInfos = []
for (let i = 0; i < DAL.NUM_INPUTS; ++i) sensorInfos.push(new SensorInfo(i))

View File

@ -55,7 +55,7 @@ namespace motors {
Size = 12
}
function init() {
export function init() {
if (pwmMM) return
pwmMM = control.mmap("/dev/lms_pwm", 0, 0)
if (!pwmMM) control.fail("no PWM file")