Push dev work to master #2

Merged
sixteenmillimeter merged 416 commits from dev into master 2018-07-19 15:29:02 +00:00
1 changed files with 5 additions and 5 deletions
Showing only changes of commit 83ed21441c - Show all commits

View File

@ -98,7 +98,7 @@ class Wifi {
data += '\n\n' + _entry data += '\n\n' + _entry
} }
_entry = null _entry = null
fs.writeFile(filePath, data, 'utf8', this._writeConfigCb) fs.writeFile(filePath, data, 'utf8', this._writeConfigCb.bind(this))
} }
/** /**
* (internal function) Invoked after config file is written, * (internal function) Invoked after config file is written,
@ -111,7 +111,7 @@ class Wifi {
console.error(err) console.error(err)
return _cb(err) return _cb(err)
} }
exec(reconfigure, this._reconfigureCb) exec(reconfigure, this._reconfigureCb.bind(this))
} }
/** /**
* (internal function) Invoked after reconfiguration command is complete * (internal function) Invoked after reconfiguration command is complete
@ -126,7 +126,7 @@ class Wifi {
return _cb(err) return _cb(err)
} }
console.log('Wifi reconfigured') console.log('Wifi reconfigured')
exec(refresh, this._refreshCb) exec(refresh, this._refreshCb.bind(this))
} }
/** /**
* (internal function) Invoked after wifi refresh command is complete * (internal function) Invoked after wifi refresh command is complete
@ -141,7 +141,7 @@ class Wifi {
return _cb(err) return _cb(err)
} }
console.log('Wifi refreshed') console.log('Wifi refreshed')
//this._callback(null, { ssid : ssid, pwd : pwd.length }) _cb(null, { ssid : ssid, pwd : pwd.length })
_cb = () => {} _cb = () => {}
} }
/** /**
@ -186,7 +186,7 @@ class Wifi {
_entry = `network={\n\tssid="${ssid}"\n\t#psk=${masked}\n\tpsk=${hash}\n}\n` _entry = `network={\n\tssid="${ssid}"\n\t#psk=${masked}\n\tpsk=${hash}\n}\n`
_cb = callback _cb = callback
_ssid = ssid _ssid = ssid
fs.readFile(filePath, 'utf8', this._readConfigCb) fs.readFile(filePath, 'utf8', this._readConfigCb.bind(this))
} }
/** /**
* Executes command which gets the currently connected network * Executes command which gets the currently connected network