Miscellaneous LCD code renaming, reordering (#12430)
* Move special characters to language.h * Apply some naming standards * Clean up menu item draw functions * Rename some Temperature methods * UI => ExtUI
This commit is contained in:
@ -943,7 +943,7 @@ void Temperature::manage_heater() {
|
||||
|
||||
// Derived from RepRap FiveD extruder::getTemperature()
|
||||
// For hot end temperature measurement.
|
||||
float Temperature::analog2temp(const int raw, const uint8_t e) {
|
||||
float Temperature::analog_to_celsius_hotend(const int raw, const uint8_t e) {
|
||||
#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
|
||||
if (e > HOTENDS)
|
||||
#else
|
||||
@ -1015,7 +1015,7 @@ float Temperature::analog2temp(const int raw, const uint8_t e) {
|
||||
#if HAS_HEATED_BED
|
||||
// Derived from RepRap FiveD extruder::getTemperature()
|
||||
// For bed temperature measurement.
|
||||
float Temperature::analog2tempBed(const int raw) {
|
||||
float Temperature::analog_to_celsius_bed(const int raw) {
|
||||
#if ENABLED(HEATER_BED_USES_THERMISTOR)
|
||||
SCAN_THERMISTOR_TABLE(BEDTEMPTABLE, BEDTEMPTABLE_LEN);
|
||||
#elif ENABLED(HEATER_BED_USES_AD595)
|
||||
@ -1031,7 +1031,7 @@ float Temperature::analog2temp(const int raw, const uint8_t e) {
|
||||
#if HAS_TEMP_CHAMBER
|
||||
// Derived from RepRap FiveD extruder::getTemperature()
|
||||
// For chamber temperature measurement.
|
||||
float Temperature::analog2tempChamber(const int raw) {
|
||||
float Temperature::analog_to_celsiusChamber(const int raw) {
|
||||
#if ENABLED(HEATER_CHAMBER_USES_THERMISTOR)
|
||||
SCAN_THERMISTOR_TABLE(CHAMBERTEMPTABLE, CHAMBERTEMPTABLE_LEN);
|
||||
#elif ENABLED(HEATER_CHAMBER_USES_AD595)
|
||||
@ -1054,18 +1054,18 @@ void Temperature::updateTemperaturesFromRawValues() {
|
||||
#if ENABLED(HEATER_0_USES_MAX6675)
|
||||
current_temperature_raw[0] = read_max6675();
|
||||
#endif
|
||||
HOTEND_LOOP() current_temperature[e] = Temperature::analog2temp(current_temperature_raw[e], e);
|
||||
HOTEND_LOOP() current_temperature[e] = analog_to_celsius_hotend(current_temperature_raw[e], e);
|
||||
#if HAS_HEATED_BED
|
||||
current_temperature_bed = Temperature::analog2tempBed(current_temperature_bed_raw);
|
||||
current_temperature_bed = analog_to_celsius_bed(current_temperature_bed_raw);
|
||||
#endif
|
||||
#if HAS_TEMP_CHAMBER
|
||||
current_temperature_chamber = Temperature::analog2tempChamber(current_temperature_chamber_raw);
|
||||
current_temperature_chamber = analog_to_celsiusChamber(current_temperature_chamber_raw);
|
||||
#endif
|
||||
#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
|
||||
redundant_temperature = Temperature::analog2temp(redundant_temperature_raw, 1);
|
||||
redundant_temperature = analog_to_celsius_hotend(redundant_temperature_raw, 1);
|
||||
#endif
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
filament_width_meas = analog2widthFil();
|
||||
filament_width_meas = analog_to_mm_fil_width();
|
||||
#endif
|
||||
|
||||
#if ENABLED(USE_WATCHDOG)
|
||||
@ -1080,7 +1080,7 @@ void Temperature::updateTemperaturesFromRawValues() {
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
|
||||
// Convert raw Filament Width to millimeters
|
||||
float Temperature::analog2widthFil() {
|
||||
float Temperature::analog_to_mm_fil_width() {
|
||||
return current_raw_filwidth * 5.0f * (1.0f / 16383.0f);
|
||||
}
|
||||
|
||||
@ -1299,7 +1299,7 @@ void Temperature::init() {
|
||||
|
||||
#define TEMP_MIN_ROUTINE(NR) \
|
||||
minttemp[NR] = HEATER_ ##NR## _MINTEMP; \
|
||||
while (analog2temp(minttemp_raw[NR], NR) < HEATER_ ##NR## _MINTEMP) { \
|
||||
while (analog_to_celsius_hotend(minttemp_raw[NR], NR) < HEATER_ ##NR## _MINTEMP) { \
|
||||
if (HEATER_ ##NR## _RAW_LO_TEMP < HEATER_ ##NR## _RAW_HI_TEMP) \
|
||||
minttemp_raw[NR] += OVERSAMPLENR; \
|
||||
else \
|
||||
@ -1307,7 +1307,7 @@ void Temperature::init() {
|
||||
}
|
||||
#define TEMP_MAX_ROUTINE(NR) \
|
||||
maxttemp[NR] = HEATER_ ##NR## _MAXTEMP; \
|
||||
while (analog2temp(maxttemp_raw[NR], NR) > HEATER_ ##NR## _MAXTEMP) { \
|
||||
while (analog_to_celsius_hotend(maxttemp_raw[NR], NR) > HEATER_ ##NR## _MAXTEMP) { \
|
||||
if (HEATER_ ##NR## _RAW_LO_TEMP < HEATER_ ##NR## _RAW_HI_TEMP) \
|
||||
maxttemp_raw[NR] -= OVERSAMPLENR; \
|
||||
else \
|
||||
@ -1363,7 +1363,7 @@ void Temperature::init() {
|
||||
|
||||
#if HAS_HEATED_BED
|
||||
#ifdef BED_MINTEMP
|
||||
while (analog2tempBed(bed_minttemp_raw) < BED_MINTEMP) {
|
||||
while (analog_to_celsius_bed(bed_minttemp_raw) < BED_MINTEMP) {
|
||||
#if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
|
||||
bed_minttemp_raw += OVERSAMPLENR;
|
||||
#else
|
||||
@ -1372,7 +1372,7 @@ void Temperature::init() {
|
||||
}
|
||||
#endif // BED_MINTEMP
|
||||
#ifdef BED_MAXTEMP
|
||||
while (analog2tempBed(bed_maxttemp_raw) > BED_MAXTEMP) {
|
||||
while (analog_to_celsius_bed(bed_maxttemp_raw) > BED_MAXTEMP) {
|
||||
#if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
|
||||
bed_maxttemp_raw -= OVERSAMPLENR;
|
||||
#else
|
||||
|
@ -311,13 +311,13 @@ class Temperature {
|
||||
/**
|
||||
* Static (class) methods
|
||||
*/
|
||||
static float analog2temp(const int raw, const uint8_t e);
|
||||
static float analog_to_celsius_hotend(const int raw, const uint8_t e);
|
||||
|
||||
#if HAS_HEATED_BED
|
||||
static float analog2tempBed(const int raw);
|
||||
static float analog_to_celsius_bed(const int raw);
|
||||
#endif
|
||||
#if HAS_TEMP_CHAMBER
|
||||
static float analog2tempChamber(const int raw);
|
||||
static float analog_to_celsiusChamber(const int raw);
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -358,7 +358,7 @@ class Temperature {
|
||||
#endif
|
||||
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
static float analog2widthFil(); // Convert raw Filament Width to millimeters
|
||||
static float analog_to_mm_fil_width(); // Convert raw Filament Width to millimeters
|
||||
static int8_t widthFil_to_size_ratio(); // Convert Filament Width (mm) to an extrusion ratio
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user