mirror of
https://github.com/nqrduck/ATM.git
synced 2024-11-26 20:12:32 +00:00
Bugfixes regarding Matching, added improved home-matching points.
This commit is contained in:
parent
239184ca89
commit
32d66ba21c
2 changed files with 8 additions and 4 deletions
|
@ -40,8 +40,8 @@ const FrequencyRange RANGE_70_125MHZ =
|
|||
125000000U,
|
||||
100000000U,
|
||||
FG_120MHZ,
|
||||
34250U, // FIND VALUES
|
||||
45000U, // FIND VALUES
|
||||
34400U,
|
||||
48500U,
|
||||
};
|
||||
|
||||
const FrequencyRange RANGE_125_180MHZ =
|
||||
|
|
|
@ -349,7 +349,7 @@ void changeFrequencyRange(FrequencyRange target_range)
|
|||
tuner.STEPPER.moveTo(target_range.TUNING_CENTER_POSITION);
|
||||
tuner.STEPPER.runToPosition();
|
||||
|
||||
matcher.STEPPER.moveTo(target_range.TUNING_CENTER_POSITION);
|
||||
matcher.STEPPER.moveTo(target_range.MATCHING_CENTER_POSITION);
|
||||
matcher.STEPPER.runToPosition();
|
||||
}
|
||||
|
||||
|
@ -631,10 +631,14 @@ int optimizeMatching(uint32_t current_resonance_frequency)
|
|||
matcher.STEPPER.move(iteration_steps);
|
||||
matcher.STEPPER.runToPosition();
|
||||
|
||||
delay(250);
|
||||
delay(50);
|
||||
|
||||
current_resonance_frequency = findCurrentResonanceFrequency(current_resonance_frequency - 1000000U, current_resonance_frequency + 1000000U, FREQUENCY_STEP / 2);
|
||||
|
||||
// Skip this iteration if the resonance has been lost
|
||||
if (current_resonance_frequency == 0)
|
||||
continue;
|
||||
|
||||
adf4351.setf(current_resonance_frequency);
|
||||
delay(10);
|
||||
|
||||
|
|
Loading…
Reference in a new issue