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
122122 if (message[cur_idx + 1 ] == ' r' && cur_idx + 3 < message_length &&
123123 message[cur_idx + 2 ] == ' \\ ' && message[cur_idx + 3 ] == ' n' ) {
124124 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
126126 } 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 (' \\ ' );
130129 _lcd->write (' r' );
130+ cur_idx += 2 ; // Skip the \r
131131 } else {
132- break ; // Move to the next row
132+ cur_idx += 2 ; // Skip the \n
133+ break ; // Move to the next row
133134 }
134135 }
135136 } else if ((c == 0x0A || c == 0x0D ) && cur_idx + 1 < message_length) {
@@ -140,12 +141,6 @@ class WipperSnapper_I2C_Driver_Out_CharLcd
140141 cur_idx += 1 ; // Skip single newline character
141142 }
142143 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 ;
149144 } else if (c == 194 && cur_idx + 1 < message_length &&
150145 message[cur_idx + 1 ] == 176 ) {
151146 cur_idx += 2 ; // Skip the degree symbol sequence in the buffer
You can’t perform that action at this time.
0 commit comments