Merge pull request #1868 from AnHardt/LCD_STR

Moved the definitions of the LCD_STR_* to Conditionals.h
This commit is contained in:
Scott Lahteine 2015-04-09 01:56:23 -07:00
commit a00ebf03d4
4 changed files with 44 additions and 43 deletions

View file

@ -143,16 +143,45 @@
#endif #endif
#else //no panel but just LCD #else //no panel but just LCD
#ifdef ULTRA_LCD #ifdef ULTRA_LCD
#ifdef DOGLCD // Change number of lines to match the 128x64 graphics display #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
#define LCD_WIDTH 22 #define LCD_WIDTH 22
#define LCD_HEIGHT 5 #define LCD_HEIGHT 5
#else #else
#define LCD_WIDTH 16 #define LCD_WIDTH 16
#define LCD_HEIGHT 2 #define LCD_HEIGHT 2
#endif #endif
#endif #endif
#endif #endif
#ifdef DOGLCD
/* Custom characters defined in font font_6x10_marlin_symbols */
// \x00 intentionally skipped to avoid problems in strings
#define LCD_STR_REFRESH "\x01"
#define LCD_STR_FOLDER "\x02"
#define LCD_STR_ARROW_RIGHT "\x03"
#define LCD_STR_UPLEVEL "\x04"
#define LCD_STR_CLOCK "\x05"
#define LCD_STR_FEEDRATE "\x06"
#define LCD_STR_BEDTEMP "\x07"
#define LCD_STR_THERMOMETER "\x08"
#define LCD_STR_DEGREE "\x09"
#define LCD_STR_SPECIAL_MAX '\x09'
// Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin.
// Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
#else
/* Custom characters defined in the first 8 characters of the LCD */
#define LCD_STR_BEDTEMP "\x00" // this will have 'unexpected' results when used in a string!
#define LCD_STR_DEGREE "\x01"
#define LCD_STR_THERMOMETER "\x02"
#define LCD_STR_UPLEVEL "\x03"
#define LCD_STR_REFRESH "\x04"
#define LCD_STR_FOLDER "\x05"
#define LCD_STR_FEEDRATE "\x06"
#define LCD_STR_CLOCK "\x07"
#define LCD_STR_ARROW_RIGHT ">" /* from the default character set */
#endif
/** /**
* Default LCD contrast for dogm-like LCD displays * Default LCD contrast for dogm-like LCD displays
*/ */

View file

