File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -125,11 +125,11 @@ func (p *serport) reader(buftype string) {
125
125
p .bufferwatcher .OnIncomingDataBinary (ch [:n ])
126
126
case "default" : // the bufferbuftype is actually called default 🤷♂️
127
127
// save the left out bytes for the next iteration due to UTF-8 encoding
128
- ch = append (buffered_ch .Bytes (), ch [:n ]... ) // TODO ch is not handled correctly: doing this way it's length is messed up. Use ch2
128
+ ch = append (buffered_ch .Bytes (), ch [:n ]... ) // TODO ch is not handled correctly: doing this way its length is messed up. Use ch2
129
129
n += len (buffered_ch .Bytes ())
130
130
buffered_ch .Reset ()
131
131
for i , w := 0 , 0 ; i < n ; i += w {
132
- runeValue , width := utf8 .DecodeRune (ch [i :n ]) // try to decode the first i bytes in the buffer (UTF8 runes do not have a fixed lenght )
132
+ runeValue , width := utf8 .DecodeRune (ch [i :n ]) // try to decode the first i bytes in the buffer (UTF8 runes do not have a fixed length )
133
133
if runeValue == utf8 .RuneError {
134
134
buffered_ch .Write (ch [i :n ])
135
135
break
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ def general_test_serial(socketio, buffertype):
59
59
message = []
60
60
#in message var we will find the "response"
61
61
socketio .on ('message' , message_handler )
62
- #open a new serial connection with the specified buffertype, if buffertype s empty it will use the default one
62
+ #open a new serial connection with the specified buffertype, if buffertype is empty it will use the default one
63
63
socketio .emit ('command' , 'open ' + port + ' 9600 ' + buffertype )
64
64
# give time to the message var to be filled
65
65
time .sleep (.5 )
@@ -109,7 +109,7 @@ def message_handler(msg):
109
109
global message
110
110
message .append (msg )
111
111
112
- # helper function used to extract serial data from it's json representation
112
+ # helper function used to extract serial data from its JSON representation
113
113
# NOTE make sure to pass a clean message (maybe reinitialize the message global var before populating it)
114
114
def extract_serial_data (msg ):
115
115
serial_data = ""
You can’t perform that action at this time.
0 commit comments