|
@@ -331,6 +331,10 @@ bool MMU2::tool_change(uint8_t index) {
|
|
// @@TODO really report onto the serial? May be for the Octoprint? Not important now
|
|
// @@TODO really report onto the serial? May be for the Octoprint? Not important now
|
|
// SERIAL_ECHO_START();
|
|
// SERIAL_ECHO_START();
|
|
// SERIAL_ECHOLNPAIR(MSG_ACTIVE_EXTRUDER, int(extruder));
|
|
// SERIAL_ECHOLNPAIR(MSG_ACTIVE_EXTRUDER, int(extruder));
|
|
|
|
+
|
|
|
|
+ // Update toolchange counter
|
|
|
|
+ uint32_t toolchanges = eeprom_read_dword((uint32_t*)EEPROM_TOTAL_TOOLCHANGE_COUNT);
|
|
|
|
+ eeprom_write_dword((uint32_t *)EEPROM_TOTAL_TOOLCHANGE_COUNT, ++toolchanges);
|
|
}
|
|
}
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
@@ -361,6 +365,9 @@ bool MMU2::tool_change(char code, uint8_t slot) {
|
|
extruder = slot;
|
|
extruder = slot;
|
|
SpoolJoin::spooljoin.setSlot(slot);
|
|
SpoolJoin::spooljoin.setSlot(slot);
|
|
set_extrude_min_temp(EXTRUDE_MINTEMP);
|
|
set_extrude_min_temp(EXTRUDE_MINTEMP);
|
|
|
|
+ // Update toolchange counter
|
|
|
|
+ uint32_t toolchanges = eeprom_read_dword((uint32_t*)EEPROM_TOTAL_TOOLCHANGE_COUNT);
|
|
|
|
+ eeprom_write_dword((uint32_t *)EEPROM_TOTAL_TOOLCHANGE_COUNT, ++toolchanges);
|
|
} break;
|
|
} break;
|
|
|
|
|
|
case 'c': {
|
|
case 'c': {
|
|
@@ -511,6 +518,10 @@ bool MMU2::load_filament_to_nozzle(uint8_t index) {
|
|
SpoolJoin::spooljoin.setSlot(index);
|
|
SpoolJoin::spooljoin.setSlot(index);
|
|
|
|
|
|
Sound_MakeSound(e_SOUND_TYPE_StandardConfirm);
|
|
Sound_MakeSound(e_SOUND_TYPE_StandardConfirm);
|
|
|
|
+
|
|
|
|
+ // Update toolchange count
|
|
|
|
+ uint32_t toolchanges = eeprom_read_dword((uint32_t*)EEPROM_TOTAL_TOOLCHANGE_COUNT);
|
|
|
|
+ eeprom_write_dword((uint32_t *)EEPROM_TOTAL_TOOLCHANGE_COUNT, ++toolchanges);
|
|
}
|
|
}
|
|
lcd_update_enable(true);
|
|
lcd_update_enable(true);
|
|
return true;
|
|
return true;
|