diff options
| author | Christoph Berg <myon@debian.org> | 2026-09-26 23:24:28 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-09-26 23:24:28 +0200 |
| commit | 69344560ea394c06ca94acac46a2e4c3e8b7b229 (patch) | |
| tree | ebc98370a697a9bbd6b973a14fa5113c475c6db7 /HoundTransmissionPolicy.cpp | |
| parent | 3e9d10a67671d0bd5c7b8c3ca8088f1818322eff (diff) | |
| parent | 059831534c7e884f0a607ed86b582fd00d821731 (diff) | |
Update upstream source from tag 'upstream/3.2.0_rc1+dfsg'
Update to upstream version '3.2.0~rc1+dfsg'
with Debian dir dbff457fd2c3616d5c77b863c7bfb2186ed86047
Diffstat (limited to 'HoundTransmissionPolicy.cpp')
| -rw-r--r-- | HoundTransmissionPolicy.cpp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/HoundTransmissionPolicy.cpp b/HoundTransmissionPolicy.cpp new file mode 100644 index 00000000..27990312 --- /dev/null +++ b/HoundTransmissionPolicy.cpp @@ -0,0 +1,54 @@ +#include "HoundTransmissionPolicy.hpp" + +namespace HoundTransmissionPolicy +{ + ReplyPlan planFoxReportReply (State const& state, ReplyInput const& input) + { + ReplyPlan plan; + plan.nextState = state; + plan.nextState.foxFrequency = input.decodedFoxFrequency; + + if (input.tune) + { + return plan; + } + + plan.applyReply = true; + plan.txMessage = TxMessage::Tx3; + plan.report = input.sentReport; + plan.enableAuto = !input.autoEnabled; + plan.timeoutMilliseconds = static_cast<int> (11000.0 * input.trPeriod); + plan.nextState.replyState = ReplyState::FirstReplyPending; + if (Protocol::Classic == input.protocol) + { + plan.frequencyDecision.action = FrequencyAction::Set; + plan.frequencyDecision.frequency = input.decodedFoxFrequency; + } + return plan; + } + + TxStartPlan planClassicTxStart (State const& state, ClassicTxStartInput const& input) + { + TxStartPlan plan; + plan.nextState = state; + + if (input.autoEnabled && !input.tune && input.currentTxFrequency < 999 + && 3 != input.selectedTxMessage) + { + plan.frequencyDecision.action = FrequencyAction::RandomizeCalling; + } + + if (ReplyState::FirstReplySent == state.replyState && 3 == input.selectedTxMessage) + { + plan.frequencyDecision.action = FrequencyAction::Set; + plan.frequencyDecision.frequency = state.foxFrequency <= 600 + ? state.foxFrequency + 300 : state.foxFrequency - 300; + } + + if (ReplyState::FirstReplyPending == state.replyState) + { + plan.nextState.replyState = ReplyState::FirstReplySent; + } + return plan; + } +} |
