|
@@ -1916,11 +1916,30 @@ void ramming() {
|
|
|
}
|
|
|
*/
|
|
|
|
|
|
+#ifdef TMC2130
|
|
|
+void force_high_power_mode(bool start_high_power_section) {
|
|
|
+ uint8_t silent;
|
|
|
+ silent = eeprom_read_byte((uint8_t*)EEPROM_SILENT);
|
|
|
+ if (silent == 1) {
|
|
|
+ //we are in silent mode, set to normal mode to enable crash detection
|
|
|
+
|
|
|
+
|
|
|
+ st_synchronize();
|
|
|
+ cli();
|
|
|
+ tmc2130_mode = (start_high_power_section == true) ? TMC2130_MODE_NORMAL : TMC2130_MODE_SILENT;
|
|
|
+ tmc2130_init();
|
|
|
+ sei();
|
|
|
+ digipot_init();
|
|
|
+ }
|
|
|
+}
|
|
|
+#endif //TMC2130
|
|
|
+
|
|
|
bool gcode_M45(bool onlyZ) {
|
|
|
bool final_result = false;
|
|
|
+ #ifdef TMC2130
|
|
|
+ FORCE_HIGH_POWER_START;
|
|
|
+ #endif // TMC2130
|
|
|
// Only Z calibration?
|
|
|
-
|
|
|
-
|
|
|
if (!onlyZ) {
|
|
|
setTargetBed(0);
|
|
|
setTargetHotend(0, 0);
|
|
@@ -2048,6 +2067,9 @@ bool gcode_M45(bool onlyZ) {
|
|
|
// Timeouted.
|
|
|
}
|
|
|
lcd_update_enable(true);
|
|
|
+#ifdef TMC2130
|
|
|
+ FORCE_HIGH_POWER_END;
|
|
|
+#endif // TMC2130
|
|
|
return final_result;
|
|
|
}
|
|
|
|