Skip to content

Commit

Permalink
Fix & force fast OTA protocol.
Browse files Browse the repository at this point in the history
  • Loading branch information
kiik committed Jan 21, 2016
1 parent 542a086 commit 7a6ba73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Flasher.js
Expand Up @@ -62,7 +62,7 @@ Flasher.prototype = extend(IFlasher.prototype, {
//
// OTA tweaks
//
_fastOtaEnabled: false,
_fastOtaEnabled: true,
_ignoreMissedChunks: false,


Expand Down Expand Up @@ -250,7 +250,7 @@ Flasher.prototype = extend(IFlasher.prototype, {
if (msg && (msg.getPayloadLength() > 0)) {
version = messages.FromBinary(msg.getPayload(), "byte");
}
that._protocolVersion = version;
that._protocolVersion = 1; // Version parsing is not working properly for some reason

that.stage++;
//that.stage = Flasher.stages.SEND_FILE; //in we ever decide to make this listener re-entrant
Expand Down Expand Up @@ -297,8 +297,8 @@ Flasher.prototype = extend(IFlasher.prototype, {
destFlag = 0, //TODO: reserved for later
destAddr = 0; //TODO: reserved for later

if (this._fastOtaEnabled) {
logger.log("fast ota enabled! ", this.getLogInfo());
if (that._fastOtaEnabled) {
logger.log("fast ota enabled! ", that.getLogInfo());
flags = 1;
}

Expand Down
3 changes: 3 additions & 0 deletions lib/Messages.js
Expand Up @@ -392,6 +392,9 @@ module.exports = {
case "int32":
b.pushInt32(val);
break;
case "uint16":
b.pushUInt16(val);
break;
case "number":
//b.pushInt32(val);
//break;
Expand Down

0 comments on commit 7a6ba73

Please sign in to comment.