From fae2b7edc38322e69af954f769fa7953d35f5bba Mon Sep 17 00:00:00 2001
From: Scott Lahteine <github@thinkyhead.com>
Date: Mon, 8 Apr 2019 17:56:40 -0500
Subject: [PATCH] Update MMU2 code style

---
 Marlin/src/Marlin.cpp                        |   2 +-
 Marlin/src/feature/prusa_MMU2/mmu2.cpp       |  80 ++++++-------
 Marlin/src/feature/prusa_MMU2/mmu2.h         |  36 +++---
 Marlin/src/gcode/control/T.cpp               |   2 +-
 Marlin/src/gcode/feature/pause/M701_M702.cpp |   2 +-
 Marlin/src/gcode/feature/prusa_MMU2/M403.cpp |   2 +-
 Marlin/src/lcd/menu/menu_mmu2.cpp            | 118 +++++++++----------
 Marlin/src/lcd/menu/menu_mmu2.h              |   2 +-
 Marlin/src/module/tool_change.cpp            |   4 +-
 9 files changed, 124 insertions(+), 124 deletions(-)

diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp
index 01a686a9e7..e04db30eff 100644
--- a/Marlin/src/Marlin.cpp
+++ b/Marlin/src/Marlin.cpp
@@ -723,7 +723,7 @@ void idle(
   #endif
 
   #if ENABLED(PRUSA_MMU2)
-    mmu2.mmuLoop();
+    mmu2.mmu_loop();
   #endif
 }
 
diff --git a/Marlin/src/feature/prusa_MMU2/mmu2.cpp b/Marlin/src/feature/prusa_MMU2/mmu2.cpp
index d2134e4076..7d0e6fcfda 100644
--- a/Marlin/src/feature/prusa_MMU2/mmu2.cpp
+++ b/Marlin/src/feature/prusa_MMU2/mmu2.cpp
@@ -90,7 +90,7 @@ bool MMU2::enabled, MMU2::ready, MMU2::mmu_print_saved;
 uint8_t MMU2::cmd, MMU2::cmd_arg, MMU2::last_cmd, MMU2::extruder;
 int8_t MMU2::state = 0;
 volatile int8_t MMU2::finda = 1;
-volatile bool MMU2::findaRunoutValid;
+volatile bool MMU2::finda_runout_valid;
 int16_t MMU2::version = -1, MMU2::buildnr = -1;
 millis_t MMU2::last_request, MMU2::next_P0_request;
 char MMU2::rx_buffer[16], MMU2::tx_buffer[16];
@@ -103,7 +103,7 @@ char MMU2::rx_buffer[16], MMU2::tx_buffer[16];
   };
 
   static constexpr E_Step ramming_sequence[] PROGMEM = { MMU2_RAMMING_SEQUENCE };
-  static constexpr E_Step loadToNozzle_sequence[] PROGMEM = { MMU2_LOAD_TO_NOZZLE_SEQUENCE };
+  static constexpr E_Step load_to_nozzle_sequence[] PROGMEM = { MMU2_LOAD_TO_NOZZLE_SEQUENCE };
 
 #endif // MMU2_MENUS
 
@@ -142,11 +142,11 @@ void MMU2::reset() {
   #endif
 }
 
