Skip to content

Commit

Permalink
Merge pull request aholstenson#139 from nicoh88/patch-1
Browse files Browse the repository at this point in the history
Other result from vacuums with newer firmware
  • Loading branch information
aholstenson authored May 17, 2018
2 parents 9fc6b24 + c48face commit 1d4a47b
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 1d4a47b

Please sign in to comment.