File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ function updatePort(port, alist) {
112
112
// Empty port path? If wireless port, craft path from mac, else abort (reject)
113
113
if ( port . isWireless && port . mac ) { alist . path = makePortName ( port . mac ) } else { reject ( Error ( "path required!" ) ) ; return }
114
114
}
115
- //!!! log("Updating port '" + port.path + "' with " + alist, mDbug);
115
+ // log("Updating port '" + port.path + "' with " + alist, mDbug);
116
116
// Apply updates (if necessary) as well as special handling
117
117
set ( "path" ) ;
118
118
set ( "connId" ) ;
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ function changeBaudrate(port, baudrate) {
145
145
if ( port . isWired ) {
146
146
chrome . serial . update ( port . connId , { 'bitrate' : baudrate } , function ( updateResult ) {
147
147
if ( updateResult ) {
148
- port . baud = baudrate ;
148
+ updatePort ( port , { baud : baudrate } ) ;
149
149
resolve ( ) ;
150
150
} else {
151
151
reject ( Error ( notice ( neCanNotSetBaudrate , [ port . path , baudrate ] ) ) ) ;
@@ -158,12 +158,12 @@ function changeBaudrate(port, baudrate) {
158
158
//Update port record with socket to Propeller's HTTP service
159
159
updatePort ( port , { phSocket : info . socketId } ) ;
160
160
if ( ! port . phSocket ) {
161
- log ( "NULL SOCKET!!!" , mDbug ) ; //!!!
161
+ log ( "NULL SOCKET!!!" , mDbug ) ; //!!!!
162
162
}
163
163
let postStr = "POST /wx/setting?name=baud-rate&value=" + baudrate + " HTTP/1.1\r\n\r\n" ;
164
164
chrome . sockets . tcp . connect ( port . phSocket , port . ip , 80 , function ( ) {
165
165
chrome . sockets . tcp . send ( port . phSocket , str2ab ( postStr ) , function ( ) {
166
- //!!! port. baud = baudrate;
166
+ updatePort ( port , { baud : baudrate } ) ;
167
167
propComm . response
168
168
. then ( function ( ) { return resolve ( ) ; } )
169
169
. catch ( function ( e ) { return reject ( e ) ; } )
Original file line number Diff line number Diff line change @@ -24,8 +24,6 @@ WXVer = ["v1.0"];
24
24
// Container for the active UDP socket used for discovery broadcasts
25
25
var udp_sock ;
26
26
27
- //!!! var tcp_sock;
28
-
29
27
// Initial discovery packet. 4-bytes per module representing the module's IP are appended as Wi-Fi modules are found
30
28
// signaling to a module that it does not have to re-respond.
31
29
var disc_packet = '\0\0\0\0' ;
@@ -221,7 +219,7 @@ function isValidWiFiVersion(response) {
221
219
// chrome.sockets.tcp.send(tcp_sock, str2ab(getStr), function() {});
222
220
223
221
//Generate loader package (in txData)
224
- let packetId = 1; //!!!
222
+ let packetId = 1;
225
223
generateLoaderPacket(ltUnEncCore, packetId, defaultClockSpeed, defaultClockMode);
226
224
chrome.sockets.tcp.send(tcp_sock, txData, function() {});
227
225
You can’t perform that action at this time.
0 commit comments