From e393d91b1241894ae8f55e2b2816f799a62c34e9 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Wed, 12 Jun 2019 16:20:21 +0200 Subject: [PATCH] Use first letter capital camel case for enum class members. --- Firmware/mmu.cpp | 18 +++++++++--------- Firmware/temperature.cpp | 20 ++++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Firmware/mmu.cpp b/Firmware/mmu.cpp index c289f31d..912305d2 100755 --- a/Firmware/mmu.cpp +++ b/Firmware/mmu.cpp @@ -1511,20 +1511,20 @@ void mmu_continue_loading(bool blocking) enum class Ls : uint_least8_t { - enter, - retry, - unload, + Enter, + Retry, + Unload, }; - Ls state = Ls::enter; + Ls state = Ls::Enter; while (PIN_GET(IR_SENSOR_PIN) != 0) { switch (state) { - case Ls::enter: + case Ls::Enter: increment_load_fail(); // no break - case Ls::retry: + case Ls::Retry: #ifdef MMU_HAS_CUTTER if (1 == eeprom_read_byte((uint8_t*)EEPROM_MMU_CUTTER_ENABLED)) { @@ -1535,9 +1535,9 @@ void mmu_continue_loading(bool blocking) mmu_command(MmuCmd::T0 + tmp_extruder); manage_response(true, true, MMU_TCODE_MOVE); load_more(); - state = Ls::unload; + state = Ls::Unload; break; - case Ls::unload: + case Ls::Unload: stop_and_save_print_to_ram(0, 0); //lift z @@ -1562,7 +1562,7 @@ void mmu_continue_loading(bool blocking) { marlin_wait_for_click(); restore_print_from_ram_and_continue(0); - state = Ls::retry; + state = Ls::Retry; } else { diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index 08d1a55b..db0b8628 100755 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -2053,8 +2053,8 @@ void check_max_temp() struct alert_automaton_mintemp { private: enum { ALERT_AUTOMATON_SPEED_DIV = 5 }; - enum class States : uint8_t { INIT = 0, TEMP_ABOVE_MINTEMP, SHOW_PLEASE_RESTART, SHOW_MINTEMP }; - States state = States::INIT; + enum class States : uint8_t { Init = 0, TempAboveMintemp, ShowPleaseRestart, ShowMintemp }; + States state = States::Init; uint8_t repeat = ALERT_AUTOMATON_SPEED_DIV; void substep(States next_state){ @@ -2073,26 +2073,26 @@ public: static const char m2[] PROGMEM = "MINTEMP fixed"; static const char m1[] PROGMEM = "Please restart"; switch(state){ - case States::INIT: // initial state - check hysteresis + case States::Init: // initial state - check hysteresis if( current_temp > mintemp ){ - state = States::TEMP_ABOVE_MINTEMP; + state = States::TempAboveMintemp; } // otherwise keep the Err MINTEMP alert message on the display, // i.e. do not transfer to state 1 break; - case States::TEMP_ABOVE_MINTEMP: // the temperature has risen above the hysteresis check + case States::TempAboveMintemp: // the temperature has risen above the hysteresis check lcd_setalertstatuspgm(m2); - substep(States::SHOW_MINTEMP); + substep(States::ShowMintemp); last_alert_sent_to_lcd = LCDALERT_MINTEMPFIXED; break; - case States::SHOW_PLEASE_RESTART: // displaying "Please restart" + case States::ShowPleaseRestart: // displaying "Please restart" lcd_updatestatuspgm(m1); - substep(States::SHOW_MINTEMP); + substep(States::ShowMintemp); last_alert_sent_to_lcd = LCDALERT_PLEASERESTART; break; - case States::SHOW_MINTEMP: // displaying "MINTEMP fixed" + case States::ShowMintemp: // displaying "MINTEMP fixed" lcd_updatestatuspgm(m2); - substep(States::SHOW_PLEASE_RESTART); + substep(States::ShowPleaseRestart); last_alert_sent_to_lcd = LCDALERT_MINTEMPFIXED; break; }