Differentiate translated On/Off from Serial ON/OFF

This commit is contained in:
Scott Lahteine
2018-11-12 17:04:00 -06:00
parent df907a905f
commit 50af1d1e08
36 changed files with 76 additions and 69 deletions

View File

@ -169,6 +169,8 @@
#define MSG_ERR_M428_TOO_FAR "Too far from reference point"
#define MSG_ERR_M303_DISABLED "PIDTEMP disabled"
#define MSG_M119_REPORT "Reporting endstop status"
#define MSG_ON "ON"
#define MSG_OFF "OFF"
#define MSG_ENDSTOP_HIT "TRIGGERED"
#define MSG_ENDSTOP_OPEN "open"
#define MSG_HOTEND_OFFSET "Hotend offsets:"

View File

@ -21,6 +21,7 @@
*/
#include "serial.h"
#include "language.h"
uint8_t marlin_debug_flags = MARLIN_DEBUG_NONE;
@ -52,6 +53,9 @@ void serialprintPGM(PGM_P str) {
while (char ch = pgm_read_byte(str++)) SERIAL_CHAR(ch);
}
void serial_echo_start() { serialprintPGM(echomagic); }
void serial_error_start() { serialprintPGM(errormagic); }
void serial_echopair_PGM(PGM_P s_P, const char *v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
void serial_echopair_PGM(PGM_P s_P, char v) { serialprintPGM(s_P); SERIAL_CHAR(v); }
void serial_echopair_PGM(PGM_P s_P, int v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
@ -63,8 +67,8 @@ void serial_echopair_PGM(PGM_P s_P, unsigned long v) { serialprintPGM(s_P); SERI
void serial_spaces(uint8_t count) { count *= (PROPORTIONAL_FONT_RATIO); while (count--) SERIAL_CHAR(' '); }
void serial_echo_start() { serialprintPGM(echomagic); }
void serial_error_start() { serialprintPGM(errormagic); }
void serialprint_onoff(const bool onoff) { serialprintPGM(onoff ? PSTR(MSG_ON) : PSTR(MSG_OFF)); }
void serialprintln_onoff(const bool onoff) { serialprint_onoff(onoff); SERIAL_EOL(); }
#if ENABLED(DEBUG_LEVELING_FEATURE)

View File

@ -238,6 +238,8 @@ void serial_spaces(uint8_t count);
void serialprintPGM(PGM_P str);
void serial_echo_start();
void serial_error_start();
void serialprint_onoff(const bool onoff);
void serialprintln_onoff(const bool onoff);
#if ENABLED(DEBUG_LEVELING_FEATURE)
void print_xyz(PGM_P prefix, PGM_P suffix, const float x, const float y, const float z);