🎨 Standardize G-code reporting
This commit is contained in:
committed by
Scott Lahteine
parent
a596faf4e5
commit
6d96c221bd
@ -578,13 +578,13 @@ void _O2 Endstops::report_states() {
|
||||
default: continue;
|
||||
REPEAT_1(NUM_RUNOUT_SENSORS, _CASE_RUNOUT)
|
||||
}
|
||||
SERIAL_ECHOPGM(STR_FILAMENT_RUNOUT_SENSOR);
|
||||
SERIAL_ECHOPGM(STR_FILAMENT);
|
||||
if (i > 1) SERIAL_CHAR(' ', '0' + i);
|
||||
print_es_state(extDigitalRead(pin) != state);
|
||||
}
|
||||
#undef _CASE_RUNOUT
|
||||
#elif HAS_FILAMENT_SENSOR
|
||||
print_es_state(READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE, PSTR(STR_FILAMENT_RUNOUT_SENSOR));
|
||||
print_es_state(READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE, PSTR(STR_FILAMENT));
|
||||
#endif
|
||||
|
||||
TERN_(BLTOUCH, bltouch._reset_SW_mode());
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -59,6 +59,10 @@
|
||||
#include "../feature/host_actions.h"
|
||||
#endif
|
||||
|
||||
#if HAS_TEMP_SENSOR
|
||||
#include "../gcode/gcode.h"
|
||||
#endif
|
||||
|
||||
// MAX TC related macros
|
||||
#define TEMP_SENSOR_IS_MAX(n, M) (ENABLED(TEMP_SENSOR_##n##_IS_MAX##M) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX##M) && REDUNDANT_TEMP_MATCH(SOURCE, E##n)))
|
||||
#define TEMP_SENSOR_IS_ANY_MAX_TC(n) (ENABLED(TEMP_SENSOR_##n##_IS_MAX_TC) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX_TC) && REDUNDANT_TEMP_MATCH(SOURCE, E##n)))
|
||||
@ -1722,13 +1726,9 @@ void Temperature::manage_heater() {
|
||||
COPY(user_thermistor, default_user_thermistor);
|
||||
}
|
||||
|
||||
void Temperature::log_user_thermistor(const uint8_t t_index, const bool eprom/*=false*/) {
|
||||
|
||||
if (eprom)
|
||||
SERIAL_ECHOPGM(" M305 ");
|
||||
else
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_CHAR('P', '0' + t_index);
|
||||
void Temperature::M305_report(const uint8_t t_index, const bool forReplay/*=true*/) {
|
||||
gcode.report_heading_etc(forReplay, PSTR(STR_USER_THERMISTORS));
|
||||
SERIAL_ECHOPAIR(" M305 P", AS_DIGIT(t_index));
|
||||
|
||||
const user_thermistor_t &t = user_thermistor[t_index];
|
||||
|
||||
@ -1794,13 +1794,13 @@ void Temperature::manage_heater() {
|
||||
// Derived from RepRap FiveD extruder::getTemperature()
|
||||
// For hot end temperature measurement.
|
||||
celsius_float_t Temperature::analog_to_celsius_hotend(const int16_t raw, const uint8_t e) {
|
||||
if (e >= HOTENDS) {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ECHO(e);
|
||||
SERIAL_ECHOLNPGM(STR_INVALID_EXTRUDER_NUM);
|
||||
kill();
|
||||
return 0;
|
||||
}
|
||||
if (e >= HOTENDS) {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ECHO(e);
|
||||
SERIAL_ECHOLNPGM(STR_INVALID_EXTRUDER_NUM);
|
||||
kill();
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (e) {
|
||||
case 0:
|
||||
@ -3490,9 +3490,6 @@ void Temperature::isr() {
|
||||
}
|
||||
|
||||
#if HAS_TEMP_SENSOR
|
||||
|
||||
#include "../gcode/gcode.h"
|
||||
|
||||
/**
|
||||
* Print a single heater state in the form:
|
||||
* Bed: " B:nnn.nn /nnn.nn"
|
||||
|
@ -527,7 +527,7 @@ class Temperature {
|
||||
|
||||
#if HAS_USER_THERMISTORS
|
||||
static user_thermistor_t user_thermistor[USER_THERMISTORS];
|
||||
static void log_user_thermistor(const uint8_t t_index, const bool eprom=false);
|
||||
static void M305_report(const uint8_t t_index, const bool forReplay=true);
|
||||
static void reset_user_thermistors();
|
||||
static celsius_float_t user_thermistor_to_deg_c(const uint8_t t_index, const int16_t raw);
|
||||
static inline bool set_pull_up_res(int8_t t_index, float value) {
|
||||
|
Reference in New Issue
Block a user