File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
src/components/i2c/drivers Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -122,14 +122,15 @@ class WipperSnapper_I2C_Driver_Out_CharLcd
122
122
if (message[cur_idx + 1 ] == ' r' && cur_idx + 3 < message_length &&
123
123
message[cur_idx + 2 ] == ' \\ ' && message[cur_idx + 3 ] == ' n' ) {
124
124
cur_idx += 4 ; // Skip \r\n and don't move the cursor two rows
125
- break ; // Move to the next row
125
+ break ; // Move to the next row
126
126
} else {
127
- cur_idx += 2 ; // Skip the \n or \r
128
- if (c == ' \\ ' && message[cur_idx + 1 ] == ' r' ) {
129
- _lcd->write (0x2F );
127
+ if (message[cur_idx + 1 ] == ' r' ) {
128
+ _lcd->write (' \\ ' );
130
129
_lcd->write (' r' );
130
+ cur_idx += 2 ; // Skip the \r
131
131
} else {
132
- break ; // Move to the next row
132
+ cur_idx += 2 ; // Skip the \n
133
+ break ; // Move to the next row
133
134
}
134
135
}
135
136
} else if ((c == 0x0A || c == 0x0D ) && cur_idx + 1 < message_length) {
@@ -140,12 +141,6 @@ class WipperSnapper_I2C_Driver_Out_CharLcd
140
141
cur_idx += 1 ; // Skip single newline character
141
142
}
142
143
break ; // and move to the next row
143
- } else if (c == 0x0D ||
144
- (c == ' r' && c == ' \\ ' ) && cur_idx + 1 < message_length) {
145
- // write \r to the lcd
146
- _lcd->write (' \\ ' );
147
- _lcd->write (' r' );
148
- cur_idx += 2 ;
149
144
} else if (c == 194 && cur_idx + 1 < message_length &&
150
145
message[cur_idx + 1 ] == 176 ) {
151
146
cur_idx += 2 ; // Skip the degree symbol sequence in the buffer
You can’t perform that action at this time.
0 commit comments