@ -1365,7 +1365,7 @@ inline void set_destination_to_current() { memcpy(destination, current_position,
#endif #endif
if (verbose_level > 2) { if (verbose_level > 2) {
SERIAL_PROTOCOLPGM(MSG_BED); SERIAL_PROTOCOLPGM("Bed");
SERIAL_PROTOCOLPGM(" X: "); SERIAL_PROTOCOLPGM(" X: ");
SERIAL_PROTOCOL_F(x, 3); SERIAL_PROTOCOL_F(x, 3);
SERIAL_PROTOCOLPGM(" Y: "); SERIAL_PROTOCOLPGM(" Y: ");
@ -2514,7 +2514,7 @@ inline void gcode_G28() {
feedrate = homing_feedrate[Z_AXIS]; feedrate = homing_feedrate[Z_AXIS];
run_z_probe(); run_z_probe();
SERIAL_PROTOCOLPGM(MSG_BED); SERIAL_PROTOCOLPGM("Bed");
SERIAL_PROTOCOLPGM(" X: "); SERIAL_PROTOCOLPGM(" X: ");
SERIAL_PROTOCOL(current_position[X_AXIS] + 0.0001); SERIAL_PROTOCOL(current_position[X_AXIS] + 0.0001);
SERIAL_PROTOCOLPGM(" Y: "); SERIAL_PROTOCOLPGM(" Y: ");
@ -2852,8 +2852,8 @@ inline void gcode_M42() {
inline void gcode_M48() { inline void gcode_M48() {
double sum = 0.0, mean = 0.0, sigma = 0.0, sample_set[50]; double sum = 0.0, mean = 0.0, sigma = 0.0, sample_set[50];
int verbose_level = 1, n_samples = 10, n_legs = 0; uint8_t verbose_level = 1, n_samples = 10, n_legs = 0;
if (code_seen('V') || code_seen('v')) { if (code_seen('V') || code_seen('v')) {
verbose_level = code_value_short(); verbose_level = code_value_short();
if (verbose_level < 0 || verbose_level > 4 ) { if (verbose_level < 0 || verbose_level > 4 ) {
@ -2960,7 +2960,7 @@ inline void gcode_M42() {
if (deploy_probe_for_each_reading) stow_z_probe(); if (deploy_probe_for_each_reading) stow_z_probe();
for (uint16_t n=0; n < n_samples; n++) { for (uint8_t n=0; n < n_samples; n++) {
do_blocking_move_to(X_probe_location, Y_probe_location, Z_start_location); // Make sure we are at the probe location do_blocking_move_to(X_probe_location, Y_probe_location, Z_start_location); // Make sure we are at the probe location
@ -2975,7 +2975,7 @@ inline void gcode_M42() {
//SERIAL_ECHOPAIR(" direction: ",dir); //SERIAL_ECHOPAIR(" direction: ",dir);
//SERIAL_EOL; //SERIAL_EOL;
for (int l = 0; l < n_legs - 1; l++) { for (uint8_t l = 0; l < n_legs - 1; l++) {
ms = millis(); ms = millis();
theta += RADIANS(dir * (ms % 20L)); theta += RADIANS(dir * (ms % 20L));
radius += (ms % 10L) - 5L; radius += (ms % 10L) - 5L;
@ -3014,7 +3014,7 @@ inline void gcode_M42() {
// Get the current mean for the data points we have so far // Get the current mean for the data points we have so far
// //
sum = 0.0; sum = 0.0;
for (int j = 0; j <= n; j++) sum += sample_set[j]; for (uint8_t j = 0; j <= n; j++) sum += sample_set[j];
mean = sum / (n + 1); mean = sum / (n + 1);
// //
@ -3022,7 +3022,7 @@ inline void gcode_M42() {
// data points we have so far // data points we have so far
// //
sum = 0.0; sum = 0.0;
for (int j = 0; j <= n; j++) { for (uint8_t j = 0; j <= n; j++) {
float ss = sample_set[j] - mean; float ss = sample_set[j] - mean;
sum += ss * ss; sum += ss * ss;
} }

View file

@ -108,22 +108,6 @@
#define START_ROW 0 #define START_ROW 0
/* Custom characters defined in font font_6x10_marlin_symbols */
// \x00 intentionally skipped to avoid problems in strings
#define LCD_STR_REFRESH "\x01"
#define LCD_STR_FOLDER "\x02"
#define LCD_STR_ARROW_RIGHT "\x03"
#define LCD_STR_UPLEVEL "\x04"
#define LCD_STR_CLOCK "\x05"
#define LCD_STR_FEEDRATE "\x06"
#define LCD_STR_BEDTEMP "\x07"
#define LCD_STR_THERMOMETER "\x08"
#define LCD_STR_DEGREE "\x09"
#define LCD_STR_SPECIAL_MAX '\x09'
// Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin.
// Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
// LCD selection // LCD selection
#ifdef U8GLIB_ST7920 #ifdef U8GLIB_ST7920
//U8GLIB_ST7920_128X64_RRD u8g(0,0,0); //U8GLIB_ST7920_128X64_RRD u8g(0,0,0);

View file

@ -201,18 +201,6 @@
#define LCD_STR_PROGRESS "\x03\x04\x05" #define LCD_STR_PROGRESS "\x03\x04\x05"
#endif #endif
/* Custom characters defined in the first 8 characters of the LCD */
#define LCD_STR_BEDTEMP "\x00" // this will have 'unexpected' results when used in a string!
#define LCD_STR_DEGREE "\x01"
#define LCD_STR_THERMOMETER "\x02"
#define LCD_STR_UPLEVEL "\x03"
#define LCD_STR_REFRESH "\x04"
#define LCD_STR_FOLDER "\x05"
#define LCD_STR_FEEDRATE "\x06"
#define LCD_STR_CLOCK "\x07"
//#define LCD_STR_ARROW_RIGHT "\x7E" /* from the default character set. Only available on DISPLAY_CHARSET_HD44780_JAPAN - at this place!*/
#define LCD_STR_ARROW_RIGHT ">" /* from the default character set */
static void lcd_set_custom_characters( static void lcd_set_custom_characters(
#ifdef LCD_PROGRESS_BAR #ifdef LCD_PROGRESS_BAR
bool progress_bar_set=true bool progress_bar_set=true