Merge branch 'Development' into manual-bed-leveling+mesh-bed-level
This commit is contained in:
		| @@ -361,6 +361,7 @@ int fanSpeed = 0; | ||||
|  | ||||
| #ifdef SCARA | ||||
|   float axis_scaling[3] = { 1, 1, 1 };    // Build size scaling, default to 1 | ||||
|   static float delta[3] = { 0, 0, 0 };		 | ||||
| #endif         | ||||
|  | ||||
| bool cancel_heatup = false; | ||||
| @@ -387,10 +388,6 @@ const char echomagic[] PROGMEM = "echo:"; | ||||
| const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'}; | ||||
| static float destination[NUM_AXIS] = { 0, 0, 0, 0 }; | ||||
|  | ||||
| #ifndef DELTA | ||||
|   static float delta[3] = { 0, 0, 0 }; | ||||
| #endif | ||||
|  | ||||
| static float offset[3] = { 0, 0, 0 }; | ||||
| static bool home_all_axis = true; | ||||
| static float feedrate = 1500.0, next_feedrate, saved_feedrate; | ||||
| @@ -1694,7 +1691,7 @@ inline void gcode_G2_G3(bool clockwise) { | ||||
|  * G4: Dwell S<seconds> or P<milliseconds> | ||||
|  */ | ||||
| inline void gcode_G4() { | ||||
|   unsigned long codenum; | ||||
|   unsigned long codenum=0; | ||||
|  | ||||
|   LCD_MESSAGEPGM(MSG_DWELL); | ||||
|  | ||||
| @@ -2356,9 +2353,9 @@ inline void gcode_G28() { | ||||
|         z_at_pt_3 = probe_pt(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, ProbeRetract, verbose_level); | ||||
|       } | ||||
|       else { | ||||
|         z_at_pt_1 = probe_pt(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, Z_RAISE_BEFORE_PROBING, verbose_level); | ||||
|         z_at_pt_2 = probe_pt(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, verbose_level); | ||||
|         z_at_pt_3 = probe_pt(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, verbose_level); | ||||
|         z_at_pt_1 = probe_pt(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, Z_RAISE_BEFORE_PROBING, verbose_level=verbose_level); | ||||
|         z_at_pt_2 = probe_pt(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, verbose_level=verbose_level); | ||||
|         z_at_pt_3 = probe_pt(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, verbose_level=verbose_level); | ||||
|       } | ||||
|       clean_up_after_endstop_move(); | ||||
|       set_bed_level_equation_3pts(z_at_pt_1, z_at_pt_2, z_at_pt_3); | ||||
| @@ -5686,7 +5683,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s | ||||
|    | ||||
| #if defined(KILL_PIN) && KILL_PIN > -1 | ||||
|   static int killCount = 0;   // make the inactivity button a bit less responsive | ||||
|    const int KILL_DELAY = 10000; | ||||
|    const int KILL_DELAY = 750; | ||||
| #endif | ||||
|  | ||||
| #if defined(FILRUNOUT_PIN) && FILRUNOUT_PIN > -1 | ||||
| @@ -5697,7 +5694,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s | ||||
|  | ||||
| #if defined(HOME_PIN) && HOME_PIN > -1 | ||||
|    static int homeDebounceCount = 0;   // poor man's debouncing count | ||||
|    const int HOME_DEBOUNCE_DELAY = 10000; | ||||
|    const int HOME_DEBOUNCE_DELAY = 750; | ||||
| #endif | ||||
|     | ||||
|    | ||||
|   | ||||
| @@ -171,9 +171,9 @@ static inline uint8_t FAT_SECOND(uint16_t fatTime) { | ||||
|   return 2*(fatTime & 0X1F); | ||||
| } | ||||
| /** Default date for file timestamps is 1 Jan 2000 */ | ||||
| uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | BIT(5) | 1; | ||||
| uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1; | ||||
| /** Default time for file timestamp is 1 am */ | ||||
| uint16_t const FAT_DEFAULT_TIME = BIT(11); | ||||
| uint16_t const FAT_DEFAULT_TIME = (1 << 11); | ||||
| //------------------------------------------------------------------------------ | ||||
| /** | ||||
|  * \class SdBaseFile | ||||
|   | ||||
| @@ -504,7 +504,6 @@ void CardReader::printingHasFinished() { | ||||
|     startFileprint(); | ||||
|   } | ||||
|   else { | ||||
|     quickStop(); | ||||
|     file.close(); | ||||
|     sdprinting = false; | ||||
|     if (SD_FINISHED_STEPPERRELEASE) { | ||||
|   | ||||
							
								
								
									
										176
									
								
								Marlin/dogm_font_data_ISO10646_1_Marlin.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										176
									
								
								Marlin/dogm_font_data_ISO10646_1_Marlin.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,176 @@ | ||||
| /* | ||||
|   Fontname: ISO10646-1-Marlin | ||||
|   Copyright: A.Hardtung, public domain | ||||
|   Capital A Height: 7, '1' Height: 7 | ||||
|   Calculated Max Values w= 5 h=10 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9 | ||||
|   Font Bounding box     w= 6 h= 9 x= 0 y=-2 | ||||
|   Calculated Min Values           x= 0 y=-2 dx= 0 dy= 0 | ||||
|   Pure Font   ascent = 7 descent=-1 | ||||
|   X Font      ascent = 7 descent=-1 | ||||
|   Max Font    ascent = 8 descent=-2 | ||||
| */ | ||||
| #include <utility/u8g.h> | ||||
| const u8g_fntpgm_uint8_t ISO10646_1_Marlin_5x7[2596] U8G_SECTION(".progmem.ISO10646_1_Marlin_5x7") = { | ||||
|   0,6,9,0,254,7,1,146,3,33,32,255,255,8,254,7, | ||||
|   255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128, | ||||
|   128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6, | ||||
|   0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32, | ||||
|   120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32, | ||||
|   64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104, | ||||
|   2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32, | ||||
|   64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32, | ||||
|   32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5, | ||||
|   5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192, | ||||
|   64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192, | ||||
|   192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6, | ||||
|   0,0,112,136,136,136,136,136,112,3,7,7,6,1,0,64, | ||||
|   192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112, | ||||
|   128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240, | ||||
|   5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7, | ||||
|   6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0, | ||||
|   112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16, | ||||
|   32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136, | ||||
|   112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5, | ||||
|   5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192, | ||||
|   192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64, | ||||
|   32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1, | ||||
|   0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136, | ||||
|   8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168, | ||||
|   168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5, | ||||
|   7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6, | ||||
|   0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240, | ||||
|   136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240, | ||||
|   128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128, | ||||
|   5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7, | ||||
|   6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0, | ||||
|   128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16, | ||||
|   16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144, | ||||
|   136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7, | ||||
|   7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0, | ||||
|   0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136, | ||||
|   136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128, | ||||
|   128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5, | ||||
|   7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6, | ||||
|   0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248, | ||||
|   32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136, | ||||
|   136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32, | ||||
|   5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7, | ||||
|   6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0, | ||||
|   136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16, | ||||
|   32,64,128,248,3,7,7,6,1,0,224,128,128,128,128,128, | ||||
|   224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6, | ||||
|   1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32, | ||||
|   80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128, | ||||
|   64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6, | ||||
|   0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112, | ||||
|   128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136, | ||||
|   120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6, | ||||
|   0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112, | ||||
|   136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136, | ||||
|   136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3, | ||||
|   8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7, | ||||
|   6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,0, | ||||
|   192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168, | ||||
|   168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5, | ||||
|   6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136, | ||||
|   136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8, | ||||
|   5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0, | ||||
|   0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64, | ||||
|   64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5, | ||||
|   5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136, | ||||
|   136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5, | ||||
|   6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0, | ||||
|   0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128, | ||||
|   64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128, | ||||
|   3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2, | ||||
|   6,0,2,104,144,0,0,0,6,0,0,0,0,0,6,0, | ||||
|   0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0, | ||||
|   6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0, | ||||
|   0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0, | ||||
|   0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0, | ||||
|   6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0, | ||||
|   0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0, | ||||
|   0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0, | ||||
|   6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0, | ||||
|   0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0, | ||||
|   0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0, | ||||
|   6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0, | ||||
|   0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0, | ||||
|   0,1,7,7,6,2,0,128,0,128,128,128,128,128,5,7, | ||||
|   7,6,0,0,32,112,168,160,168,112,32,5,7,7,6,0, | ||||
|   0,48,64,64,224,64,80,168,5,5,5,6,0,0,136,112, | ||||
|   80,112,136,5,7,7,6,0,0,136,80,32,248,32,248,32, | ||||
|   1,7,7,6,2,0,128,128,128,0,128,128,128,5,8,8, | ||||
|   6,0,0,48,72,32,80,80,32,144,96,3,1,1,6,1, | ||||
|   7,160,5,7,7,6,0,0,248,136,184,184,184,136,248,5, | ||||
|   7,7,6,0,1,112,8,120,136,120,0,248,5,5,5,6, | ||||
|   0,1,40,80,160,80,40,5,3,3,6,0,1,248,8,8, | ||||
|   2,2,2,6,2,6,64,128,5,7,7,6,0,0,248,136, | ||||
|   168,136,152,168,248,5,1,1,6,0,6,248,4,4,4,6, | ||||
|   0,3,96,144,144,96,5,7,7,6,0,0,32,32,248,32, | ||||
|   32,0,248,4,5,5,6,0,3,96,144,32,64,240,3,5, | ||||
|   5,6,0,3,224,32,224,32,224,2,2,2,6,2,6,64, | ||||
|   128,5,8,8,6,0,255,136,136,136,136,152,232,128,128,5, | ||||
|   7,7,6,0,0,120,152,152,120,24,24,24,2,2,2,6, | ||||
|   2,2,192,192,2,2,2,6,2,255,64,128,3,5,5,6, | ||||
|   0,3,64,192,64,64,224,5,7,7,6,0,1,112,136,136, | ||||
|   136,112,0,248,5,5,5,6,0,1,160,80,40,80,160,5, | ||||
|   7,7,6,0,0,136,144,168,88,184,8,8,5,7,7,6, | ||||
|   0,0,136,144,184,72,152,32,56,5,8,8,6,0,0,192, | ||||
|   64,192,72,216,56,8,8,5,7,7,6,0,0,32,0,32, | ||||
|   64,128,136,112,5,8,8,6,0,0,64,32,0,112,136,248, | ||||
|   136,136,5,8,8,6,0,0,16,32,0,112,136,248,136,136, | ||||
|   5,8,8,6,0,0,32,80,0,112,136,248,136,136,5,8, | ||||
|   8,6,0,0,104,144,0,112,136,248,136,136,5,8,8,6, | ||||
|   0,0,80,0,112,136,136,248,136,136,5,8,8,6,0,0, | ||||
|   32,80,32,112,136,248,136,136,5,7,7,6,0,0,56,96, | ||||
|   160,184,224,160,184,5,8,8,6,0,255,112,136,128,128,136, | ||||
|   112,32,96,5,8,8,6,0,0,64,32,0,248,128,240,128, | ||||
|   248,5,8,8,6,0,0,8,16,0,248,128,240,128,248,5, | ||||
|   8,8,6,0,0,32,80,0,248,128,240,128,248,5,7,7, | ||||
|   6,0,0,80,0,248,128,240,128,248,3,8,8,6,1,0, | ||||
|   128,64,0,224,64,64,64,224,3,8,8,6,1,0,32,64, | ||||
|   0,224,64,64,64,224,3,8,8,6,1,0,64,160,0,224, | ||||
|   64,64,64,224,3,7,7,6,1,0,160,0,224,64,64,64, | ||||
|   224,5,7,7,6,0,0,112,72,72,232,72,72,112,5,8, | ||||
|   8,6,0,0,104,144,0,136,200,168,152,136,5,8,8,6, | ||||
|   0,0,64,32,112,136,136,136,136,112,5,8,8,6,0,0, | ||||
|   16,32,112,136,136,136,136,112,5,8,8,6,0,0,32,80, | ||||
|   0,112,136,136,136,112,5,8,8,6,0,0,104,144,0,112, | ||||
|   136,136,136,112,5,8,8,6,0,0,80,0,112,136,136,136, | ||||
|   136,112,5,5,5,6,0,1,136,80,32,80,136,5,8,8, | ||||
|   6,0,255,16,112,168,168,168,168,112,64,5,8,8,6,0, | ||||
|   0,64,32,136,136,136,136,136,112,5,8,8,6,0,0,16, | ||||
|   32,136,136,136,136,136,112,5,8,8,6,0,0,32,80,0, | ||||
|   136,136,136,136,112,5,8,8,6,0,0,80,0,136,136,136, | ||||
|   136,136,112,5,8,8,6,0,0,16,32,136,80,32,32,32, | ||||
|   32,5,9,9,6,0,255,192,64,112,72,72,112,64,64,224, | ||||
|   4,8,8,6,1,255,96,144,144,160,144,144,224,128,5,8, | ||||
|   8,6,0,0,64,32,0,112,8,120,136,120,5,8,8,6, | ||||
|   0,0,16,32,0,112,8,120,136,120,5,8,8,6,0,0, | ||||
|   32,80,0,112,8,120,136,120,5,8,8,6,0,0,104,144, | ||||
|   0,112,8,120,136,120,5,7,7,6,0,0,80,0,112,8, | ||||
|   120,136,120,5,8,8,6,0,0,32,80,32,112,8,120,136, | ||||
|   120,5,6,6,6,0,0,208,40,120,160,168,80,5,6,6, | ||||
|   6,0,255,112,128,136,112,32,96,5,8,8,6,0,0,64, | ||||
|   32,0,112,136,248,128,112,5,8,8,6,0,0,16,32,0, | ||||
|   112,136,248,128,112,5,8,8,6,0,0,32,80,0,112,136, | ||||
|   248,128,112,5,7,7,6,0,0,80,0,112,136,248,128,112, | ||||
|   3,8,8,6,1,0,128,64,0,64,192,64,64,224,3,8, | ||||
|   8,6,1,0,32,64,0,64,192,64,64,224,3,8,8,6, | ||||
|   1,0,64,160,0,64,192,64,64,224,3,7,7,6,1,0, | ||||
|   160,0,64,192,64,64,224,5,7,7,6,0,0,160,64,160, | ||||
|   16,120,136,112,5,8,8,6,0,0,104,144,0,176,200,136, | ||||
|   136,136,5,8,8,6,0,0,64,32,0,112,136,136,136,112, | ||||
|   5,8,8,6,0,0,16,32,0,112,136,136,136,112,5,8, | ||||
|   8,6,0,0,32,80,0,112,136,136,136,112,5,8,8,6, | ||||
|   0,0,104,144,0,112,136,136,136,112,5,7,7,6,0,0, | ||||
|   80,0,112,136,136,136,112,5,5,5,6,0,1,32,0,248, | ||||
|   0,32,5,8,8,6,0,0,64,240,200,136,136,152,120,16, | ||||
|   5,8,8,6,0,0,192,248,136,136,136,136,136,248,5,5, | ||||
|   5,6,0,1,32,48,248,48,32,5,8,8,6,0,0,32, | ||||
|   112,248,32,32,32,32,224,5,9,9,6,0,255,32,112,168, | ||||
|   168,184,136,136,112,32,5,9,9,6,0,255,224,128,192,176, | ||||
|   168,40,48,40,40,5,9,9,6,0,255,248,168,136,136,136, | ||||
|   136,136,168,248,5,10,10,6,0,254,32,80,80,80,80,136, | ||||
|   168,168,136,112}; | ||||
| @@ -1,337 +0,0 @@ | ||||
| /* | ||||
|   Fontname: -Misc-Fixed-Medium-R-Normal--9-90-75-75-C-60-ISO10646-1 | ||||
|   Copyright: Public domain font.  Share and enjoy. | ||||
|   Capital A Height: 6, '1' Height: 6 | ||||
|   Calculated Max Values w= 6 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 7 len= 9 | ||||
|   Font Bounding box     w= 6 h= 9 x= 0 y=-2 | ||||
|   Calculated Min Values           x= 0 y=-2 dx= 0 dy= 0 | ||||
|   Pure Font   ascent = 6 descent=-2 | ||||
|   X Font      ascent = 6 descent=-2 | ||||
|   Max Font    ascent = 7 descent=-2 | ||||
| */ | ||||
| #include <utility/u8g.h> | ||||
| const u8g_fntpgm_uint8_t u8g_font_6x9[2300] U8G_SECTION(".progmem.u8g_font_6x9") = { | ||||
|   0,6,9,0,254,6,1,137,2,254,32,255,254,7,254,6, | ||||
|   254,0,0,0,6,0,7,1,6,6,6,2,0,128,128,128, | ||||
|   128,0,128,3,3,3,6,1,3,160,160,160,5,7,7,6, | ||||
|   0,255,80,80,248,80,248,80,80,5,9,9,6,0,254,32, | ||||
|   112,168,160,112,40,168,112,32,6,8,8,6,0,255,64,168, | ||||
|   72,16,32,72,84,8,5,7,7,6,0,255,96,144,144,96, | ||||
|   152,144,104,1,3,3,6,2,3,128,128,128,2,7,7,6, | ||||
|   2,255,64,128,128,128,128,128,64,2,7,7,6,2,255,128, | ||||
|   64,64,64,64,64,128,5,5,5,6,0,0,136,80,248,80, | ||||
|   136,5,5,5,6,0,0,32,32,248,32,32,2,4,4,6, | ||||
|   2,254,192,64,64,128,5,1,1,6,0,2,248,2,2,2, | ||||
|   6,2,0,192,192,4,6,6,6,1,0,16,16,32,64,128, | ||||
|   128,4,6,6,6,1,0,96,144,144,144,144,96,3,6,6, | ||||
|   6,1,0,64,192,64,64,64,224,4,6,6,6,1,0,96, | ||||
|   144,16,32,64,240,4,6,6,6,1,0,240,32,96,16,16, | ||||
|   224,5,6,6,6,0,0,16,48,80,144,248,16,4,6,6, | ||||
|   6,1,0,240,128,224,16,16,224,4,6,6,6,1,0,96, | ||||
|   128,224,144,144,96,4,6,6,6,1,0,240,16,16,32,64, | ||||
|   64,4,6,6,6,1,0,96,144,96,144,144,96,4,6,6, | ||||
|   6,1,0,96,144,144,112,16,96,2,5,5,6,2,0,192, | ||||
|   192,0,192,192,2,7,7,6,2,254,192,192,0,192,64,64, | ||||
|   128,5,5,5,6,0,0,24,96,128,96,24,5,3,3,6, | ||||
|   0,1,248,0,248,5,5,5,6,0,0,192,48,8,48,192, | ||||
|   4,7,7,6,1,0,96,144,16,96,64,0,64,5,6,6, | ||||
|   6,0,0,112,144,168,176,128,112,5,6,6,6,0,0,32, | ||||
|   80,136,248,136,136,5,6,6,6,0,0,240,136,240,136,136, | ||||
|   240,4,6,6,6,1,0,96,144,128,128,144,96,4,6,6, | ||||
|   6,1,0,224,144,144,144,144,224,4,6,6,6,1,0,240, | ||||
|   128,224,128,128,240,4,6,6,6,1,0,240,128,224,128,128, | ||||
|   128,4,6,6,6,1,0,96,144,128,176,144,96,4,6,6, | ||||
|   6,1,0,144,144,240,144,144,144,3,6,6,6,1,0,224, | ||||
|   64,64,64,64,224,5,6,6,6,0,0,56,16,16,16,144, | ||||
|   96,4,6,6,6,1,0,144,160,192,160,144,144,4,6,6, | ||||
|   6,1,0,128,128,128,128,128,240,5,6,6,6,0,0,136, | ||||
|   216,168,168,136,136,4,6,6,6,1,0,144,208,176,144,144, | ||||
|   144,5,6,6,6,0,0,112,136,136,136,136,112,4,6,6, | ||||
|   6,1,0,224,144,144,224,128,128,4,7,7,6,1,255,96, | ||||
|   144,144,208,176,96,16,4,6,6,6,1,0,224,144,144,224, | ||||
|   144,144,4,6,6,6,1,0,96,144,64,32,144,96,5,6, | ||||
|   6,6,0,0,248,32,32,32,32,32,4,6,6,6,1,0, | ||||
|   144,144,144,144,144,96,4,6,6,6,1,0,144,144,144,240, | ||||
|   96,96,5,6,6,6,0,0,136,136,168,168,216,136,5,6, | ||||
|   6,6,0,0,136,80,32,32,80,136,5,6,6,6,0,0, | ||||
|   136,136,80,32,32,32,4,6,6,6,1,0,240,16,32,64, | ||||
|   128,240,3,6,6,6,1,0,224,128,128,128,128,224,4,6, | ||||
|   6,6,1,0,128,128,64,32,16,16,3,6,6,6,1,0, | ||||
|   224,32,32,32,32,224,5,3,3,6,0,3,32,80,136,5, | ||||
|   1,1,6,0,254,248,2,2,2,6,2,4,128,64,4,4, | ||||
|   4,6,1,0,112,144,144,112,4,6,6,6,1,0,128,128, | ||||
|   224,144,144,224,4,4,4,6,1,0,112,128,128,112,4,6, | ||||
|   6,6,1,0,16,16,112,144,144,112,4,4,4,6,1,0, | ||||
|   96,176,192,112,4,6,6,6,1,0,32,80,64,224,64,64, | ||||
|   4,6,6,6,1,254,96,144,144,112,16,96,4,6,6,6, | ||||
|   1,0,128,128,224,144,144,144,3,6,6,6,1,0,64,0, | ||||
|   192,64,64,224,3,8,8,6,1,254,32,0,96,32,32,32, | ||||
|   160,64,4,6,6,6,1,0,128,128,160,192,160,144,3,6, | ||||
|   6,6,1,0,192,64,64,64,64,224,5,4,4,6,0,0, | ||||
|   208,168,168,136,4,4,4,6,1,0,224,144,144,144,4,4, | ||||
|   4,6,1,0,96,144,144,96,4,6,6,6,1,254,224,144, | ||||
|   144,224,128,128,4,6,6,6,1,254,112,144,144,112,16,16, | ||||
|   4,4,4,6,1,0,160,208,128,128,4,4,4,6,1,0, | ||||
|   112,192,48,224,4,6,6,6,1,0,64,64,224,64,80,32, | ||||
|   4,4,4,6,1,0,144,144,144,112,4,4,4,6,1,0, | ||||
|   144,144,96,96,5,4,4,6,0,0,136,168,168,80,4,4, | ||||
|   4,6,1,0,144,96,96,144,4,6,6,6,1,254,144,144, | ||||
|   144,112,144,96,4,4,4,6,1,0,240,32,64,240,3,7, | ||||
|   7,6,1,0,32,64,64,128,64,64,32,1,7,7,6,2, | ||||
|   255,128,128,128,128,128,128,128,3,7,7,6,1,0,128,64, | ||||
|   64,32,64,64,128,4,2,2,6,1,3,80,160,255,255,255, | ||||
|   255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, | ||||
|   255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0, | ||||
|   0,6,0,7,1,6,6,6,2,0,128,0,128,128,128,128, | ||||
|   4,6,6,6,1,255,32,112,160,160,112,32,5,7,7,6, | ||||
|   0,255,48,72,64,240,64,64,248,5,5,5,6,0,0,168, | ||||
|   80,136,80,168,5,6,6,6,0,0,136,80,248,32,248,32, | ||||
|   1,7,7,6,2,255,128,128,128,0,128,128,128,4,7,7, | ||||
|   6,1,255,112,128,96,144,96,16,224,3,1,1,6,1,5, | ||||
|   160,6,7,7,6,0,0,120,132,148,164,148,132,120,3,5, | ||||
|   5,6,1,1,96,160,96,0,224,5,5,5,6,0,0,40, | ||||
|   80,160,80,40,4,3,3,6,1,0,240,16,16,4,1,1, | ||||
|   6,1,2,240,6,7,7,6,0,0,120,132,180,164,164,132, | ||||
|   120,4,1,1,6,1,5,240,4,3,3,6,1,2,96,144, | ||||
|   96,5,7,7,6,0,255,32,32,248,32,32,0,248,3,5, | ||||
|   5,6,1,1,64,160,32,64,224,3,5,5,6,1,1,192, | ||||
|   32,64,32,192,2,2,2,6,2,4,64,128,4,5,5,6, | ||||
|   1,255,144,144,176,208,128,5,6,6,6,0,0,120,232,232, | ||||
|   104,40,40,1,1,1,6,2,2,128,2,2,2,6,2,254, | ||||
|   64,128,3,5,5,6,1,1,64,192,64,64,224,3,5,5, | ||||
|   6,1,1,64,160,64,0,224,5,5,5,6,0,0,160,80, | ||||
|   40,80,160,5,8,8,6,0,255,64,192,64,80,112,48,120, | ||||
|   16,5,8,8,6,0,255,64,192,64,80,104,8,16,56,5, | ||||
|   8,8,6,0,255,192,32,64,48,240,48,120,16,4,7,7, | ||||
|   6,1,0,32,0,32,96,128,144,96,5,7,7,6,0,0, | ||||
|   64,32,32,80,112,136,136,5,7,7,6,0,0,16,32,32, | ||||
|   80,112,136,136,5,7,7,6,0,0,32,80,32,80,112,136, | ||||
|   136,5,7,7,6,0,0,40,80,32,80,112,136,136,5,7, | ||||
|   7,6,0,0,80,0,32,80,112,136,136,5,7,7,6,0, | ||||
|   0,32,80,32,80,112,136,136,5,6,6,6,0,0,120,160, | ||||
|   240,160,160,184,4,8,8,6,1,254,96,144,128,128,144,96, | ||||
|   32,64,4,7,7,6,1,0,64,32,240,128,224,128,240,4, | ||||
|   7,7,6,1,0,32,64,240,128,224,128,240,4,7,7,6, | ||||
|   1,0,32,80,240,128,224,128,240,4,7,7,6,1,0,80, | ||||
|   0,240,128,224,128,240,3,7,7,6,1,0,128,64,224,64, | ||||
|   64,64,224,3,7,7,6,1,0,32,64,224,64,64,64,224, | ||||
|   3,7,7,6,1,0,64,160,224,64,64,64,224,3,7,7, | ||||
|   6,1,0,160,0,224,64,64,64,224,5,6,6,6,0,0, | ||||
|   112,72,232,72,72,112,4,7,7,6,1,0,80,160,144,208, | ||||
|   176,144,144,4,7,7,6,1,0,64,32,96,144,144,144,96, | ||||
|   4,7,7,6,1,0,32,64,96,144,144,144,96,4,7,7, | ||||
|   6,1,0,32,80,96,144,144,144,96,4,7,7,6,1,0, | ||||
|   80,160,96,144,144,144,96,4,7,7,6,1,0,80,0,96, | ||||
|   144,144,144,96,5,5,5,6,0,0,136,80,32,80,136,4, | ||||
|   8,8,6,1,255,16,112,176,176,208,208,224,128,4,7,7, | ||||
|   6,1,0,64,32,144,144,144,144,96,4,7,7,6,1,0, | ||||
|   32,64,144,144,144,144,96,4,7,7,6,1,0,32,80,144, | ||||
|   144,144,144,96,4,7,7,6,1,0,80,0,144,144,144,144, | ||||
|   96,5,7,7,6,0,0,16,32,136,80,32,32,32,4,6, | ||||
|   6,6,1,0,128,224,144,144,224,128,4,6,6,6,1,0, | ||||
|   96,144,160,160,144,160,4,7,7,6,1,0,64,32,0,112, | ||||
|   144,144,112,4,7,7,6,1,0,32,64,0,112,144,144,112, | ||||
|   4,7,7,6,1,0,32,80,0,112,144,144,112,4,7,7, | ||||
|   6,1,0,80,160,0,112,144,144,112,4,6,6,6,1,0, | ||||
|   80,0,112,144,144,112,4,7,7,6,1,0,32,80,32,112, | ||||
|   144,144,112,5,4,4,6,0,0,112,168,176,120,4,6,6, | ||||
|   6,1,254,112,128,128,112,32,64,4,7,7,6,1,0,64, | ||||
|   32,0,96,176,192,112,4,7,7,6,1,0,32,64,0,96, | ||||
|   176,192,112,4,7,7,6,1,0,32,80,0,96,176,192,112, | ||||
|   4,6,6,6,1,0,80,0,96,176,192,112,3,7,7,6, | ||||
|   1,0,128,64,0,192,64,64,224,3,7,7,6,1,0,32, | ||||
|   64,0,192,64,64,224,3,7,7,6,1,0,64,160,0,192, | ||||
|   64,64,224,3,6,6,6,1,0,160,0,192,64,64,224,4, | ||||
|   7,7,6,1,0,48,96,16,112,144,144,96,4,7,7,6, | ||||
|   1,0,80,160,0,224,144,144,144,4,7,7,6,1,0,64, | ||||
|   32,0,96,144,144,96,4,7,7,6,1,0,32,64,0,96, | ||||
|   144,144,96,4,7,7,6,1,0,32,80,0,96,144,144,96, | ||||
|   4,7,7,6,1,0,80,160,0,96,144,144,96,4,6,6, | ||||
|   6,1,0,80,0,96,144,144,96,5,5,5,6,0,0,32, | ||||
|   0,248,0,32,4,4,4,6,1,0,112,176,208,224,4,7, | ||||
|   7,6,1,0,64,32,0,144,144,144,112,4,7,7,6,1, | ||||
|   0,32,64,0,144,144,144,112,4,7,7,6,1,0,32,80, | ||||
|   0,144,144,144,112,4,6,6,6,1,0,80,0,144,144,144, | ||||
|   112,4,9,9,6,1,254,32,64,0,144,144,144,112,144,96, | ||||
|   4,8,8,6,1,254,128,128,224,144,144,224,128,128,4,8, | ||||
|   8,6,1,254,80,0,144,144,144,112,144,96}; | ||||
|  | ||||
| // STB Marlin | ||||
| /* | ||||
|   Fontname: u8g_font_6x10_marlin | ||||
|   Copyright: Public domain terminal emulator font.  Share and enjoy. | ||||
|   Capital A Height: 7, '1' Height: 7 | ||||
|   Calculated Max Values w= 6 h=10 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len=10 | ||||
|   Font Bounding box     w= 6 h= 9 x= 0 y=-2 | ||||
|   Calculated Min Values           x= 0 y=-2 dx= 0 dy= 0 | ||||
|   Pure Font   ascent = 7 descent=-2 | ||||
|   X Font      ascent = 7 descent=-2 | ||||
|   Max Font    ascent = 8 descent=-2 | ||||
| */ | ||||
| #include <utility/u8g.h> | ||||
| const u8g_fntpgm_uint8_t u8g_font_6x10_marlin[2617] U8G_SECTION(".progmem.u8g_font_6x10_marlin") = { | ||||
|   0,6,9,0,254,7,1,153,3,43,32,255,254,8,254,7, | ||||
|   254,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128, | ||||
|   128,128,0,128,3,3,3,6,1,4,160,160,160,5,7,7, | ||||
|   6,0,0,80,80,248,80,248,80,80,5,7,7,6,0,0, | ||||
|   32,112,160,112,40,112,32,5,7,7,6,0,0,72,168,80, | ||||
|   32,80,168,144,5,7,7,6,0,0,64,160,160,64,168,144, | ||||
|   104,1,3,3,6,2,4,128,128,128,3,7,7,6,1,0, | ||||
|   32,64,128,128,128,64,32,3,7,7,6,1,0,128,64,32, | ||||
|   32,32,64,128,5,5,5,6,0,1,136,80,248,80,136,5, | ||||
|   5,5,6,0,1,32,32,248,32,32,3,3,3,6,1,255, | ||||
|   96,64,128,5,1,1,6,0,3,248,3,3,3,6,1,255, | ||||
|   64,224,64,5,7,7,6,0,0,8,8,16,32,64,128,128, | ||||
|   5,7,7,6,0,0,32,80,136,136,136,80,32,5,7,7, | ||||
|   6,0,0,32,96,160,32,32,32,248,5,7,7,6,0,0, | ||||
|   112,136,8,48,64,128,248,5,7,7,6,0,0,248,8,16, | ||||
|   48,8,136,112,5,7,7,6,0,0,16,48,80,144,248,16, | ||||
|   16,5,7,7,6,0,0,248,128,176,200,8,136,112,5,7, | ||||
|   7,6,0,0,48,64,128,176,200,136,112,5,7,7,6,0, | ||||
|   0,248,8,16,16,32,64,64,5,7,7,6,0,0,112,136, | ||||
|   136,112,136,136,112,5,7,7,6,0,0,112,136,152,104,8, | ||||
|   16,96,3,7,7,6,1,255,64,224,64,0,64,224,64,3, | ||||
|   7,7,6,1,255,64,224,64,0,96,64,128,4,7,7,6, | ||||
|   1,0,16,32,64,128,64,32,16,5,3,3,6,0,2,248, | ||||
|   0,248,4,7,7,6,1,0,128,64,32,16,32,64,128,5, | ||||
|   7,7,6,0,0,112,136,16,32,32,0,32,5,7,7,6, | ||||
|   0,0,112,136,152,168,176,128,112,5,7,7,6,0,0,32, | ||||
|   80,136,136,248,136,136,5,7,7,6,0,0,240,72,72,112, | ||||
|   72,72,240,5,7,7,6,0,0,112,136,128,128,128,136,112, | ||||
|   5,7,7,6,0,0,240,72,72,72,72,72,240,5,7,7, | ||||
|   6,0,0,248,128,128,240,128,128,248,5,7,7,6,0,0, | ||||
|   248,128,128,240,128,128,128,5,7,7,6,0,0,112,136,128, | ||||
|   128,152,136,112,5,7,7,6,0,0,136,136,136,248,136,136, | ||||
|   136,3,7,7,6,1,0,224,64,64,64,64,64,224,5,7, | ||||
|   7,6,0,0,56,16,16,16,16,144,96,5,7,7,6,0, | ||||
|   0,136,144,160,192,160,144,136,5,7,7,6,0,0,128,128, | ||||
|   128,128,128,128,248,5,7,7,6,0,0,136,136,216,168,136, | ||||
|   136,136,5,7,7,6,0,0,136,136,200,168,152,136,136,5, | ||||
|   7,7,6,0,0,112,136,136,136,136,136,112,5,7,7,6, | ||||
|   0,0,240,136,136,240,128,128,128,5,8,8,6,0,255,112, | ||||
|   136,136,136,136,168,112,8,5,7,7,6,0,0,240,136,136, | ||||
|   240,160,144,136,5,7,7,6,0,0,112,136,128,112,8,136, | ||||
|   112,5,7,7,6,0,0,248,32,32,32,32,32,32,5,7, | ||||
|   7,6,0,0,136,136,136,136,136,136,112,5,7,7,6,0, | ||||
|   0,136,136,136,80,80,80,32,5,7,7,6,0,0,136,136, | ||||
|   136,168,168,216,136,5,7,7,6,0,0,136,136,80,32,80, | ||||
|   136,136,5,7,7,6,0,0,136,136,80,32,32,32,32,5, | ||||
|   7,7,6,0,0,248,8,16,32,64,128,248,3,7,7,6, | ||||
|   1,0,224,128,128,128,128,128,224,5,7,7,6,0,0,128, | ||||
|   128,64,32,16,8,8,3,7,7,6,1,0,224,32,32,32, | ||||
|   32,32,224,5,3,3,6,0,4,32,80,136,5,1,1,6, | ||||
|   0,255,248,2,2,2,6,2,6,128,64,5,5,5,6,0, | ||||
|   0,112,8,120,136,120,5,7,7,6,0,0,128,128,176,200, | ||||
|   136,200,176,5,5,5,6,0,0,112,136,128,136,112,5,7, | ||||
|   7,6,0,0,8,8,104,152,136,152,104,5,5,5,6,0, | ||||
|   0,112,136,248,128,112,5,7,7,6,0,0,48,72,64,240, | ||||
|   64,64,64,5,7,7,6,0,254,120,136,136,120,8,136,112, | ||||
|   5,7,7,6,0,0,128,128,176,200,136,136,136,3,7,7, | ||||
|   6,1,0,64,0,192,64,64,64,224,4,9,9,6,1,254, | ||||
|   16,0,48,16,16,16,144,144,96,5,7,7,6,0,0,128, | ||||
|   128,136,144,224,144,136,3,7,7,6,1,0,192,64,64,64, | ||||
|   64,64,224,5,5,5,6,0,0,208,168,168,168,136,5,5, | ||||
|   5,6,0,0,176,200,136,136,136,5,5,5,6,0,0,112, | ||||
|   136,136,136,112,5,7,7,6,0,254,176,200,136,200,176,128, | ||||
|   128,5,7,7,6,0,254,104,152,136,152,104,8,8,5,5, | ||||
|   5,6,0,0,176,200,128,128,128,5,5,5,6,0,0,112, | ||||
|   128,112,8,240,5,7,7,6,0,0,64,64,240,64,64,72, | ||||
|   48,5,5,5,6,0,0,136,136,136,152,104,5,5,5,6, | ||||
|   0,0,136,136,80,80,32,5,5,5,6,0,0,136,136,168, | ||||
|   168,80,5,5,5,6,0,0,136,80,32,80,136,5,7,7, | ||||
|   6,0,254,136,136,152,104,8,136,112,5,5,5,6,0,0, | ||||
|   248,16,32,64,248,4,7,7,6,1,0,48,64,32,192,32, | ||||
|   64,48,1,7,7,6,2,0,128,128,128,128,128,128,128,4, | ||||
|   7,7,6,1,0,192,32,64,48,64,32,192,5,3,3,6, | ||||
|   0,4,72,168,144,0,0,0,1,0,0,0,0,0,1,0, | ||||
|   0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0, | ||||
|   1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0, | ||||
|   0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0, | ||||
|   0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0, | ||||
|   1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0, | ||||
|   0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0, | ||||
|   0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0, | ||||
|   1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0, | ||||
|   0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0, | ||||
|   0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0, | ||||
|   1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0, | ||||
|   0,0,1,0,0,0,0,0,1,0,0,0,0,0,6,0, | ||||
|   0,1,7,7,6,2,0,128,0,128,128,128,128,128,5,7, | ||||
|   7,6,0,255,32,120,160,160,160,120,32,5,7,7,6,0, | ||||
|   0,48,72,64,224,64,72,176,5,5,5,6,0,0,136,112, | ||||
|   80,112,136,5,8,8,6,0,255,136,136,80,32,248,32,32, | ||||
|   32,1,7,7,6,2,0,128,128,128,0,128,128,128,5,8, | ||||
|   8,6,0,255,112,128,224,144,72,56,8,112,3,1,1,6, | ||||
|   1,7,160,5,7,7,6,0,0,112,136,168,200,168,136,112, | ||||
|   4,6,6,6,1,1,112,144,176,80,0,240,6,5,5,6, | ||||
|   0,0,36,72,144,72,36,4,2,2,6,1,2,240,16,4, | ||||
|   1,1,6,1,3,240,5,7,7,6,0,0,112,136,232,200, | ||||
|   200,136,112,5,1,1,6,0,7,248,3,3,3,6,1,4, | ||||
|   64,160,64,5,6,6,6,0,0,32,32,248,32,32,248,4, | ||||
|   5,5,6,1,3,96,144,32,64,240,4,5,5,6,1,3, | ||||
|   224,16,96,16,224,2,2,2,6,2,6,64,128,5,6,6, | ||||
|   6,0,255,136,136,136,200,176,128,5,7,7,6,0,0,120, | ||||
|   232,232,104,40,40,40,1,1,1,6,2,3,128,2,2,2, | ||||
|   6,2,254,64,128,3,5,5,6,1,3,64,192,64,64,224, | ||||
|   4,6,6,6,1,1,96,144,144,96,0,240,6,5,5,6, | ||||
|   0,0,144,72,36,72,144,6,9,9,6,0,255,64,192,64, | ||||
|   64,228,12,20,60,4,6,9,9,6,0,255,64,192,64,64, | ||||
|   232,20,4,8,28,5,9,9,6,0,255,192,32,64,32,200, | ||||
|   24,40,120,8,5,7,7,6,0,0,32,0,32,32,64,136, | ||||
|   112,5,8,8,6,0,0,64,32,112,136,136,248,136,136,5, | ||||
|   8,8,6,0,0,16,32,112,136,136,248,136,136,5,8,8, | ||||
|   6,0,0,32,80,112,136,136,248,136,136,5,8,8,6,0, | ||||
|   0,72,176,112,136,136,248,136,136,5,8,8,6,0,0,80, | ||||
|   0,112,136,136,248,136,136,5,8,8,6,0,0,32,80,112, | ||||
|   136,136,248,136,136,6,7,7,6,0,0,60,80,144,156,240, | ||||
|   144,156,5,9,9,6,0,254,112,136,128,128,128,136,112,32, | ||||
|   64,5,8,8,6,0,0,64,248,128,128,240,128,128,248,5, | ||||
|   8,8,6,0,0,16,248,128,128,240,128,128,248,5,8,8, | ||||
|   6,0,0,32,248,128,128,240,128,128,248,5,8,8,6,0, | ||||
|   0,80,248,128,128,240,128,128,248,3,8,8,6,1,0,128, | ||||
|   64,224,64,64,64,64,224,3,8,8,6,1,0,32,64,224, | ||||
|   64,64,64,64,224,3,8,8,6,1,0,64,160,224,64,64, | ||||
|   64,64,224,3,8,8,6,1,0,160,0,224,64,64,64,64, | ||||
|   224,5,7,7,6,0,0,240,72,72,232,72,72,240,5,8, | ||||
|   8,6,0,0,40,80,136,200,168,152,136,136,5,8,8,6, | ||||
|   0,0,64,32,112,136,136,136,136,112,5,8,8,6,0,0, | ||||
|   16,32,112,136,136,136,136,112,5,8,8,6,0,0,32,80, | ||||
|   112,136,136,136,136,112,5,8,8,6,0,0,40,80,112,136, | ||||
|   136,136,136,112,5,8,8,6,0,0,80,0,112,136,136,136, | ||||
|   136,112,5,5,5,6,0,0,136,80,32,80,136,5,7,7, | ||||
|   6,0,0,112,152,152,168,200,200,112,5,8,8,6,0,0, | ||||
|   64,32,136,136,136,136,136,112,5,8,8,6,0,0,16,32, | ||||
|   136,136,136,136,136,112,5,8,8,6,0,0,32,80,0,136, | ||||
|   136,136,136,112,5,8,8,6,0,0,80,0,136,136,136,136, | ||||
|   136,112,5,8,8,6,0,0,16,32,136,136,80,32,32,32, | ||||
|   5,7,7,6,0,0,128,240,136,240,128,128,128,5,7,7, | ||||
|   6,0,0,112,136,144,160,144,136,176,5,8,8,6,0,0, | ||||
|   64,32,0,112,8,120,136,120,5,8,8,6,0,0,16,32, | ||||
|   0,112,8,120,136,120,5,8,8,6,0,0,32,80,0,112, | ||||
|   8,120,136,120,5,8,8,6,0,0,40,80,0,112,8,120, | ||||
|   136,120,5,7,7,6,0,0,80,0,112,8,120,136,120,5, | ||||
|   8,8,6,0,0,32,80,32,112,8,120,136,120,6,5,5, | ||||
|   6,0,0,120,20,124,144,124,5,7,7,6,0,254,112,136, | ||||
|   128,136,112,32,64,5,8,8,6,0,0,64,32,0,112,136, | ||||
|   248,128,112,5,8,8,6,0,0,16,32,0,112,136,248,128, | ||||
|   112,5,8,8,6,0,0,32,80,0,112,136,248,128,112,5, | ||||
|   7,7,6,0,0,80,0,112,136,248,128,112,3,8,8,6, | ||||
|   1,0,128,64,0,192,64,64,64,224,3,8,8,6,1,0, | ||||
|   64,128,0,192,64,64,64,224,3,8,8,6,1,0,64,160, | ||||
|   0,192,64,64,64,224,6,10,10,6,0,254,164,168,0,252, | ||||
|   132,128,128,128,132,252,6,10,10,6,0,254,84,148,0,252, | ||||
|   132,4,4,4,132,252,5,8,8,6,0,0,40,80,0,176, | ||||
|   200,136,136,136,5,8,8,6,0,0,64,32,0,112,136,136, | ||||
|   136,112,4,10,10,6,2,254,48,64,128,144,144,144,144,144, | ||||
|   144,144,4,10,10,6,0,254,192,32,16,144,144,144,144,144, | ||||
|   144,144,6,7,7,6,0,1,68,140,140,132,128,64,60,6, | ||||
|   7,7,6,0,1,136,196,196,132,4,8,240,5,5,5,6, | ||||
|   0,1,32,0,248,0,32,5,8,8,6,0,0,64,240,200, | ||||
|   136,136,152,120,16,5,8,8,6,0,0,224,248,136,136,136, | ||||
|   136,136,248,5,5,5,6,0,1,32,48,248,48,32,5,8, | ||||
|   8,6,0,0,32,112,248,32,32,32,32,224,5,9,9,6, | ||||
|   0,255,32,112,168,168,184,136,136,80,32,5,9,9,6,0, | ||||
|   255,224,128,192,176,168,168,48,40,40,5,9,9,6,0,255, | ||||
|   248,168,136,136,136,136,136,168,248,5,10,10,6,0,254,32, | ||||
|   80,80,80,80,136,168,168,136,112}; | ||||
|    | ||||
| @@ -32,7 +32,7 @@ | ||||
|  | ||||
| #include <U8glib.h> | ||||
| #include "DOGMbitmaps.h" | ||||
| #include "dogm_font_data_marlin.h" | ||||
| #include "dogm_font_data_ISO10646_1_Marlin.h" | ||||
| #include "ultralcd.h" | ||||
| #include "ultralcd_st7920_u8glib_rrd.h" | ||||
|  | ||||
| @@ -48,8 +48,7 @@ | ||||
| */ | ||||
|  | ||||
| #define USE_BIG_EDIT_FONT                // save 3120 bytes of PROGMEM by commenting out this line | ||||
| #define FONT_STATUSMENU u8g_font_6x9 | ||||
| #define FONT_MENU u8g_font_6x10_marlin | ||||
| #define FONT_MENU ISO10646_1_Marlin_5x7 | ||||
|  | ||||
| // DOGM parameters (size in pixels) | ||||
| #define DOG_CHAR_WIDTH         6 | ||||
| @@ -60,12 +59,14 @@ | ||||
|   #define DOG_CHAR_HEIGHT_EDIT 18 | ||||
|   #define LCD_WIDTH_EDIT       14 | ||||
| #else | ||||
|   #define FONT_MENU_EDIT u8g_font_6x10_marlin | ||||
|   #define FONT_MENU_EDIT ISO10646_1_Marlin_5x7 | ||||
|   #define DOG_CHAR_WIDTH_EDIT  6 | ||||
|   #define DOG_CHAR_HEIGHT_EDIT 12 | ||||
|   #define LCD_WIDTH_EDIT       22 | ||||
| #endif | ||||
|  | ||||
| #define FONT_STATUSMENU FONT_MENU | ||||
|  | ||||
| #define START_ROW              0 | ||||
|  | ||||
| /* Custom characters defined in font font_6x10_marlin.c */ | ||||
| @@ -153,10 +154,10 @@ static void _draw_heater_status(int x, int heater) { | ||||
|   bool isBed = heater < 0; | ||||
|   int y = 17 + (isBed ? 1 : 0); | ||||
|   u8g.setFont(FONT_STATUSMENU); | ||||
|   u8g.setPrintPos(x,6); | ||||
|   u8g.setPrintPos(x,7); | ||||
|   u8g.print(itostr3(int((heater >= 0 ? degTargetHotend(heater) : degTargetBed()) + 0.5))); | ||||
|   lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); | ||||
|   u8g.setPrintPos(x,27); | ||||
|   u8g.setPrintPos(x,28); | ||||
|   u8g.print(itostr3(int(heater >= 0 ? degHotend(heater) : degBed()) + 0.5)); | ||||
|   lcd_printPGM(PSTR(LCD_STR_DEGREE " ")); | ||||
|   if (!isHeatingHotend(0)) { | ||||
| @@ -221,7 +222,7 @@ static void lcd_implementation_status_screen() { | ||||
|     int per = ((fanSpeed + 1) * 100) / 256; | ||||
|     if (per) { | ||||
|       u8g.print(itostr3(per)); | ||||
|       u8g.print("%"); | ||||
|       u8g.print('%'); | ||||
|     } | ||||
|     else | ||||
|   #endif | ||||
| @@ -234,7 +235,7 @@ static void lcd_implementation_status_screen() { | ||||
|   u8g.drawBox(0,29,128,10); | ||||
|   u8g.setColorIndex(0); // white on black | ||||
|   u8g.setPrintPos(2,37); | ||||
|   u8g.print("X"); | ||||
|   u8g.print('X'); | ||||
|   u8g.drawPixel(8,33); | ||||
|   u8g.drawPixel(8,35); | ||||
|   u8g.setPrintPos(10,37); | ||||
| @@ -246,7 +247,7 @@ static void lcd_implementation_status_screen() { | ||||
|   u8g.setPrintPos(51,37); | ||||
|   u8g.print(ftostr31ns(current_position[Y_AXIS])); | ||||
|   u8g.setPrintPos(83,37); | ||||
|   u8g.print("Z"); | ||||
|   u8g.print('Z'); | ||||
|   u8g.drawPixel(89,33); | ||||
|   u8g.drawPixel(89,35); | ||||
|   u8g.setPrintPos(91,37); | ||||
| @@ -281,8 +282,8 @@ static void lcd_implementation_status_screen() { | ||||
|   #endif | ||||
| } | ||||
|  | ||||
| static void lcd_implementation_mark_as_selected(uint8_t row, char pr_char) { | ||||
|   if ((pr_char == '>') || (pr_char == LCD_STR_UPLEVEL[0] )) { | ||||
| static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) { | ||||
|   if (isSelected) { | ||||
|     u8g.setColorIndex(1);  // black on white | ||||
|     u8g.drawBox(0, row * DOG_CHAR_HEIGHT + 3, 128, DOG_CHAR_HEIGHT); | ||||
|     u8g.setColorIndex(0);  // following text must be white on black | ||||
| @@ -293,11 +294,11 @@ static void lcd_implementation_mark_as_selected(uint8_t row, char pr_char) { | ||||
|   u8g.setPrintPos(START_ROW * DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT); | ||||
| } | ||||
|  | ||||
| static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, char pre_char, char post_char) { | ||||
| static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, const char* pstr, char pre_char, char post_char) { | ||||
|   char c; | ||||
|   uint8_t n = LCD_WIDTH - 2; | ||||
|  | ||||
|   lcd_implementation_mark_as_selected(row, pre_char); | ||||
|   lcd_implementation_mark_as_selected(row, isSelected); | ||||
|  | ||||
|   while ((c = pgm_read_byte(pstr))) { | ||||
|     u8g.print(c); | ||||
| @@ -309,11 +310,11 @@ static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, c | ||||
|   u8g.print(' '); | ||||
| } | ||||
|  | ||||
| static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char pre_char, const char* data, bool pgm) { | ||||
| static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const char* pstr, const char* data, bool pgm) { | ||||
|   char c; | ||||
|   uint8_t n = LCD_WIDTH - 2 - (pgm ? lcd_strlen_P(data) : (lcd_strlen((char*)data))); | ||||
|  | ||||
|   lcd_implementation_mark_as_selected(row, pre_char); | ||||
|   lcd_implementation_mark_as_selected(row, isSelected); | ||||
|  | ||||
|   while ((c = pgm_read_byte(pstr))) { | ||||
|     u8g.print(c); | ||||
| @@ -325,66 +326,48 @@ static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char p | ||||
|   if (pgm) { lcd_printPGM(data); } else { u8g.print(data); } | ||||
| } | ||||
|  | ||||
| #define lcd_implementation_drawmenu_setting_edit_generic(row, pstr, pre_char, data) _drawmenu_setting_edit_generic(row, pstr, pre_char, data, false) | ||||
| #define lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, pre_char, data) _drawmenu_setting_edit_generic(row, pstr, pre_char, data, true) | ||||
| #define lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, data) _drawmenu_setting_edit_generic(sel, row, pstr, data, false) | ||||
| #define lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, data) _drawmenu_setting_edit_generic(sel, row, pstr, data, true) | ||||
|  | ||||
| #define lcd_implementation_drawmenu_setting_edit_int3_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', itostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_int3(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', itostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float3_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float3(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float32_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr32(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float32(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr32(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float43_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr43(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float43(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr43(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float5_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float5(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float52_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr52(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float52(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr52(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float51_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr51(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float51(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr51(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_long5_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_long5(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_bool_selected(row, pstr, pstr2, data) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) | ||||
| #define lcd_implementation_drawmenu_setting_edit_bool(row, pstr, pstr2, data) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, ' ', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) | ||||
| #define lcd_implementation_drawmenu_setting_edit_int3(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, itostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float3(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float32(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr32(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float43(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr43(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float5(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float52(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr52(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float51(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr51(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_long5(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_bool(sel, row, pstr, pstr2, data) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) | ||||
|  | ||||
| //Add version for callback functions | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_int3_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', itostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_int3(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', itostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float3_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float3(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float32_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr32(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float32(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr32(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float43_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr43(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float43(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr43(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float5_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float5(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float52_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr52(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float52(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr52(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float51_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr51(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float51(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr51(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_long5_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_long5(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_bool_selected(row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_bool(row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, ' ', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_int3(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, itostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float3(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float32(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr32(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float43(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr43(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float5(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float52(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr52(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float51(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr51(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_long5(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_bool(sel, row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) | ||||
|  | ||||
| void lcd_implementation_drawedit(const char* pstr, char* value) { | ||||
|   uint8_t rows = 1; | ||||
|   uint8_t lcd_width = LCD_WIDTH; | ||||
|   uint8_t char_width = DOG_CHAR_WIDTH; | ||||
|   uint8_t lcd_width = LCD_WIDTH, char_width = DOG_CHAR_WIDTH; | ||||
|   uint8_t vallen = lcd_strlen(value); | ||||
|  | ||||
|   #ifdef USE_BIG_EDIT_FONT | ||||
|     if (lcd_strlen_P(pstr) <= LCD_WIDTH_EDIT - 1) { | ||||
|       u8g.setFont(FONT_MENU_EDIT); | ||||
|       lcd_width = LCD_WIDTH_EDIT + 1; | ||||
|       char_width = DOG_CHAR_WIDTH_EDIT; | ||||
|       if (lcd_strlen_P(pstr) >= LCD_WIDTH_EDIT - lcd_strlen(value)) rows = 2; | ||||
|       if (lcd_strlen_P(pstr) >= LCD_WIDTH_EDIT - vallen) rows = 2; | ||||
|     } | ||||
|     else { | ||||
|       u8g.setFont(FONT_MENU); | ||||
|     } | ||||
|   #endif | ||||
|  | ||||
|   if (lcd_strlen_P(pstr) > LCD_WIDTH - 2 - lcd_strlen(value)) rows = 2; | ||||
|   if (lcd_strlen_P(pstr) > LCD_WIDTH - 2 - vallen) rows = 2; | ||||
|  | ||||
|   const float kHalfChar = DOG_CHAR_HEIGHT_EDIT / 2; | ||||
|   float rowHeight = u8g.getHeight() / (rows + 1); // 1/(rows+1) = 1/2 or 1/3 | ||||
| @@ -392,23 +375,23 @@ void lcd_implementation_drawedit(const char* pstr, char* value) { | ||||
|   u8g.setPrintPos(0, rowHeight + kHalfChar); | ||||
|   lcd_printPGM(pstr); | ||||
|   u8g.print(':'); | ||||
|   u8g.setPrintPos((lcd_width-1-lcd_strlen(value)) * char_width, rows * rowHeight + kHalfChar); | ||||
|   u8g.setPrintPos((lcd_width - 1 - vallen) * char_width, rows * rowHeight + kHalfChar); | ||||
|   u8g.print(value); | ||||
| } | ||||
|  | ||||
| static void _drawmenu_sd(uint8_t row, const char* pstr, const char* filename, char * const longFilename, bool isDir, bool isSelected) { | ||||
| static void _drawmenu_sd(bool isSelected, uint8_t row, const char* pstr, const char* filename, char * const longFilename, bool isDir) { | ||||
|   char c; | ||||
|   uint8_t n = LCD_WIDTH - 1; | ||||
|  | ||||
|   if (longFilename[0] != '\0') { | ||||
|   if (longFilename[0]) { | ||||
|     filename = longFilename; | ||||
|     longFilename[n] = '\0'; | ||||
|   } | ||||
|  | ||||
|   lcd_implementation_mark_as_selected(row, ((isSelected) ? '>' : ' ')); | ||||
|   lcd_implementation_mark_as_selected(row, isSelected); | ||||
|  | ||||
|   if (isDir) u8g.print(LCD_STR_FOLDER[0]); | ||||
|   while((c = *filename) != '\0') { | ||||
|   while ((c = *filename)) { | ||||
|     u8g.print(c); | ||||
|     filename++; | ||||
|     n--; | ||||
| @@ -416,19 +399,13 @@ static void _drawmenu_sd(uint8_t row, const char* pstr, const char* filename, ch | ||||
|   while (n--) u8g.print(' '); | ||||
| } | ||||
|  | ||||
| #define lcd_implementation_drawmenu_sdfile_selected(row, pstr, filename, longFilename) _drawmenu_sd(row, pstr, filename, longFilename, false, true) | ||||
| #define lcd_implementation_drawmenu_sdfile(row, pstr, filename, longFilename) _drawmenu_sd(row, pstr, filename, longFilename, false, false) | ||||
| #define lcd_implementation_drawmenu_sddirectory_selected(row, pstr, filename, longFilename) _drawmenu_sd(row, pstr, filename, longFilename, true, true) | ||||
| #define lcd_implementation_drawmenu_sddirectory(row, pstr, filename, longFilename) _drawmenu_sd(row, pstr, filename, longFilename, true, false) | ||||
| #define lcd_implementation_drawmenu_sdfile(sel, row, pstr, filename, longFilename) _drawmenu_sd(sel, row, pstr, filename, longFilename, false) | ||||
| #define lcd_implementation_drawmenu_sddirectory(sel, row, pstr, filename, longFilename) _drawmenu_sd(sel, row, pstr, filename, longFilename, true) | ||||
|  | ||||
| #define lcd_implementation_drawmenu_back_selected(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]) | ||||
| #define lcd_implementation_drawmenu_back(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, ' ', LCD_STR_UPLEVEL[0]) | ||||
| #define lcd_implementation_drawmenu_submenu_selected(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, '>', LCD_STR_ARROW_RIGHT[0]) | ||||
| #define lcd_implementation_drawmenu_submenu(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, ' ', LCD_STR_ARROW_RIGHT[0]) | ||||
| #define lcd_implementation_drawmenu_gcode_selected(row, pstr, gcode) lcd_implementation_drawmenu_generic(row, pstr, '>', ' ') | ||||
| #define lcd_implementation_drawmenu_gcode(row, pstr, gcode) lcd_implementation_drawmenu_generic(row, pstr, ' ', ' ') | ||||
| #define lcd_implementation_drawmenu_function_selected(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, '>', ' ') | ||||
| #define lcd_implementation_drawmenu_function(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, ' ', ' ') | ||||
| #define lcd_implementation_drawmenu_back(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]) | ||||
| #define lcd_implementation_drawmenu_submenu(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', LCD_STR_ARROW_RIGHT[0]) | ||||
| #define lcd_implementation_drawmenu_gcode(sel, row, pstr, gcode) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ') | ||||
| #define lcd_implementation_drawmenu_function(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ') | ||||
|  | ||||
| static void lcd_implementation_quick_feedback() { | ||||
|   #if BEEPER > -1 | ||||
|   | ||||
							
								
								
									
										
											BIN
										
									
								
								Marlin/fonts/ISO10646-1-Marlin.fon
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Marlin/fonts/ISO10646-1-Marlin.fon
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Marlin/fonts/ISO10646-1.fon
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Marlin/fonts/ISO10646-1.fon
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Marlin/fonts/Marlin_symbols.fon
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Marlin/fonts/Marlin_symbols.fon
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										8
									
								
								Marlin/fonts/make_fonts.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								Marlin/fonts/make_fonts.bat
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| .\bdf2u8g.exe -b 1 -e 9 Marlin_symbols.bdf Marlin_symbols dogm_font_data_Marlin_symbols.h | ||||
| .\bdf2u8g.exe -b 16 -e 255 HD44780_W.bdf HD44780_W_5x7 dogm_font_data_HD44780_W.h | ||||
| .\bdf2u8g.exe -b 32 -e 255 HD44780_C.bdf HD44780_C_5x7 dogm_font_data_HD44780_C.h | ||||
| .\bdf2u8g.exe -b 32 -e 255 HD44780_J.bdf HD44780_J_5x7 dogm_font_data_HD44780_J.h | ||||
| .\bdf2u8g.exe -b 32 -e 255 ISO10646-1.bdf ISO10646_1_5x7 dogm_font_data_ISO10646_1.h | ||||
| .\bdf2u8g.exe -b 32 -e 255 ISO10646-1-Marlin.bdf ISO10646_1_Marlin_5x7 dogm_font_data_ISO10646_1_Marlin.h | ||||
| .\bdf2u8g.exe -b 32 -e 255 ISO10646_5_Cyrillic.bdf ISO10646_5_Cyrillic_5x7 dogm_font_data_ISO10646_5_Cyrillic.h | ||||
| .\bdf2u8g.exe -b 32 -e 255 ISO10646_Kana.bdf ISO10646_Kana_5x7 dogm_font_data_ISO10646_Kana.h | ||||
| @@ -46,6 +46,7 @@ block_t *current_block;  // A pointer to the block currently being traced | ||||
|  | ||||
| // Variables used by The Stepper Driver Interrupt | ||||
| static unsigned char out_bits;        // The next stepping-bits to be output | ||||
| static unsigned int cleaning_buffer_counter;   | ||||
|  | ||||
| // Counter variables for the bresenham line tracer | ||||
| static long counter_x, counter_y, counter_z, counter_e; | ||||
| @@ -346,6 +347,17 @@ FORCE_INLINE void trapezoid_generator_reset() { | ||||
| // "The Stepper Driver Interrupt" - This timer interrupt is the workhorse. | ||||
| // It pops blocks from the block_buffer and executes them by pulsing the stepper pins appropriately. | ||||
| ISR(TIMER1_COMPA_vect) { | ||||
|  | ||||
|   if(cleaning_buffer_counter) | ||||
|   { | ||||
|     current_block = NULL; | ||||
|     plan_discard_current_block(); | ||||
|     if ((cleaning_buffer_counter == 1) && (SD_FINISHED_STEPPERRELEASE)) enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND)); | ||||
|     cleaning_buffer_counter--; | ||||
|     OCR1A = 200; | ||||
|     return; | ||||
|   } | ||||
|    | ||||
|   // If there is no current block, attempt to pop one from the buffer | ||||
|   if (!current_block) { | ||||
|     // Anything in the buffer? | ||||
| @@ -972,6 +984,7 @@ void finishAndDisableSteppers() { | ||||
| } | ||||
|  | ||||
| void quickStop() { | ||||
|   cleaning_buffer_counter = 5000; | ||||
|   DISABLE_STEPPER_DRIVER_INTERRUPT(); | ||||
|   while (blocks_queued()) plan_discard_current_block(); | ||||
|   current_block = NULL; | ||||
|   | ||||
| @@ -61,7 +61,9 @@ static void lcd_control_volumetric_menu(); | ||||
| #ifdef DOGLCD | ||||
| static void lcd_set_contrast(); | ||||
| #endif | ||||
| #ifdef FWRETRACT | ||||
| static void lcd_control_retract_menu(); | ||||
| #endif | ||||
| static void lcd_sdcard_menu(); | ||||
|  | ||||
| #ifdef DELTA_CALIBRATION_MENU | ||||
| @@ -123,46 +125,65 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l | ||||
|  | ||||
|  | ||||
| /* Helper macros for menus */ | ||||
|  | ||||
| /** | ||||
|  * START_MENU generates the init code for a menu function | ||||
|  */ | ||||
| #define START_MENU() do { \ | ||||
|   encoderRateMultiplierEnabled = false; \ | ||||
|   if (encoderPosition > 0x8000) encoderPosition = 0; \ | ||||
|     if (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM < currentMenuViewOffset) currentMenuViewOffset = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM;\ | ||||
|   uint8_t encoderLine = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM; \ | ||||
|   if (encoderLine < currentMenuViewOffset) currentMenuViewOffset = encoderLine; \ | ||||
|   uint8_t _lineNr = currentMenuViewOffset, _menuItemNr; \ | ||||
|     bool wasClicked = LCD_CLICKED;\ | ||||
|   bool wasClicked = LCD_CLICKED, itemSelected; \ | ||||
|   if (wasClicked) lcd_quick_feedback(); \ | ||||
|   for (uint8_t _drawLineNr = 0; _drawLineNr < LCD_HEIGHT; _drawLineNr++, _lineNr++) { \ | ||||
|     _menuItemNr = 0; | ||||
|  | ||||
| /** | ||||
|  * MENU_ITEM generates draw & handler code for a menu item, potentially calling: | ||||
|  * | ||||
|  *   lcd_implementation_drawmenu_[type](sel, row, label, arg3...) | ||||
|  *   menu_action_[type](arg3...) | ||||
|  * | ||||
|  * Examples: | ||||
|  *   MENU_ITEM(back, MSG_WATCH, lcd_status_screen) | ||||
|  *     lcd_implementation_drawmenu_back(sel, row, PSTR(MSG_WATCH), lcd_status_screen) | ||||
|  *     menu_action_back(lcd_status_screen) | ||||
|  * | ||||
|  *   MENU_ITEM(function, MSG_PAUSE_PRINT, lcd_sdcard_pause) | ||||
|  *     lcd_implementation_drawmenu_function(sel, row, PSTR(MSG_PAUSE_PRINT), lcd_sdcard_pause) | ||||
|  *     menu_action_function(lcd_sdcard_pause) | ||||
|  * | ||||
|  *   MENU_ITEM_EDIT(int3, MSG_SPEED, &feedmultiply, 10, 999) | ||||
|  *   MENU_ITEM(setting_edit_int3, MSG_SPEED, PSTR(MSG_SPEED), &feedmultiply, 10, 999) | ||||
|  *     lcd_implementation_drawmenu_setting_edit_int3(sel, row, PSTR(MSG_SPEED), PSTR(MSG_SPEED), &feedmultiply, 10, 999) | ||||
|  *     menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedmultiply, 10, 999) | ||||
|  * | ||||
|  */ | ||||
| #define MENU_ITEM(type, label, args...) do { \ | ||||
|   if (_menuItemNr == _lineNr) { \ | ||||
|         if (lcdDrawUpdate) { \ | ||||
|             const char* _label_pstr = PSTR(label); \ | ||||
|             if ((encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) == _menuItemNr) { \ | ||||
|                 lcd_implementation_drawmenu_ ## type ## _selected (_drawLineNr, _label_pstr , ## args ); \ | ||||
|             }else{\ | ||||
|                 lcd_implementation_drawmenu_ ## type (_drawLineNr, _label_pstr , ## args ); \ | ||||
|             }\ | ||||
|         }\ | ||||
|         if (wasClicked && (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) == _menuItemNr) {\ | ||||
|             lcd_quick_feedback(); \ | ||||
|     itemSelected = encoderLine == _menuItemNr; \ | ||||
|     if (lcdDrawUpdate) \ | ||||
|       lcd_implementation_drawmenu_ ## type(itemSelected, _drawLineNr, PSTR(label), ## args); \ | ||||
|     if (wasClicked && itemSelected) { \ | ||||
|       menu_action_ ## type(args); \ | ||||
|       return; \ | ||||
|     } \ | ||||
|   } \ | ||||
|   _menuItemNr++; \ | ||||
| } while(0) | ||||
|  | ||||
| #ifdef ENCODER_RATE_MULTIPLIER | ||||
|   /** | ||||
|    * MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item | ||||
|    */ | ||||
|   #define MENU_MULTIPLIER_ITEM(type, label, args...) do { \ | ||||
|     if (_menuItemNr == _lineNr) { \ | ||||
|       if (lcdDrawUpdate) { \ | ||||
|         const char* _label_pstr = PSTR(label); \ | ||||
|         if ((encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) == _menuItemNr) { \ | ||||
|           lcd_implementation_drawmenu_ ## type ## _selected (_drawLineNr, _label_pstr , ## args ); \ | ||||
|         } \ | ||||
|         else { \ | ||||
|           lcd_implementation_drawmenu_ ## type (_drawLineNr, _label_pstr , ## args ); \ | ||||
|         } \ | ||||
|       } \ | ||||
|       if (wasClicked && (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) == _menuItemNr) { \ | ||||
|         lcd_quick_feedback(); \ | ||||
|       itemSelected = encoderLine == _menuItemNr; \ | ||||
|       if (lcdDrawUpdate) \ | ||||
|         lcd_implementation_drawmenu_ ## type(itemSelected, _drawLineNr, PSTR(label), ## args); \ | ||||
|       if (wasClicked && itemSelected) { \ | ||||
|         encoderRateMultiplierEnabled = true; \ | ||||
|         lastEncoderMovementMillis = 0; \ | ||||
|         menu_action_ ## type(args); \ | ||||
| @@ -172,6 +193,7 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l | ||||
|     _menuItemNr++; \ | ||||
|   } while(0) | ||||
| #endif //ENCODER_RATE_MULTIPLIER | ||||
|  | ||||
| #define MENU_ITEM_DUMMY() do { _menuItemNr++; } while(0) | ||||
| #define MENU_ITEM_EDIT(type, label, args...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## args) | ||||
| #define MENU_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args) | ||||
| @@ -354,16 +376,11 @@ static void lcd_sdcard_pause() { card.pauseSDPrint(); } | ||||
| static void lcd_sdcard_resume() { card.startFileprint(); } | ||||
|  | ||||
| static void lcd_sdcard_stop() { | ||||
|   quickStop(); | ||||
|   card.sdprinting = false; | ||||
|   card.closefile(); | ||||
|   quickStop(); | ||||
|   if (SD_FINISHED_STEPPERRELEASE) { | ||||
|     enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND)); | ||||
|   } | ||||
|   autotempShutdown(); | ||||
|  | ||||
|   cancel_heatup = true; | ||||
|  | ||||
|   lcd_setstatus(MSG_PRINT_ABORTED); | ||||
| } | ||||
|  | ||||
| @@ -409,7 +426,7 @@ static void lcd_main_menu() { | ||||
|   END_MENU(); | ||||
| } | ||||
|  | ||||
| #ifdef SDSUPPORT | ||||
| #if defined( SDSUPPORT ) && defined( MENU_ADDAUTOSTART ) | ||||
|   static void lcd_autostart_sd() { | ||||
|     card.autostart_index = 0; | ||||
|     card.setroot(); | ||||
| @@ -594,11 +611,9 @@ void lcd_cooldown() { | ||||
| static void lcd_prepare_menu() { | ||||
|   START_MENU(); | ||||
|   MENU_ITEM(back, MSG_MAIN, lcd_main_menu); | ||||
|   #ifdef SDSUPPORT | ||||
|     #ifdef MENU_ADDAUTOSTART | ||||
|   #if defined( SDSUPPORT ) && defined( MENU_ADDAUTOSTART ) | ||||
|     MENU_ITEM(function, MSG_AUTOSTART, lcd_autostart_sd); | ||||
|   #endif | ||||
|   #endif | ||||
|   MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84")); | ||||
|   MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); | ||||
|   MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets); | ||||
| @@ -1257,7 +1272,7 @@ void lcd_update() { | ||||
|     } | ||||
|   #endif//CARDINSERTED | ||||
|  | ||||
|   long ms = millis(); | ||||
|   uint32_t ms = millis(); | ||||
|   if (ms > lcd_next_update_millis) { | ||||
|  | ||||
|     #ifdef ULTIPANEL | ||||
|   | ||||
| @@ -610,214 +610,104 @@ static void lcd_implementation_status_screen() | ||||
|  | ||||
|   lcd.print(lcd_status_message); | ||||
| } | ||||
| static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, char pre_char, char post_char) | ||||
| { | ||||
|  | ||||
| static void lcd_implementation_drawmenu_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char post_char) { | ||||
|   char c; | ||||
|     //Use all characters in narrow LCDs | ||||
|   #if LCD_WIDTH < 20 | ||||
|       uint8_t n = LCD_WIDTH - 1 - 1; | ||||
|     #else | ||||
|       uint8_t n = LCD_WIDTH - 1 - 2; | ||||
|   #endif | ||||
|   uint8_t n = LCD_WIDTH - 1 - (LCD_WIDTH < 20 ? 1 : 2); | ||||
|   lcd.setCursor(0, row); | ||||
|     lcd.print(pre_char); | ||||
|     while( ((c = pgm_read_byte(pstr)) != '\0') && (n>0) ) | ||||
|     { | ||||
|   lcd.print(sel ? pre_char : ' '); | ||||
|   while ((c = pgm_read_byte(pstr)) && n > 0) { | ||||
|     lcd.print(c); | ||||
|     pstr++; | ||||
|     if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--; | ||||
|   } | ||||
|     while(n--) | ||||
|         lcd.print(' '); | ||||
|   while(n--) lcd.print(' '); | ||||
|   lcd.print(post_char); | ||||
|   lcd.print(' '); | ||||
| } | ||||
| static void lcd_implementation_drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char pre_char, char* data) | ||||
| { | ||||
| static void lcd_implementation_drawmenu_setting_edit_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char* data) { | ||||
|   char c; | ||||
|     //Use all characters in narrow LCDs | ||||
|   #if LCD_WIDTH < 20 | ||||
|       uint8_t n = LCD_WIDTH - 1 - 1 - lcd_strlen(data); | ||||
|     #else | ||||
|       uint8_t n = LCD_WIDTH - 1 - 2 - lcd_strlen(data); | ||||
|   #endif | ||||
|   uint8_t n = LCD_WIDTH - 1 - (LCD_WIDTH < 20 ? 1 : 2) - lcd_strlen(data); | ||||
|   lcd.setCursor(0, row); | ||||
|     lcd.print(pre_char); | ||||
|     while( ((c = pgm_read_byte(pstr)) != '\0') && (n>0) ) | ||||
|     { | ||||
|   lcd.print(sel ? pre_char : ' '); | ||||
|   while ((c = pgm_read_byte(pstr)) && n > 0) { | ||||
|     lcd.print(c); | ||||
|     pstr++; | ||||
|     if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--; | ||||
|   } | ||||
|   lcd.print(':'); | ||||
|     while(n--) | ||||
|         lcd.print(' '); | ||||
|   while (n--) lcd.print(' '); | ||||
|   lcd.print(data); | ||||
| } | ||||
| static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, const char* pstr, char pre_char, const char* data) | ||||
| { | ||||
| static void lcd_implementation_drawmenu_setting_edit_generic_P(bool sel, uint8_t row, const char* pstr, char pre_char, const char* data) { | ||||
|   char c; | ||||
|     //Use all characters in narrow LCDs | ||||
|   #if LCD_WIDTH < 20 | ||||
|       uint8_t n = LCD_WIDTH - 1 - 1 - lcd_strlen_P(data); | ||||
|     #else | ||||
|       uint8_t n = LCD_WIDTH - 1 - 2 - lcd_strlen_P(data); | ||||
|   #endif | ||||
|   uint8_t n = LCD_WIDTH - 1 - (LCD_WIDTH < 20 ? 1 : 2) - lcd_strlen_P(data); | ||||
|   lcd.setCursor(0, row); | ||||
|     lcd.print(pre_char); | ||||
|     while( ((c = pgm_read_byte(pstr)) != '\0') && (n>0) ) | ||||
|     { | ||||
|   lcd.print(sel ? pre_char : ' '); | ||||
|   while ((c = pgm_read_byte(pstr)) && n > 0) { | ||||
|     lcd.print(c); | ||||
|     pstr++; | ||||
|     if ((pgm_read_byte(pstr) & 0xc0) != 0x80) n--; | ||||
|   } | ||||
|   lcd.print(':'); | ||||
|     while(n--) | ||||
|         lcd.print(' '); | ||||
|   while (n--) lcd.print(' '); | ||||
|   lcd_printPGM(data); | ||||
| } | ||||
| #define lcd_implementation_drawmenu_setting_edit_int3_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', itostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_int3(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', itostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float3_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float3(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float32_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr32(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float32(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr32(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float43_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr43(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float43(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr43(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float5_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float5(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float52_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr52(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float52(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr52(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float51_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr51(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float51(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr51(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_long5_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_long5(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_bool_selected(row, pstr, pstr2, data) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) | ||||
| #define lcd_implementation_drawmenu_setting_edit_bool(row, pstr, pstr2, data) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, ' ', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) | ||||
| #define lcd_implementation_drawmenu_setting_edit_int3(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', itostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float3(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float32(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr32(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float43(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr43(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float5(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float52(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr52(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_float51(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr51(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_long5(sel, row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_bool(sel, row, pstr, pstr2, data) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, ' ', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) | ||||
|  | ||||
| //Add version for callback functions | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_int3_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', itostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_int3(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', itostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float3_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float3(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float32_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr32(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float32(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr32(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float43_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr43(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float43(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr43(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float5_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float5(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float52_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr52(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float52(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr52(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float51_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr51(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float51(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr51(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_long5_selected(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_long5(row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_bool_selected(row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_bool(row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, ' ', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_int3(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', itostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float3(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr3(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float32(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr32(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float43(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr43(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float5(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float52(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr52(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_float51(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr51(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_long5(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ' ', ftostr5(*(data))) | ||||
| #define lcd_implementation_drawmenu_setting_edit_callback_bool(sel, row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, ' ', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) | ||||
|  | ||||
|  | ||||
| void lcd_implementation_drawedit(const char* pstr, char* value) | ||||
| { | ||||
| void lcd_implementation_drawedit(const char* pstr, char* value) { | ||||
|   lcd.setCursor(1, 1); | ||||
|   lcd_printPGM(pstr); | ||||
|   lcd.print(':'); | ||||
|    #if LCD_WIDTH < 20 | ||||
|       lcd.setCursor(LCD_WIDTH - lcd_strlen(value), 1); | ||||
|     #else | ||||
|       lcd.setCursor(LCD_WIDTH -1 - lcd_strlen(value), 1); | ||||
|    #endif | ||||
|   lcd.setCursor(LCD_WIDTH - (LCD_WIDTH < 20 ? 0 : 1) - lcd_strlen(value), 1); | ||||
|   lcd.print(value); | ||||
| } | ||||
| static void lcd_implementation_drawmenu_sdfile_selected(uint8_t row, const char* pstr, const char* filename, char* longFilename) | ||||
| { | ||||
| static void lcd_implementation_drawmenu_sd(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename, uint8_t concat) { | ||||
|   char c; | ||||
|     uint8_t n = LCD_WIDTH - 1; | ||||
|   uint8_t n = LCD_WIDTH - concat; | ||||
|   lcd.setCursor(0, row); | ||||
|     lcd.print('>'); | ||||
|     if (longFilename[0] != '\0') | ||||
|     { | ||||
|   lcd.print(sel ? '>' : ' '); | ||||
|   if (longFilename[0]) { | ||||
|     filename = longFilename; | ||||
|         longFilename[LCD_WIDTH-1] = '\0'; | ||||
|     longFilename[n] = '\0'; | ||||
|   } | ||||
|     while( ((c = *filename) != '\0') && (n>0) ) | ||||
|     { | ||||
|   while ((c = *filename) && n > 0) { | ||||
|     lcd.print(c); | ||||
|     filename++; | ||||
|     n--; | ||||
|   } | ||||
|     while(n--) | ||||
|         lcd.print(' '); | ||||
|   while (n--) lcd.print(' '); | ||||
| } | ||||
| static void lcd_implementation_drawmenu_sdfile(uint8_t row, const char* pstr, const char* filename, char* longFilename) | ||||
| { | ||||
|     char c; | ||||
|     uint8_t n = LCD_WIDTH - 1; | ||||
|     lcd.setCursor(0, row); | ||||
|     lcd.print(' '); | ||||
|     if (longFilename[0] != '\0') | ||||
|     { | ||||
|         filename = longFilename; | ||||
|         longFilename[LCD_WIDTH-1] = '\0'; | ||||
|  | ||||
| static void lcd_implementation_drawmenu_sdfile(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) { | ||||
|   lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 1); | ||||
| } | ||||
|     while( ((c = *filename) != '\0') && (n>0) ) | ||||
|     { | ||||
|         lcd.print(c); | ||||
|         filename++; | ||||
|         n--; | ||||
| static void lcd_implementation_drawmenu_sddirectory(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) { | ||||
|   lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 2); | ||||
| } | ||||
|     while(n--) | ||||
|         lcd.print(' '); | ||||
| } | ||||
| static void lcd_implementation_drawmenu_sddirectory_selected(uint8_t row, const char* pstr, const char* filename, char* longFilename) | ||||
| { | ||||
|     char c; | ||||
|     uint8_t n = LCD_WIDTH - 2; | ||||
|     lcd.setCursor(0, row); | ||||
|     lcd.print('>'); | ||||
|     lcd.print(LCD_STR_FOLDER[0]); | ||||
|     if (longFilename[0] != '\0') | ||||
|     { | ||||
|         filename = longFilename; | ||||
|         longFilename[LCD_WIDTH-2] = '\0'; | ||||
|     } | ||||
|     while( ((c = *filename) != '\0') && (n>0) ) | ||||
|     { | ||||
|         lcd.print(c); | ||||
|         filename++; | ||||
|         n--; | ||||
|     } | ||||
|     while(n--) | ||||
|         lcd.print(' '); | ||||
| } | ||||
| static void lcd_implementation_drawmenu_sddirectory(uint8_t row, const char* pstr, const char* filename, char* longFilename) | ||||
| { | ||||
|     char c; | ||||
|     uint8_t n = LCD_WIDTH - 2; | ||||
|     lcd.setCursor(0, row); | ||||
|     lcd.print(' '); | ||||
|     lcd.print(LCD_STR_FOLDER[0]); | ||||
|     if (longFilename[0] != '\0') | ||||
|     { | ||||
|         filename = longFilename; | ||||
|         longFilename[LCD_WIDTH-2] = '\0'; | ||||
|     } | ||||
|     while( ((c = *filename) != '\0') && (n>0) ) | ||||
|     { | ||||
|         lcd.print(c); | ||||
|         filename++; | ||||
|         n--; | ||||
|     } | ||||
|     while(n--) | ||||
|         lcd.print(' '); | ||||
| } | ||||
| #define lcd_implementation_drawmenu_back_selected(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]) | ||||
| #define lcd_implementation_drawmenu_back(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, ' ', LCD_STR_UPLEVEL[0]) | ||||
| #define lcd_implementation_drawmenu_submenu_selected(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, '>', LCD_STR_ARROW_RIGHT[0]) | ||||
| #define lcd_implementation_drawmenu_submenu(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, ' ', LCD_STR_ARROW_RIGHT[0]) | ||||
| #define lcd_implementation_drawmenu_gcode_selected(row, pstr, gcode) lcd_implementation_drawmenu_generic(row, pstr, '>', ' ') | ||||
| #define lcd_implementation_drawmenu_gcode(row, pstr, gcode) lcd_implementation_drawmenu_generic(row, pstr, ' ', ' ') | ||||
| #define lcd_implementation_drawmenu_function_selected(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, '>', ' ') | ||||
| #define lcd_implementation_drawmenu_function(row, pstr, data) lcd_implementation_drawmenu_generic(row, pstr, ' ', ' ') | ||||
| #define lcd_implementation_drawmenu_back(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]) | ||||
| #define lcd_implementation_drawmenu_submenu(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', LCD_STR_ARROW_RIGHT[0]) | ||||
| #define lcd_implementation_drawmenu_gcode(sel, row, pstr, gcode) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ') | ||||
| #define lcd_implementation_drawmenu_function(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ') | ||||
|  | ||||
| static void lcd_implementation_quick_feedback() | ||||
| { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user