|
@@ -67,21 +67,24 @@ void TFT_ILI9163C_BASE::scroll(uint16_t ssa) {
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
void DISPLAY_DEV__CURSOR__NEWLINE(DISPLAY_PHYSICAL_CHAR_T &DISPLAY_PHYSICAL_CHAR_A) {
|
|
void DISPLAY_DEV__CURSOR__NEWLINE(DISPLAY_PHYSICAL_CHAR_T &DISPLAY_PHYSICAL_CHAR_A) {
|
|
|
- if(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_CURSOR_Y_CHARS_A + 1 > DISPLAY_PHYSICAL_CHAR_A.DISPLAY_PHYSICAL_Y_CHARS_A) {//[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
|
|
|
|
|
+ if(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_CURSOR_Y_CHARS_A + 1 >= DISPLAY_PHYSICAL_CHAR_A.DISPLAY_PHYSICAL_Y_CHARS_A) {//[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
|
DISPLAY_DEV.setCursor(0,0);
|
|
DISPLAY_DEV.setCursor(0,0);
|
|
|
- DISPLAY_DEV.clearScreen();
|
|
|
|
|
-
|
|
|
|
|
|
|
+ //DISPLAY_DEV.clearScreen();
|
|
|
|
|
+ DISPLAY_DEV.fillRect(0, 0, DISPLAY_PHYSICAL_CHAR_A.DISPLAY_PHYSICAL_X_PX_A , DISPLAY_PHYSICAL_CHAR_A.DISPLAY_textsize_y_A ,BLUE),
|
|
|
DISPLAY_PHYSICAL_CHAR_A.DISPLAY_CURSOR_Y_CHARS_A = 0 ; //[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
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]
|
|
DISPLAY_PHYSICAL_CHAR_A.DISPLAY_CURSOR_X_CHARS_A = 0 ; //[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
|
} else {
|
|
} else {
|
|
|
DISPLAY_PHYSICAL_CHAR_A.DISPLAY_CURSOR_Y_CHARS_A ++ ; //[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
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_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.setCursor(0,DISPLAY_PHYSICAL_CHAR_A.DISPLAY_CURSOR_Y_CHARS_A * DISPLAY_PHYSICAL_CHAR_A.DISPLAY_textsize_y_A); //[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#if defined(DEBUG)
|
|
#if defined(DEBUG)
|
|
|
Serial.print("#83 Dspl Y:["); Serial.print(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_CURSOR_Y_CHARS_A); //[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
Serial.print("#83 Dspl Y:["); Serial.print(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_CURSOR_Y_CHARS_A); //[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
|
Serial.print("] #MaxY:["); Serial.print(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_PHYSICAL_Y_CHARS_A); //[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
Serial.print("] #MaxY:["); Serial.print(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_PHYSICAL_Y_CHARS_A); //[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
|
|
|
+ Serial.print("] maxX:["); Serial.print(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_PHYSICAL_X_CHARS_A); //[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
|
|
|
+ Serial.print("] #YxF:["); Serial.print(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_CURSOR_Y_CHARS_A * DISPLAY_PHYSICAL_CHAR_A.DISPLAY_textsize_y_A); //[ARDUINO_ATTR_ARRAY_S_INDEX]
|
|
|
Serial.println("] ");
|
|
Serial.println("] ");
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
@@ -94,20 +97,33 @@ void DISPLAY_DEV__CURSOR__NEWLINE(DISPLAY_PHYSICAL_CHAR_T &DISPLAY_PHYSICAL_CHAR
|
|
|
void DISPLAY_DEV_CTRL__println(DISPLAY_PHYSICAL_CHAR_T &DISPLAY_PHYSICAL_CHAR_A,
|
|
void DISPLAY_DEV_CTRL__println(DISPLAY_PHYSICAL_CHAR_T &DISPLAY_PHYSICAL_CHAR_A,
|
|
|
DISPLAY_array16_T DISPLAY_array16_A) {
|
|
DISPLAY_array16_T DISPLAY_array16_A) {
|
|
|
DISPLAY_DEV__CURSOR__NEWLINE(DISPLAY_PHYSICAL_CHAR_A) ;
|
|
DISPLAY_DEV__CURSOR__NEWLINE(DISPLAY_PHYSICAL_CHAR_A) ;
|
|
|
|
|
+ // DISPLAY_DEV.print(DISPLAY_array16_A);
|
|
|
|
|
+ // unsigned char LCDarray1buf[16];
|
|
|
|
|
+ // DISPLAY_array16_A.toCharArray(LCDarray1buf, 16);
|
|
|
|
|
+
|
|
|
|
|
+ String message(DISPLAY_array16_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 ++;
|
|
|
|
|
+ int substr_begin = 0 ;
|
|
|
|
|
+ int substr_end = 0 ;
|
|
|
|
|
+ int i;
|
|
|
|
|
|
|
|
#if defined(DEBUG)
|
|
#if defined(DEBUG)
|
|
|
Serial.print("#34 arr16"); Serial.print(DISPLAY_array16_A);
|
|
Serial.print("#34 arr16"); Serial.print(DISPLAY_array16_A);
|
|
|
- Serial.print("#34 sizeof"); Serial.print(sizeof(DISPLAY_array16_A));
|
|
|
|
|
-
|
|
|
|
|
|
|
+ Serial.print("] #34 sizeof["); Serial.print(message.length());
|
|
|
|
|
+ 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.println("] ");
|
|
Serial.println("] ");
|
|
|
#endif
|
|
#endif
|
|
|
- //String message(DISPLAY_array16_A);
|
|
|
|
|
- //int parts = ceil( message.length() / DISPLAY_PHYSICAL_CHAR_A.DISPLAY_PHYSICAL_X_CHARS_A ) ;
|
|
|
|
|
- int substr_begin = 0 ;
|
|
|
|
|
- int substr_end = 0 ;
|
|
|
|
|
- int i;
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
- /* for(i = 1 ; i<= parts; i++) {
|
|
|
|
|
|
|
+ for(i = 1 ; i<= parts; i++) {
|
|
|
//myString.substring(from, to)
|
|
//myString.substring(from, to)
|
|
|
substr_end = substr_begin + DISPLAY_PHYSICAL_CHAR_A.DISPLAY_PHYSICAL_X_CHARS_A ;
|
|
substr_end = substr_begin + DISPLAY_PHYSICAL_CHAR_A.DISPLAY_PHYSICAL_X_CHARS_A ;
|
|
|
DISPLAY_DEV.print(message.substring(substr_begin, substr_end));
|
|
DISPLAY_DEV.print(message.substring(substr_begin, substr_end));
|
|
@@ -119,8 +135,9 @@ void DISPLAY_DEV_CTRL__println(DISPLAY_PHYSICAL_CHAR_T &DISPLAY_PHYSICAL_CHAR_A
|
|
|
Serial.println("] ");
|
|
Serial.println("] ");
|
|
|
#endif
|
|
#endif
|
|
|
substr_begin = substr_end + 1;
|
|
substr_begin = substr_end + 1;
|
|
|
- if( parts > 1) DISPLAY_DEV__CURSOR__NEWLINE(DISPLAY_PHYSICAL_CHAR_A) ;
|
|
|
|
|
- } */
|
|
|
|
|
|
|
+ if( parts >= 1 and not(i == parts))
|
|
|
|
|
+ DISPLAY_DEV__CURSOR__NEWLINE(DISPLAY_PHYSICAL_CHAR_A) ;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|