Rename readMergeSensor() to readAdc()

This commit is contained in:
László Monda
2017-08-07 02:14:14 +02:00
parent 50aac5835d
commit b12a891ba8
2 changed files with 5 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ let uhk = require('./uhk');
let [endpointIn, endpointOut] = uhk.getUsbEndpoints();
var arg = process.argv[2] || '';
function readMergeSensor() {
function readAdc() {
var payload = new Buffer([uhk.usbCommands.readAdc]);
console.log('Sending ', uhk.bufferToString(payload));
endpointOut.transfer(payload, function(err) {
@@ -17,9 +17,9 @@ function readMergeSensor() {
process.exit(2);
}
console.log('Received', uhk.bufferToString(receivedBuffer), (receivedBuffer[1]*255 + receivedBuffer[0])/4096*5.5*1.045);
setTimeout(readMergeSensor, 500)
setTimeout(readAdc, 500)
})
});
}
readMergeSensor();
readAdc();

View File

@@ -129,6 +129,8 @@ exports = module.exports = {
readHardwareConfig: 13,
writeHardwareConfig: 14,
readUserConfig: 15,
getKeyboardState: 16,
readDebugInfo: 17,
},
systemPropertyIds: {
usbProtocolVersion: 0,