|
|
@@ -74,10 +74,12 @@ void DISPLAY_DEV__CURSOR__NEWLINE(DISPLAY_PHYSICAL_CHAR_T &DISPLAY_PHYSICAL_CHAR
|
|
|
DISPLAY_PHYSICAL_CHAR_A.DISPLAY_CURSOR_Y_CHARS_A = 0 ; //[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
|
DISPLAY_PHYSICAL_CHAR_A.DISPLAY_CURSOR_X_CHARS_A = 0 ; //[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
|
} else {
|
|
|
+
|
|
|
DISPLAY_PHYSICAL_CHAR_A.DISPLAY_CURSOR_Y_CHARS_A ++ ; //[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
|
DISPLAY_PHYSICAL_CHAR_A.DISPLAY_CURSOR_X_CHARS_A = 0 ; //[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
|
|
|
|
DISPLAY_DEV.setCursor(0,DISPLAY_PHYSICAL_CHAR_A.DISPLAY_CURSOR_Y_CHARS_A * DISPLAY_PHYSICAL_CHAR_A.DISPLAY_textsize_y_A); //[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
|
+ DISPLAY_DEV.fillRect(0, DISPLAY_PHYSICAL_CHAR_A.DISPLAY_CURSOR_Y_CHARS_A * DISPLAY_PHYSICAL_CHAR_A.DISPLAY_textsize_y_A, DISPLAY_PHYSICAL_CHAR_A.DISPLAY_PHYSICAL_X_PX_A , DISPLAY_PHYSICAL_CHAR_A.DISPLAY_textsize_y_A ,BLUE);
|
|
|
}
|
|
|
|
|
|
#if defined(DEBUG)
|
|
|
@@ -111,6 +113,7 @@ void DISPLAY_DEV_CTRL__println(DISPLAY_PHYSICAL_CHAR_T &DISPLAY_PHYSICAL_CHAR_A
|
|
|
|
|
|
int parts = floor(message.length()/ DISPLAY_PHYSICAL_CHAR_A.DISPLAY_PHYSICAL_X_CHARS_A ) ; //( message.length() + 100)
|
|
|
if(message.length() >= DISPLAY_PHYSICAL_CHAR_A.DISPLAY_PHYSICAL_X_CHARS_A and parts == 1) parts ++;
|
|
|
+ else if(parts == 0) parts = 1;
|
|
|
int substr_begin = 0 ;
|
|
|
int substr_end = 0 ;
|
|
|
int i;
|
|
|
@@ -122,7 +125,7 @@ void DISPLAY_DEV_CTRL__println(DISPLAY_PHYSICAL_CHAR_T &DISPLAY_PHYSICAL_CHAR_A
|
|
|
Serial.print("] #34 String["); Serial.print(message);
|
|
|
Serial.print("] #34 frag"); Serial.print( message.substring(2, 5));
|
|
|
Serial.print("] parts["); Serial.print( parts);
|
|
|
- Serial.print("] XC["); Serial.print( DISPLAY_PHYSICAL_CHAR_A.DISPLAY_PHYSICAL_X_CHARS_A);
|
|
|
+ Serial.print("] yC["); Serial.print( DISPLAY_PHYSICAL_CHAR_A.DISPLAY_CURSOR_Y_CHARS_A);
|
|
|
Serial.println("] ");
|
|
|
}
|
|
|
#endif
|
|
|
@@ -133,20 +136,25 @@ void DISPLAY_DEV_CTRL__println(DISPLAY_PHYSICAL_CHAR_T &DISPLAY_PHYSICAL_CHAR_A
|
|
|
//myString.substring(from, to)
|
|
|
substr_end = substr_begin + DISPLAY_PHYSICAL_CHAR_A.DISPLAY_PHYSICAL_X_CHARS_A ;
|
|
|
DISPLAY_DEV.print(message.substring(substr_begin, substr_end));
|
|
|
- /*BUG TODO ERROR IF UNCOMMENTED
|
|
|
+ /*BUG TODO ERROR IF UNCOMMENTED*/
|
|
|
#if defined(DEBUG)
|
|
|
- if(DEBUG > 4) {
|
|
|
- // Serial.print("#112 msg part["); Serial.print(i);
|
|
|
- // Serial.print("] beg["); Serial.print(substr_begin);
|
|
|
- // Serial.print("] end["); Serial.print(substr_end);
|
|
|
- // Serial.print("] frag["); Serial.print(message.substring(substr_begin, substr_end));
|
|
|
- //Serial.println("a] ");
|
|
|
- }
|
|
|
+ if(DEBUG > 6) {
|
|
|
+ Serial.print("#112 msg part["); Serial.print(i);
|
|
|
+ Serial.print("] beg["); Serial.print(substr_begin);
|
|
|
+ Serial.print("] end["); Serial.print(substr_end);
|
|
|
+ Serial.print("] frag["); Serial.print(message.substring(substr_begin, substr_end));
|
|
|
+ Serial.print("] yC["); Serial.print( DISPLAY_PHYSICAL_CHAR_A.DISPLAY_PHYSICAL_X_CHARS_A);
|
|
|
+ Serial.println("] ");
|
|
|
+ }
|
|
|
#endif
|
|
|
- */
|
|
|
+
|
|
|
substr_begin = substr_end + 1;
|
|
|
- if( parts >= 1 and not(i == parts))
|
|
|
- DISPLAY_DEV__CURSOR__NEWLINE(DISPLAY_PHYSICAL_CHAR_A) ;
|
|
|
+ if( parts >= 1 and not(parts == i)) {
|
|
|
+
|
|
|
+ DISPLAY_DEV__CURSOR__NEWLINE(DISPLAY_PHYSICAL_CHAR_A) ;
|
|
|
+ } //else if(i == parts) {
|
|
|
+ // DISPLAY_DEV__CURSOR__NEWLINE(DISPLAY_PHYSICAL_CHAR_A) ;
|
|
|
+ // }
|
|
|
}
|
|
|
/*BUG TODO ERROR IF UNCOMMENTED
|
|
|
// Serial.end(); // Ends the serial communication once all data is received
|