🎨 Fewer serial macros
This commit is contained in:
@@ -134,7 +134,7 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
// meaning "return to previous screen"
|
||||
DGUSLCD_Screens target = (DGUSLCD_Screens)tmp[1];
|
||||
|
||||
DEBUG_ECHOLNPAIR("\n DEBUG target", target);
|
||||
DEBUG_ECHOLNPGM("\n DEBUG target", target);
|
||||
|
||||
if (target == DGUSLCD_SCREEN_POPUP) {
|
||||
// Special handling for popup is to return to previous menu
|
||||
@@ -146,7 +146,7 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
UpdateNewScreen(target);
|
||||
|
||||
#ifdef DEBUG_DGUSLCD
|
||||
if (!DGUSLCD_FindScreenVPMapList(target)) DEBUG_ECHOLNPAIR("WARNING: No screen Mapping found for ", target);
|
||||
if (!DGUSLCD_FindScreenVPMapList(target)) DEBUG_ECHOLNPGM("WARNING: No screen Mapping found for ", target);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -190,10 +190,10 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
|
||||
if (!movevalue) {
|
||||
// homing
|
||||
DEBUG_ECHOPAIR(" homing ", AS_CHAR(axiscode));
|
||||
DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode));
|
||||
char buf[6] = "G28 X";
|
||||
buf[4] = axiscode;
|
||||
//DEBUG_ECHOPAIR(" ", buf);
|
||||
//DEBUG_ECHOPGM(" ", buf);
|
||||
queue.enqueue_one_now(buf);
|
||||
//DEBUG_ECHOLNPGM(" ✓");
|
||||
ForceCompleteUpdate();
|
||||
@@ -201,7 +201,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
}
|
||||
else {
|
||||
// movement
|
||||
DEBUG_ECHOPAIR(" move ", AS_CHAR(axiscode));
|
||||
DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode));
|
||||
bool old_relative_mode = relative_mode;
|
||||
if (!relative_mode) {
|
||||
//DEBUG_ECHOPGM(" G91");
|
||||
@@ -215,13 +215,13 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
if (movevalue < 0) { value = -value; sign[0] = '-'; }
|
||||
int16_t fraction = ABS(movevalue) % 100;
|
||||
snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed);
|
||||
//DEBUG_ECHOPAIR(" ", buf);
|
||||
//DEBUG_ECHOPGM(" ", buf);
|
||||
queue.enqueue_one_now(buf);
|
||||
//DEBUG_ECHOLNPGM(" ✓ ");
|
||||
if (backup_speed != speed) {
|
||||
snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed);
|
||||
queue.enqueue_one_now(buf);
|
||||
//DEBUG_ECHOPAIR(" ", buf);
|
||||
//DEBUG_ECHOPGM(" ", buf);
|
||||
}
|
||||
// while (!enqueue_and_echo_command(buf)) idle();
|
||||
//DEBUG_ECHOLNPGM(" ✓ ");
|
||||
@@ -237,16 +237,16 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
return;
|
||||
|
||||
cannotmove:
|
||||
DEBUG_ECHOLNPAIR(" cannot move ", AS_CHAR(axiscode));
|
||||
DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode));
|
||||
return;
|
||||
}
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void DGUSScreenHandler::HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
uint16_t rawvalue = swap16(*(uint16_t*)val_ptr);
|
||||
DEBUG_ECHOLNPAIR("V1:", rawvalue);
|
||||
DEBUG_ECHOLNPGM("V1:", rawvalue);
|
||||
float value = (float)rawvalue / 10;
|
||||
DEBUG_ECHOLNPAIR("V2:", value);
|
||||
DEBUG_ECHOLNPGM("V2:", value);
|
||||
float newvalue = 0;
|
||||
|
||||
switch (var.VP) {
|
||||
|
||||
Reference in New Issue
Block a user