Skip to content

Commit e303a66

Browse files
committed
Minor tweak for when the hello {r:…} gets lost.
1 parent ddeee89 commit e303a66

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tinyg.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ TinyG.prototype._open_second_channel = function (doSetup) {
241241
self.serialPortData = null;
242242
self._complete_open(doSetup)
243243
}
244-
};
244+
}; // _open_second_channel
245245

246246
TinyG.prototype._complete_open = function (doSetup) {
247247
var self = this;
@@ -324,6 +324,9 @@ TinyG.prototype._complete_open = function (doSetup) {
324324
process.nextTick(function() {
325325
self.emit('open');
326326
if (doSetup) {
327+
// Poke it to get a response
328+
self.write({sr:null});
329+
327330
setupPromise = setupPromise.delay(5).then(function() {
328331
self.write({clr:null});
329332
return self.set({jv:4}); //Set JSON verbosity to 2 (medium)

0 commit comments

Comments
 (0)