File tree Expand file tree Collapse file tree
src/components/i2c/drivers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -374,6 +374,7 @@ extra_scripts = pre:rename_usb_config.py
374374extends = common:esp32
375375board = adafruit_qtpy_esp32s3_n4r2
376376build_flags = -DARDUINO_ADAFRUIT_QTPY_ESP32S3_N4R2 -DBOARD_HAS_PSRAM
377+ board_build.partitions = tinyuf2-partitions-4MB-noota.csv
377378extra_scripts = pre:rename_usb_config.py
378379
379380[env:adafruit_qtpy_esp32s3_with_psram_debug]
Original file line number Diff line number Diff line change @@ -116,14 +116,19 @@ class WipperSnapper_I2C_Driver_Out_CharLcd
116116 for (int cur_col = 0 ; cur_col < _cols && cur_idx < message_length;
117117 cur_col++) {
118118 char c = message[cur_idx];
119+ WS_DEBUG_PRINTLN (" CharLCD: Writing char: " );
120+ WS_DEBUG_PRINT (c);
121+ WS_DEBUG_PRINT (" | hex:0x" );
122+ // print hex
123+ WS_DEBUG_PRINTHEX (c);
124+ WS_DEBUG_PRINTLN (" " );
119125 if (c == ' \\ ' && cur_idx + 1 < message_length &&
120- message[cur_idx + 1 ] == ' n' ) {
121- cur_idx += 2 ; // Skip the '\n' character in the buffer
126+ (message[cur_idx + 1 ] == ' n' || message[cur_idx + 1 ] == ' r' )) {
127+ cur_idx += 2 ; // Skip the '\n' or '\r' character in the buffer
128+ break ; // and move to the next row
129+ } else if ((c == 0x0A || c == 0x0D ) && cur_idx + 1 < message_length) {
130+ cur_idx += 1 ; // Skip the UTF-8 sequence for \n or \r
122131 break ; // and move to the next row
123- } else if (c == ' \\ ' && cur_idx + 1 < message_length &&
124- message[cur_idx + 1 ] == ' r' ) {
125- cur_idx += 2 ; // Skip the '\r' character in the buffer
126- continue ; // and continue writing on the same row
127132 } else if (c == 194 && cur_idx + 1 < message_length &&
128133 message[cur_idx + 1 ] == 176 ) {
129134 cur_idx += 2 ; // Skip the degree symbol sequence in the buffer
You can’t perform that action at this time.
0 commit comments