-uint8_t MMU2::getCurrentTool() {
+uint8_t MMU2::get_current_tool() {
   return extruder == MMU2_NO_TOOL ? -1 : extruder;
 }
 
-void MMU2::mmuLoop() {
+void MMU2::mmu_loop() {
 
   switch (state) {
 
@@ -185,7 +185,7 @@ void MMU2::mmuLoop() {
 
         DEBUG_ECHOLNPAIR("MMU => ", buildnr);
 
-        checkVersion();
+        check_version();
 
         #if ENABLED(MMU2_MODE_12V)
           DEBUG_ECHOLNPGM("MMU <= 'M1'");
@@ -207,7 +207,7 @@ void MMU2::mmuLoop() {
       if (rx_ok()) {
         DEBUG_ECHOLNPGM("MMU => ok");
 
-        checkVersion();
+        check_version();
 
         DEBUG_ECHOLNPGM("MMU <= 'P0'");
 
@@ -294,13 +294,13 @@ void MMU2::mmuLoop() {
         sscanf(rx_buffer, "%hhuok\n", &finda);
 
         // This is super annoying. Only activate if necessary
-        // if (findaRunoutValid) DEBUG_ECHOLNPAIR_F("MMU <= 'P0'\nMMU => ", finda, 6);
+        // if (finda_runout_valid) DEBUG_ECHOLNPAIR_F("MMU <= 'P0'\nMMU => ", finda, 6);
 
         state = 1;
 
         if (cmd == 0) ready = true;
 
-        if (!finda && findaRunoutValid) filamentRunout();
+        if (!finda && finda_runout_valid) filament_runout();
       }
       else if (ELAPSED(millis(), last_request + MMU_P0_TIMEOUT)) // Resend request after timeout (30s)
         state = 1;
@@ -434,7 +434,7 @@ bool MMU2::rx_ok() {
 /**
  * Check if MMU has compatible firmware
  */
-void MMU2::checkVersion() {
+void MMU2::check_version() {
   if (buildnr < MMU_REQUIRED_FW_BUILDNR) {
     SERIAL_ERROR_START();
     SERIAL_ECHOPGM("MMU2 firmware version invalid. Required version >= ");
@@ -447,7 +447,7 @@ void MMU2::checkVersion() {
 /**
  * Handle tool change
  */
-void MMU2::toolChange(uint8_t index) {
+void MMU2::tool_change(uint8_t index) {
 
   if (!enabled) return;
 
@@ -461,7 +461,7 @@ void MMU2::toolChange(uint8_t index) {
 
     command(MMU_CMD_T0 + index);
 
-    manageResponse(true, true);
+    manage_response(true, true);
     KEEPALIVE_STATE(IN_HANDLER);
 
     command(MMU_CMD_C0);
@@ -490,7 +490,7 @@ void MMU2::toolChange(uint8_t index) {
  * Tc Load to nozzle after filament was prepared by Tx and extruder nozzle is already heated.
  *
  */
-void MMU2::toolChange(const char* special) {
+void MMU2::tool_change(const char* special) {
 
   if (!enabled) return;
 
@@ -501,19 +501,19 @@ void MMU2::toolChange(const char* special) {
 
     switch (*special) {
       case '?': {
-        uint8_t index = mmu2_chooseFilament();
+        uint8_t index = mmu2_choose_filament();
         while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(100);
-        loadFilamentToNozzle(index);
+        load_filament_to_nozzle(index);
       } break;
 
       case 'x': {
         planner.synchronize();
-        uint8_t index = mmu2_chooseFilament();
+        uint8_t index = mmu2_choose_filament();
         disable_E0();
         command(MMU_CMD_T0 + index);
-        manageResponse(true, true);
+        manage_response(true, true);
         command(MMU_CMD_C0);
-        mmuLoop();
+        mmu_loop();
 
         enable_E0();
         extruder = index;
@@ -522,7 +522,7 @@ void MMU2::toolChange(const char* special) {
 
       case 'c': {
         while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(100);
-        executeExtruderSequence((const E_Step *)loadToNozzle_sequence, COUNT(loadToNozzle_sequence));
+        execute_extruder_sequence((const E_Step *)load_to_nozzle_sequence, COUNT(load_to_nozzle_sequence));
       } break;
     }
 
@@ -547,7 +547,7 @@ void MMU2::command(const uint8_t mmu_cmd) {
 /**
  * Wait for response from MMU
  */
-bool MMU2::getResponse(void) {
+bool MMU2::get_response(void) {
   while (cmd != MMU_CMD_NONE) idle();
 
   while (!ready) {
@@ -565,7 +565,7 @@ bool MMU2::getResponse(void) {
 /**
  * Wait for response and deal with timeout if nexcessary
  */
-void MMU2::manageResponse(bool move_axes, bool turn_off_nozzle) {
+void MMU2::manage_response(bool move_axes, bool turn_off_nozzle) {
 
   bool response = false;
   mmu_print_saved = false;
@@ -575,7 +575,7 @@ void MMU2::manageResponse(bool move_axes, bool turn_off_nozzle) {
 
   while (!response) {
 
-    response = getResponse(); //wait for "ok" from mmu
+    response = get_response(); //wait for "ok" from mmu
 
     if (!response) { //no "ok" was received in reserved time frame, user will fix the issue on mmu unit
       if (!mmu_print_saved) { //first occurence, we are saving current position, park print head in certain position and disable nozzle heater
@@ -636,7 +636,7 @@ void MMU2::manageResponse(bool move_axes, bool turn_off_nozzle) {
   }
 }
 
-void MMU2::setFilamentType(uint8_t index, uint8_t filamentType) {
+void MMU2::set_filament_type(uint8_t index, uint8_t filamentType) {
   if (!enabled) return;
 
   KEEPALIVE_STATE(IN_HANDLER);
@@ -644,12 +644,12 @@ void MMU2::setFilamentType(uint8_t index, uint8_t filamentType) {
   cmd_arg = filamentType;
   command(MMU_CMD_F0 + index);
 
-  manageResponse(true, true);
+  manage_response(true, true);
 
   KEEPALIVE_STATE(NOT_BUSY);
 }
 
-void MMU2::filamentRunout() {
+void MMU2::filament_runout() {
   enqueue_and_echo_commands_P(PSTR(MMU2_FILAMENT_RUNOUT_SCRIPT));
   planner.synchronize();
 }
@@ -657,10 +657,10 @@ void MMU2::filamentRunout() {
 #if HAS_LCD_MENU && ENABLED(MMU2_MENUS)
 
   // Load filament into MMU2
-  void MMU2::loadFilament(uint8_t index) {
+  void MMU2::load_filament(uint8_t index) {
     if (!enabled) return;
     command(MMU_CMD_L0 + index);
-    manageResponse(false, false);
+    manage_response(false, false);
     BUZZ(200, 404);
   }
 
@@ -669,7 +669,7 @@ void MMU2::filamentRunout() {
    * Switch material and load to nozzle
    *
    */
-  bool MMU2::loadFilamentToNozzle(uint8_t index) {
+  bool MMU2::load_filament_to_nozzle(uint8_t index) {
 
     if (!enabled) return false;
 
@@ -682,14 +682,14 @@ void MMU2::filamentRunout() {
       KEEPALIVE_STATE(IN_HANDLER);
 
       command(MMU_CMD_T0 + index);
-      manageResponse(true, true);
+      manage_response(true, true);
       command(MMU_CMD_C0);
-      mmuLoop();
+      mmu_loop();
 
       extruder = index;
       active_extruder = 0;
 
-      loadToNozzle();
+      load_to_nozzle();
 
       BUZZ(200, 404);
 
@@ -706,12 +706,12 @@ void MMU2::filamentRunout() {
    * It is not used after T0 .. T4 command (select filament), in such case, gcode is responsible for loading
    * filament to nozzle.
    */
-  void MMU2::loadToNozzle() {
+  void MMU2::load_to_nozzle() {
     if (!enabled) return;
-    executeExtruderSequence((const E_Step *)loadToNozzle_sequence, COUNT(loadToNozzle_sequence));
+    execute_extruder_sequence((const E_Step *)load_to_nozzle_sequence, COUNT(load_to_nozzle_sequence));
   }
 
-  bool MMU2::ejectFilament(uint8_t index, bool recover) {
+  bool MMU2::eject_filament(uint8_t index, bool recover) {
 
     if (!enabled) return false;
 
@@ -731,7 +731,7 @@ void MMU2::filamentRunout() {
     planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 2500 / 60, active_extruder);
     planner.synchronize();
     command(MMU_CMD_E0 + index);
-    manageResponse(false, false);
+    manage_response(false, false);
 
     if (recover)  {
       LCD_MESSAGEPGM(MSG_MMU2_EJECT_RECOVER);
@@ -745,7 +745,7 @@ void MMU2::filamentRunout() {
       BUZZ(200, 404);
 
       command(MMU_CMD_R0);
-      manageResponse(false, false);
+      manage_response(false, false);
     }
 
     ui.reset_status();
@@ -783,10 +783,10 @@ void MMU2::filamentRunout() {
 
     KEEPALIVE_STATE(IN_HANDLER);
 
-    filamentRamming();
+    filament_ramming();
 
     command(MMU_CMD_U0);
-    manageResponse(false, true);
+    manage_response(false, true);
 
     BUZZ(200, 404);
 
@@ -803,11 +803,11 @@ void MMU2::filamentRunout() {
   /**
    * Unload sequence to optimize shape of the tip of the unloaded filament
    */
-  void MMU2::filamentRamming() {
-    executeExtruderSequence((const E_Step *)ramming_sequence, sizeof(ramming_sequence) / sizeof(E_Step));
+  void MMU2::filament_ramming() {
+    execute_extruder_sequence((const E_Step *)ramming_sequence, sizeof(ramming_sequence) / sizeof(E_Step));
   }
 
-  void MMU2::executeExtruderSequence(const E_Step * sequence, int steps) {
+  void MMU2::execute_extruder_sequence(const E_Step * sequence, int steps) {
 
     planner.synchronize();
     enable_E0();
diff --git a/Marlin/src/feature/prusa_MMU2/mmu2.h b/Marlin/src/feature/prusa_MMU2/mmu2.h
index e7546b3406..9c280479c1 100644
--- a/Marlin/src/feature/prusa_MMU2/mmu2.h
+++ b/Marlin/src/feature/prusa_MMU2/mmu2.h
@@ -36,18 +36,18 @@ public:
 
   static void init();
   static void reset();
-  static void mmuLoop();
-  static void toolChange(uint8_t index);
-  static void toolChange(const char* special);
-  static uint8_t getCurrentTool();
-  static void setFilamentType(uint8_t index, uint8_t type);
+  static void mmu_loop();
+  static void tool_change(uint8_t index);
+  static void tool_change(const char* special);
+  static uint8_t get_current_tool();
+  static void set_filament_type(uint8_t index, uint8_t type);
 
   #if HAS_LCD_MENU && ENABLED(MMU2_MENUS)
     static bool unload();
-    static void loadFilament(uint8_t);
-    static void loadAll();
-    static bool loadFilamentToNozzle(uint8_t index);
-    static bool ejectFilament(uint8_t index, bool recover);
+    static void load_filament(uint8_t);
+    static void load_all();
+    static bool load_filament_to_nozzle(uint8_t index);
+    static bool eject_filament(uint8_t index, bool recover);
   #endif
 
 private:
@@ -59,31 +59,31 @@ private:
 
   static bool rx_ok();
   static bool rx_start();
-  static void checkVersion();
+  static void check_version();
 
   static void command(const uint8_t cmd);
-  static bool getResponse(void);
-  static void manageResponse(bool move_axes, bool turn_off_nozzle);
+  static bool get_response(void);
+  static void manage_response(bool move_axes, bool turn_off_nozzle);
 
   #if HAS_LCD_MENU && ENABLED(MMU2_MENUS)
-    static void loadToNozzle();
-    static void filamentRamming();
-    static void executeExtruderSequence(const E_Step * sequence, int steps);
+    static void load_to_nozzle();
+    static void filament_ramming();
+    static void execute_extruder_sequence(const E_Step * sequence, int steps);
   #endif
 
-  static void filamentRunout();
+  static void filament_runout();
 
   static bool enabled, ready, mmu_print_saved;
   static uint8_t cmd, cmd_arg, last_cmd, extruder;
   static int8_t state;
   static volatile int8_t finda;
-  static volatile bool findaRunoutValid;
+  static volatile bool finda_runout_valid;
   static int16_t version, buildnr;
   static millis_t last_request, next_P0_request;
   static char rx_buffer[16], tx_buffer[16];
 
   static inline void set_runout_valid(const bool valid) {
-    findaRunoutValid = valid;
+    finda_runout_valid = valid;
     #if HAS_FILAMENT_SENSOR
       if (valid) runout.reset();
     #endif
diff --git a/Marlin/src/gcode/control/T.cpp b/Marlin/src/gcode/control/T.cpp
index bcb180a968..fb8f09eeeb 100644
--- a/Marlin/src/gcode/control/T.cpp
+++ b/Marlin/src/gcode/control/T.cpp
@@ -55,7 +55,7 @@ void GcodeSuite::T(const uint8_t tool_index) {
 
   #if ENABLED(PRUSA_MMU2)
     if (parser.string_arg) {
-      mmu2.toolChange(parser.string_arg);   // Special commands T?/Tx/Tc
+      mmu2.tool_change(parser.string_arg);   // Special commands T?/Tx/Tc
       return;
     }
   #endif
diff --git a/Marlin/src/gcode/feature/pause/M701_M702.cpp b/Marlin/src/gcode/feature/pause/M701_M702.cpp
index 08c0b6a5d4..a09d8aa710 100644
--- a/Marlin/src/gcode/feature/pause/M701_M702.cpp
+++ b/Marlin/src/gcode/feature/pause/M701_M702.cpp
@@ -84,7 +84,7 @@ void GcodeSuite::M701() {
 
   // Load filament
   #if ENABLED(PRUSA_MMU2)
-    mmu2.loadFilamentToNozzle(target_extruder);
+    mmu2.load_filament_to_nozzle(target_extruder);
   #else
     constexpr float slow_load_length = FILAMENT_CHANGE_SLOW_LOAD_LENGTH;
     const float fast_load_length = ABS(parser.seen('L') ? parser.value_axis_units(E_AXIS)
diff --git a/Marlin/src/gcode/feature/prusa_MMU2/M403.cpp b/Marlin/src/gcode/feature/prusa_MMU2/M403.cpp
index d362bd3e00..c186c1ff2f 100644
--- a/Marlin/src/gcode/feature/prusa_MMU2/M403.cpp
+++ b/Marlin/src/gcode/feature/prusa_MMU2/M403.cpp
@@ -41,7 +41,7 @@ void GcodeSuite::M403() {
          type = parser.intval('F', -1);
 
   if (WITHIN(index, 0, 4) && WITHIN(type, 0, 2))
-    mmu2.setFilamentType(index, type);
+    mmu2.set_filament_type(index, type);
   else
     SERIAL_ECHO_MSG("M403 - bad arguments.");
 }
diff --git a/Marlin/src/lcd/menu/menu_mmu2.cpp b/Marlin/src/lcd/menu/menu_mmu2.cpp
index cebf996900..af2e296083 100644
--- a/Marlin/src/lcd/menu/menu_mmu2.cpp
+++ b/Marlin/src/lcd/menu/menu_mmu2.cpp
@@ -35,60 +35,60 @@ bool mmuMenuWait;
 // Load Filament
 //
 
-void _mmu2_loadFilamentToNozzle(uint8_t index) {
+void _mmu2_load_filamentToNozzle(uint8_t index) {
   ui.reset_status();
   ui.return_to_status();
   ui.status_printf_P(0,  PSTR(MSG_MMU2_LOADING_FILAMENT), int(index + 1));
-  if (mmu2.loadFilamentToNozzle(index)) ui.reset_status();
+  if (mmu2.load_filament_to_nozzle(index)) ui.reset_status();
 }
 
-inline void action_mmu2_loadFilamentToNozzle(const uint8_t tool) {
-  _mmu2_loadFilamentToNozzle(tool);
+inline void action_mmu2_load_filament_to_nozzl_e(const uint8_t tool) {
+  _mmu2_load_filamentToNozzle(tool);
   ui.return_to_status();
 }
-inline void action_mmu2_loadFilamentToNozzle0() { action_mmu2_loadFilamentToNozzle(0); }
-inline void action_mmu2_loadFilamentToNozzle1() { action_mmu2_loadFilamentToNozzle(1); }
-inline void action_mmu2_loadFilamentToNozzle2() { action_mmu2_loadFilamentToNozzle(2); }
-inline void action_mmu2_loadFilamentToNozzle3() { action_mmu2_loadFilamentToNozzle(3); }
-inline void action_mmu2_loadFilamentToNozzle4() { action_mmu2_loadFilamentToNozzle(4); }
+inline void action_mmu2_load_filament_to_nozzle_0() { action_mmu2_load_filament_to_nozzl_e(0); }
+inline void action_mmu2_load_filament_to_nozzle_1() { action_mmu2_load_filament_to_nozzl_e(1); }
+inline void action_mmu2_load_filament_to_nozzle_2() { action_mmu2_load_filament_to_nozzl_e(2); }
+inline void action_mmu2_load_filament_to_nozzle_3() { action_mmu2_load_filament_to_nozzl_e(3); }
+inline void action_mmu2_load_filament_to_nozzle_4() { action_mmu2_load_filament_to_nozzl_e(4); }
 
-void _mmu2_loadFilament(uint8_t index) {
+void _mmu2_load_filament(uint8_t index) {
   ui.return_to_status();
   ui.status_printf_P(0, PSTR(MSG_MMU2_LOADING_FILAMENT), int(index + 1));
-  mmu2.loadFilament(index);
+  mmu2.load_filament(index);
   ui.reset_status();
 }
-void action_mmu2_loadAll() {
+void action_mmu2_load_all() {
   for (uint8_t i = 0; i < EXTRUDERS; i++)
-    _mmu2_loadFilament(i);
+    _mmu2_load_filament(i);
   ui.return_to_status();
 }
-inline void action_mmu2_loadFilament0() { _mmu2_loadFilament(0); }
-inline void action_mmu2_loadFilament1() { _mmu2_loadFilament(1); }
-inline void action_mmu2_loadFilament2() { _mmu2_loadFilament(2); }
-inline void action_mmu2_loadFilament3() { _mmu2_loadFilament(3); }
-inline void action_mmu2_loadFilament4() { _mmu2_loadFilament(4); }
+inline void action_mmu2_load_filament_0() { _mmu2_load_filament(0); }
+inline void action_mmu2_load_filament_1() { _mmu2_load_filament(1); }
+inline void action_mmu2_load_filament_2() { _mmu2_load_filament(2); }
+inline void action_mmu2_load_filament_3() { _mmu2_load_filament(3); }
+inline void action_mmu2_load_filament_4() { _mmu2_load_filament(4); }
 
-void menu_mmu2_loadFilament() {
+void menu_mmu2_load_filament() {
   START_MENU();
   MENU_BACK(MSG_MMU2_MENU);
-  MENU_ITEM(function, MSG_MMU2_ALL, action_mmu2_loadAll);
-  MENU_ITEM(function, MSG_MMU2_FILAMENT0, action_mmu2_loadFilament0);
-  MENU_ITEM(function, MSG_MMU2_FILAMENT1, action_mmu2_loadFilament1);
-  MENU_ITEM(function, MSG_MMU2_FILAMENT2, action_mmu2_loadFilament2);
-  MENU_ITEM(function, MSG_MMU2_FILAMENT3, action_mmu2_loadFilament3);
-  MENU_ITEM(function, MSG_MMU2_FILAMENT4, action_mmu2_loadFilament4);
+  MENU_ITEM(function, MSG_MMU2_ALL, action_mmu2_load_all);
+  MENU_ITEM(function, MSG_MMU2_FILAMENT0, action_mmu2_load_filament_0);
+  MENU_ITEM(function, MSG_MMU2_FILAMENT1, action_mmu2_load_filament_1);
+  MENU_ITEM(function, MSG_MMU2_FILAMENT2, action_mmu2_load_filament_2);
+  MENU_ITEM(function, MSG_MMU2_FILAMENT3, action_mmu2_load_filament_3);
+  MENU_ITEM(function, MSG_MMU2_FILAMENT4, action_mmu2_load_filament_4);
   END_MENU();
 }
 
-void menu_mmu2_loadToNozzle() {
+void menu_mmu2_load_to_nozzle() {
   START_MENU();
   MENU_BACK(MSG_MMU2_MENU);
-  MENU_ITEM(function, MSG_MMU2_FILAMENT0, action_mmu2_loadFilamentToNozzle0);
-  MENU_ITEM(function, MSG_MMU2_FILAMENT1, action_mmu2_loadFilamentToNozzle1);
-  MENU_ITEM(function, MSG_MMU2_FILAMENT2, action_mmu2_loadFilamentToNozzle2);
-  MENU_ITEM(function, MSG_MMU2_FILAMENT3, action_mmu2_loadFilamentToNozzle3);
-  MENU_ITEM(function, MSG_MMU2_FILAMENT4, action_mmu2_loadFilamentToNozzle4);
+  MENU_ITEM(function, MSG_MMU2_FILAMENT0, action_mmu2_load_filament_to_nozzle_0);
+  MENU_ITEM(function, MSG_MMU2_FILAMENT1, action_mmu2_load_filament_to_nozzle_1);
+  MENU_ITEM(function, MSG_MMU2_FILAMENT2, action_mmu2_load_filament_to_nozzle_2);
+  MENU_ITEM(function, MSG_MMU2_FILAMENT3, action_mmu2_load_filament_to_nozzle_3);
+  MENU_ITEM(function, MSG_MMU2_FILAMENT4, action_mmu2_load_filament_to_nozzle_4);
   END_MENU();
 }
 
@@ -96,19 +96,19 @@ void menu_mmu2_loadToNozzle() {
 // Eject Filament
 //
 
-void _mmu2_ejectFilament(uint8_t index) {
+void _mmu2_eject_filament(uint8_t index) {
   ui.reset_status();
   ui.return_to_status();
   ui.status_printf_P(0, PSTR(MSG_MMU2_EJECTING_FILAMENT), int(index + 1));
-  if (mmu2.ejectFilament(index, true)) ui.reset_status();
+  if (mmu2.eject_filament(index, true)) ui.reset_status();
 }
-inline void action_mmu2_ejectFilament0() { _mmu2_ejectFilament(0); }
-inline void action_mmu2_ejectFilament1() { _mmu2_ejectFilament(1); }
-inline void action_mmu2_ejectFilament2() { _mmu2_ejectFilament(2); }
-inline void action_mmu2_ejectFilament3() { _mmu2_ejectFilament(3); }
-inline void action_mmu2_ejectFilament4() { _mmu2_ejectFilament(4); }
+inline void action_mmu2_eject_filament_0() { _mmu2_eject_filament(0); }
+inline void action_mmu2_eject_filament_1() { _mmu2_eject_filament(1); }
+inline void action_mmu2_eject_filament_2() { _mmu2_eject_filament(2); }
+inline void action_mmu2_eject_filament_3() { _mmu2_eject_filament(3); }
+inline void action_mmu2_eject_filament_4() { _mmu2_eject_filament(4); }
 
-void action_mmu2_unloadFilament() {
+void action_mmu2_unload_filament() {
   ui.reset_status();
   ui.return_to_status();
   LCD_MESSAGEPGM(MSG_MMU2_UNLOADING_FILAMENT);
@@ -116,14 +116,14 @@ void action_mmu2_unloadFilament() {
   if (mmu2.unload()) ui.reset_status();
 }
 
-void menu_mmu2_ejectFilament() {
+void menu_mmu2_eject_filament() {
   START_MENU();
   MENU_BACK(MSG_MMU2_MENU);
-  MENU_ITEM(function, MSG_MMU2_FILAMENT0, action_mmu2_ejectFilament0);
-  MENU_ITEM(function, MSG_MMU2_FILAMENT1, action_mmu2_ejectFilament1);
-  MENU_ITEM(function, MSG_MMU2_FILAMENT2, action_mmu2_ejectFilament2);
-  MENU_ITEM(function, MSG_MMU2_FILAMENT3, action_mmu2_ejectFilament3);
-  MENU_ITEM(function, MSG_MMU2_FILAMENT4, action_mmu2_ejectFilament4);
+  MENU_ITEM(function, MSG_MMU2_FILAMENT0, action_mmu2_eject_filament_0);
+  MENU_ITEM(function, MSG_MMU2_FILAMENT1, action_mmu2_eject_filament_1);
+  MENU_ITEM(function, MSG_MMU2_FILAMENT2, action_mmu2_eject_filament_2);
+  MENU_ITEM(function, MSG_MMU2_FILAMENT3, action_mmu2_eject_filament_3);
+  MENU_ITEM(function, MSG_MMU2_FILAMENT4, action_mmu2_eject_filament_4);
   END_MENU();
 }
 
@@ -139,10 +139,10 @@ void action_mmu2_reset() {
 void menu_mmu2() {
   START_MENU();
   MENU_BACK(MSG_MAIN);
-  MENU_ITEM(submenu, MSG_MMU2_LOAD_FILAMENT, menu_mmu2_loadFilament);
-  MENU_ITEM(submenu, MSG_MMU2_LOAD_TO_NOZZLE, menu_mmu2_loadToNozzle);
-  MENU_ITEM(submenu, MSG_MMU2_EJECT_FILAMENT, menu_mmu2_ejectFilament);
-  MENU_ITEM(function, MSG_MMU2_UNLOAD_FILAMENT, action_mmu2_unloadFilament);
+  MENU_ITEM(submenu, MSG_MMU2_LOAD_FILAMENT, menu_mmu2_load_filament);
+  MENU_ITEM(submenu, MSG_MMU2_LOAD_TO_NOZZLE, menu_mmu2_load_to_nozzle);
+  MENU_ITEM(submenu, MSG_MMU2_EJECT_FILAMENT, menu_mmu2_eject_filament);
+  MENU_ITEM(function, MSG_MMU2_UNLOAD_FILAMENT, action_mmu2_unload_filament);
   MENU_ITEM(function, MSG_MMU2_RESET, action_mmu2_reset);
   END_MENU();
 }
@@ -161,7 +161,7 @@ inline void action_mmu2_choose2() { action_mmu2_choose(2); }
 inline void action_mmu2_choose3() { action_mmu2_choose(3); }
 inline void action_mmu2_choose4() { action_mmu2_choose(4); }
 
-void menu_mmu2_chooseFilament() {
+void menu_mmu2_choose_filament() {
   START_MENU();
   #if LCD_HEIGHT > 2
     STATIC_ITEM(MSG_MMU2_CHOOSE_FILAMENT_HEADER, true, true);
@@ -178,21 +178,21 @@ void menu_mmu2_chooseFilament() {
 // MMU2 Filament Runout
 //
 
-inline void action_mmu2_M600_loadCurrentFilament()         { mmu2.loadFilament(currentTool); }
-inline void action_mmu2_M600_loadCurrentFilamentToNozzle() { mmu2.loadFilamentToNozzle(currentTool); }
-inline void action_mmu2_M600_unloadFilament()              { mmu2.unload(); }
+inline void action_mmu2_M600_load_current_filament()         { mmu2.load_filament(currentTool); }
+inline void action_mmu2_M600_load_current_filament_to_nozzle() { mmu2.load_filament_to_nozzle(currentTool); }
+inline void action_mmu2_M600_unload_filament()              { mmu2.unload(); }
 inline void action_mmu2_M600_resume()                      { mmuMenuWait = false; }
 
 void menu_mmu2_pause() {
-  currentTool = mmu2.getCurrentTool();
+  currentTool = mmu2.get_current_tool();
   START_MENU();
   #if LCD_HEIGHT > 2
     STATIC_ITEM(MSG_MMU2_FILAMENT_CHANGE_HEADER, true, true);
   #endif
   MENU_ITEM(function, MSG_MMU2_RESUME, action_mmu2_M600_resume);
-  MENU_ITEM(function, MSG_MMU2_UNLOAD_FILAMENT, action_mmu2_M600_unloadFilament);
-  MENU_ITEM(function, MSG_MMU2_LOAD_FILAMENT, action_mmu2_M600_loadCurrentFilament);
-  MENU_ITEM(function, MSG_MMU2_LOAD_TO_NOZZLE, action_mmu2_M600_loadCurrentFilamentToNozzle);
+  MENU_ITEM(function, MSG_MMU2_UNLOAD_FILAMENT, action_mmu2_M600_unload_filament);
+  MENU_ITEM(function, MSG_MMU2_LOAD_FILAMENT, action_mmu2_M600_load_current_filament);
+  MENU_ITEM(function, MSG_MMU2_LOAD_TO_NOZZLE, action_mmu2_M600_load_current_filament_to_nozzle);
   END_MENU();
 }
 
@@ -203,9 +203,9 @@ void mmu2_M600() {
   while (mmuMenuWait) idle();
 }
 
-uint8_t mmu2_chooseFilament() {
+uint8_t mmu2_choose_filament() {
   ui.defer_status_screen();
-  ui.goto_screen(menu_mmu2_chooseFilament);
+  ui.goto_screen(menu_mmu2_choose_filament);
   mmuMenuWait = true;
   while (mmuMenuWait) idle();
   ui.return_to_status();
diff --git a/Marlin/src/lcd/menu/menu_mmu2.h b/Marlin/src/lcd/menu/menu_mmu2.h
index fa9dff612c..ee14e1191c 100644
--- a/Marlin/src/lcd/menu/menu_mmu2.h
+++ b/Marlin/src/lcd/menu/menu_mmu2.h
@@ -25,4 +25,4 @@
 
 void menu_mmu2();
 void mmu2_M600();
-uint8_t mmu2_chooseFilament();
+uint8_t mmu2_choose_filament();
diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp
index 0de0fcfafc..c52f263190 100644
--- a/Marlin/src/module/tool_change.cpp
+++ b/Marlin/src/module/tool_change.cpp
@@ -577,7 +577,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
 
     UNUSED(fr_mm_s); UNUSED(no_move);
 
-    mmu2.toolChange(tmp_extruder);
+    mmu2.tool_change(tmp_extruder);
 
   #elif EXTRUDERS < 2
 
@@ -777,7 +777,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
       #endif
 
       #if ENABLED(PRUSA_MMU2)
-        mmu2.toolChange(tmp_extruder);
+        mmu2.tool_change(tmp_extruder);
       #endif
 
       #if SWITCHING_NOZZLE_TWO_SERVOS