tessel/t2-firmware

hw bindings no longer available?

Closed this issue · 1 comments

Have this bindings moved or isn't it written yet? It's used by the gps module.

var hw = process.binding('hw')
Error: No such module: hw
    at Error (native)
    at Object.<anonymous> (/tmp/remote-script/index.js:10:18)
    at Module._compile (module.js:426:26)
    at Object.Module._extensions..js (module.js:444:10)
    at Module.load (module.js:351:32)
    at Function.Module._load (module.js:306:12)
    at Module.require (module.js:361:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/tmp/remote-script/test/getSetPollTime.js:5:11)
    at Module._compile (module.js:426:26)

process.binding('hw') was bindings to C functions built into the T1 firmware, and was meant to be used only in the implementation of tessel.js, and not intended to be a public or stable API. It won't exist in T2 because it uses normal io.js. I assume the usage in GPS is to call the NMEA parser written in C. This should be replaced by a pure JS NMEA parser or ported to be a Node C++ addon.