Skip to content

Commit

Permalink
Added sayHello to update duty cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
pvgennip committed Dec 1, 2017
1 parent c1b14fe commit 1ca0f7c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions maxcube.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,16 @@ MaxCube.prototype.flushDeviceCache = function() {
return send.call(this, 'm:\r\n');
};

MaxCube.prototype.sayHello = function() {
checkInitialised.call(this);

return send.call(this, 'H:\r\n').then(function (res) {
self.commStatus.duty_cycle = res.duty_cycle;
self.commStatus.free_memory_slots = res.free_memory_slots;
return res.accepted;
});
};

MaxCube.prototype.setTemperature = function(rf_address, degrees, mode, untilDate) {
checkInitialised.call(this);

Expand Down

0 comments on commit 1ca0f7c

Please sign in to comment.