Skip to content

Commit

Permalink
fixed AndiDittrich#24 download command failed because of API change i…
Browse files Browse the repository at this point in the history
…n NodeMCU 1.5.4 - similar to AndiDittrich#22
  • Loading branch information
AndiDittrich committed Jan 2, 2017
1 parent 4e5de35 commit e30bc34
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ dev*
test/*
esptool
.firmware/*
yarn.lock
9 changes: 6 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
### 2.0.4 ###
* Bugfix: Download command failed because of API changes in NodeMCU Firmware **v1.5.4** - thanks to [verneroberts on GitHub](https://github.com/AndiDittrich/NodeMCU-Tool/pull/24) #42

### 2.0.3 ###
Bugfix: Terminal in **non-TTY** mode caused fatal error on connect - thanks to [stephanMettler on GitHub](https://github.com/AndiDittrich/NodeMCU-Tool/issues/23) #23
* Bugfix: Terminal in **non-TTY** mode caused fatal error on connect - thanks to [stephanMettler on GitHub](https://github.com/AndiDittrich/NodeMCU-Tool/issues/23) #23

### 2.0.2 ###
Bugfix: Upload command failed because of API changes in NodeMCU Firmware **v1.5.4** - thanks to [curioussavage on GitHub](https://github.com/AndiDittrich/NodeMCU-Tool/issues/22) ##2
Bugfix: Fix crash when trying to upload a folder - thanks to [sakisds on GitHub](https://github.com/AndiDittrich/NodeMCU-Tool/pull/20) #20
* Bugfix: Upload command failed because of API changes in NodeMCU Firmware **v1.5.4** - thanks to [curioussavage on GitHub](https://github.com/AndiDittrich/NodeMCU-Tool/issues/22) #22
* Bugfix: Fix crash when trying to upload a folder - thanks to [sakisds on GitHub](https://github.com/AndiDittrich/NodeMCU-Tool/pull/20) #20

### 2.0.1 ###
* Bugfix: `devices` command was broken since the last release (refactoring issue) - thanks to [otbe on GitHub](https://github.com/AndiDittrich/NodeMCU-Tool/issues/18) #18
Expand Down
4 changes: 2 additions & 2 deletions lib/NodeMcuConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ NodeMcuConnector.prototype.executeCommand = function(cmd, cb){
NodeMcuConnector.prototype.download = function(remoteName, cb){
// check connect flag
if (!this.isConnected){
cb('Cannot upload file - device offline', null);
cb('Cannot download file - device offline', null);
return;
}

Expand All @@ -471,7 +471,7 @@ NodeMcuConnector.prototype.download = function(remoteName, cb){
// open remote file for write
this.device.executeCommand(_luaCommandBuilder.prepare('fileOpen', [remoteName, 'r']), function(err, echo, response){
// successful opened ?
if (err || response != 'true'){
if (err || response == 'nil'){
cb('Cannot open remote file "' + remoteName + '" for read - ' + err);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodemcu-tool",
"version": "2.0.3",
"version": "2.0.4",
"description": "Command line tool to upload and manage files on your NodeMCU / ESP8266 Module.",
"keywords": [
"cli",
Expand Down

0 comments on commit e30bc34

Please sign in to comment.