diff options
author | akukan <alexandr@prusa3d.cz> | 2016-10-27 16:43:56 +0300 |
---|---|---|
committer | akukan <alexandr@prusa3d.cz> | 2016-10-27 16:43:56 +0300 |
commit | 6f203c47359ef9e7d4af7e5cb4983fc03e1f75ab (patch) | |
tree | 1ddfd459e1992559ccd5f198332f54698673d4d5 | |
parent | 2f13563c187933bd3894dbd1a69632fa6c4d0808 (diff) |
Farm mode error reporting
-rw-r--r-- | Firmware/temperature.cpp | 8 | ||||
-rw-r--r-- | Firmware/ultralcd.cpp | 17 |
2 files changed, 23 insertions, 2 deletions
diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index 80aed98ea..d2f6e3f88 100644 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -1119,7 +1119,9 @@ void temp_runaway_check(int _heater_id, float _target_temperature, float _curren if (__preheat_errors > 5)
{
+ if (farm_mode) { prusa_statistics(0); }
temp_runaway_stop(true);
+ if (farm_mode) { prusa_statistics(91); }
}
__preheat_start = _current_temperature;
__preheat_counter = 0;
@@ -1154,7 +1156,9 @@ void temp_runaway_check(int _heater_id, float _target_temperature, float _curren temp_runaway_error_counter[_heater_id]++;
if (temp_runaway_error_counter[_heater_id] * 2 > __timeout)
{
+ if (farm_mode) { prusa_statistics(0); }
temp_runaway_stop(false);
+ if (farm_mode) { prusa_statistics(90); }
}
}
}
@@ -1269,6 +1273,7 @@ void max_temp_error(uint8_t e) { WRITE(BEEPER, 1);
// fanSpeed will consumed by the check_axes_activity() routine.
fanSpeed=255;
+ if (farm_mode) { prusa_statistics(93); }
}
void min_temp_error(uint8_t e) {
@@ -1282,6 +1287,8 @@ void min_temp_error(uint8_t e) { #ifndef BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
Stop();
#endif
+ if (farm_mode) { prusa_statistics(92); }
+
}
void bed_max_temp_error(void) {
@@ -1296,6 +1303,7 @@ void bed_max_temp_error(void) { #ifndef BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
Stop();
#endif
+
}
void bed_min_temp_error(void) {
diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 5a3322003..6827a60c5 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -392,7 +392,7 @@ static void lcd_status_screen() farm_timer--; if (farm_timer < 1) { - farm_timer = 90; + farm_timer = 180; prusa_statistics(0); } switch (farm_timer) @@ -1856,7 +1856,20 @@ void prusa_statistics(int _message) { case 22: // waiting for filament change SERIAL_ECHOLN("{[PRN:5]}"); break; - + + case 90: // Error - Thermal Runaway + SERIAL_ECHOLN("{[ERR:1]}"); + break; + case 91: // Error - Thermal Runaway Preheat + SERIAL_ECHOLN("{[ERR:2]}"); + break; + case 92: // Error - Min temp + SERIAL_ECHOLN("{[ERR:3]}"); + break; + case 93: // Error - Max temp + SERIAL_ECHOLN("{[ERR:4]}"); + break; + case 99: // heartbeat SERIAL_ECHO("{[PRN:99]"); prusa_stat_temperatures(); |