|
@@ -114,20 +114,18 @@ void write_to_lcd(const char * const message) {
|
114
|
114
|
void process_lcd_c_command(const char* command) {
|
115
|
115
|
switch (command[0]) {
|
116
|
116
|
case 'C': // Cope with both V1 early rev and later LCDs.
|
117
|
|
- case 'S': {
|
|
117
|
+ case 'S':
|
118
|
118
|
feedrate_percentage = atoi(command + 1) * 10;
|
119
|
119
|
LIMIT(feedrate_percentage, 10, 999);
|
120
|
|
- } break;
|
121
|
|
- case 'T': {
|
122
|
|
- thermalManager.setTargetHotend(atoi(command + 1), 0);
|
123
|
|
- } break;
|
124
|
|
- case 'P': {
|
125
|
|
- thermalManager.setTargetBed(atoi(command + 1));
|
126
|
|
- } break;
|
|
120
|
+ break;
|
127
|
121
|
|
128
|
|
- default:
|
129
|
|
- SERIAL_ECHOLNPAIR("UNKNOWN C COMMAND", command);
|
130
|
|
- return;
|
|
122
|
+ case 'T': thermalManager.setTargetHotend(atoi(command + 1), 0); break;
|
|
123
|
+
|
|
124
|
+ #if HAS_HEATED_BED
|
|
125
|
+ case 'P': thermalManager.setTargetBed(atoi(command + 1)); break;
|
|
126
|
+ #endif
|
|
127
|
+
|
|
128
|
+ default: SERIAL_ECHOLNPAIR("UNKNOWN C COMMAND", command);
|
131
|
129
|
}
|
132
|
130
|
}
|
133
|
131
|
|
|
@@ -148,21 +146,20 @@ void process_lcd_eb_command(const char* command) {
|
148
|
146
|
|
149
|
147
|
char message_buffer[MAX_CURLY_COMMAND];
|
150
|
148
|
sprintf_P(message_buffer,
|
151
|
|
- PSTR("{T0:%03.0f/%03i}{T1:000/000}{TP:%03.0f/%03i}{TQ:%03i}{TT:%s}"),
|
152
|
|
- thermalManager.degHotend(0),
|
153
|
|
- thermalManager.degTargetHotend(0),
|
154
|
|
- #if HAS_HEATED_BED
|
155
|
|
- thermalManager.degBed(),
|
156
|
|
- thermalManager.degTargetBed(),
|
157
|
|
- #else
|
158
|
|
- 0, 0,
|
159
|
|
- #endif
|
160
|
|
- #if ENABLED(SDSUPPORT)
|
161
|
|
- card.percentDone(),
|
162
|
|
- #else
|
163
|
|
- 0,
|
164
|
|
- #endif
|
165
|
|
- elapsed_buffer);
|
|
149
|
+ PSTR("{T0:%03.0f/%03i}{T1:000/000}{TP:%03.0f/%03i}{TQ:%03i}{TT:%s}"),
|
|
150
|
+ thermalManager.degHotend(0), thermalManager.degTargetHotend(0),
|
|
151
|
+ #if HAS_HEATED_BED
|
|
152
|
+ thermalManager.degBed(), thermalManager.degTargetBed(),
|
|
153
|
+ #else
|
|
154
|
+ 0, 0,
|
|
155
|
+ #endif
|
|
156
|
+ #if ENABLED(SDSUPPORT)
|
|
157
|
+ card.percentDone(),
|
|
158
|
+ #else
|
|
159
|
+ 0,
|
|
160
|
+ #endif
|
|
161
|
+ elapsed_buffer
|
|
162
|
+ );
|
166
|
163
|
write_to_lcd(message_buffer);
|
167
|
164
|
} break;
|
168
|
165
|
|