diff --git a/include/Positions.h b/include/Positions.h index a4caa1d..0385ebd 100644 --- a/include/Positions.h +++ b/include/Positions.h @@ -44,7 +44,7 @@ const FrequencyRange RANGE_70_125MHZ = 100000000U, FG_120MHZ, 34400U, - 48500U, + 60500U, }; const FrequencyRange RANGE_125_180MHZ = diff --git a/src/commands/ControlSwitch.cpp b/src/commands/ControlSwitch.cpp index ace6b29..d2aa726 100644 --- a/src/commands/ControlSwitch.cpp +++ b/src/commands/ControlSwitch.cpp @@ -27,7 +27,8 @@ void ControlSwitch::execute(String input_line) } else if (switch_to == switch_state) { - result = "Already switched to " + String(switch_to); + String active_pathway = (switch_state == PRE_AMP) ? "preamp" : "atm system"; + result = "Already switched to " + String(active_pathway); } else { diff --git a/src/commands/Homing.cpp b/src/commands/Homing.cpp index 7e4e48e..a0aa3d0 100644 --- a/src/commands/Homing.cpp +++ b/src/commands/Homing.cpp @@ -1,13 +1,21 @@ #include "Utilities.h" #include "Homing.h" -void Homing::execute(String input_line) { +void Homing::execute(String input_line) +{ printInfo("Homing..."); tuner.STEPPER.setCurrentPosition(homeStepper(tuner)); matcher.STEPPER.setCurrentPosition(homeStepper(matcher)); + + tuner.STEPPER.moveTo(RANGE_70_125MHZ.TUNING_CENTER_POSITION); + tuner.STEPPER.runToPosition(); + + matcher.STEPPER.moveTo(RANGE_70_125MHZ.MATCHING_CENTER_POSITION); + matcher.STEPPER.runToPosition(); } -void Homing::printResult() { +void Homing::printResult() +{ printInfo("Resonance frequency after homing:"); uint32_t startf = 35000000U; uint32_t stopf = 110000000U; @@ -18,10 +26,10 @@ void Homing::printResult() { printInfo("Homing finished"); } -void Homing::printHelp() { +void Homing::printHelp() +{ Serial.println("Homing command"); Serial.println("Syntax: h"); Serial.println("Example: h"); Serial.println("This will home the tuner and matcher"); } -