Skip to content

Commit

Permalink
Other result from vacuums with newer firmware aholstenson#130
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoh88 authored Apr 2, 2018
1 parent b9b554e commit c48face
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/devices/vacuum.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ const MiioApi = require('../device');
const BatteryLevel = require('./capabilities/battery-level');

function checkResult(r) {
if(r !== 0) {
//console.log(r)
// {"result":0,"id":17} = Firmware 3.3.9_003095 (Gen1)
// {"result":["ok"],"id":11} = Firmware 3.3.9_003194 (Gen1), 3.3.9_001168 (Gen2)
if( r !== 0 && r[0] !== 'ok' ) {
throw new Error('Could not complete call to device');
}
}
Expand Down

0 comments on commit c48face

Please sign in to comment.