Emergency all-stop: drop tune, two-tone, and MOX immediately. Used by the watchdog and stop().
| 3207 | // Emergency all-stop: drop tune, two-tone, and MOX immediately. Used by the |
| 3208 | // watchdog and stop(). |
| 3209 | void AutomationServer::forceUnkey(const char* reason) |
| 3210 | { |
| 3211 | if (!m_radioModel) |
| 3212 | return; |
| 3213 | auto& tx = m_radioModel->transmitModel(); |
| 3214 | tx.stopTune(); |
| 3215 | tx.setMox(false); |
| 3216 | // Also abort any in-flight CWX keying: CWX is driven by its own buffer, |
| 3217 | // largely independent of MOX, so setMox(false) alone won't stop a `cwx send` |
| 3218 | // already keying CW. Without this the watchdog would fire repeatedly with no |
| 3219 | // effect until the buffer drained — defeating the all-stop guarantee. (#3646) |
| 3220 | m_radioModel->cwxModel().clearBuffer(); |
| 3221 | m_txKeyedSinceMs = 0; |
| 3222 | qCWarning(lcAutomation).noquote() << "TX force-unkey:" << reason; |
| 3223 | } |
| 3224 | |
| 3225 | // TX safety watchdog (#3646). Runs only when AETHER_AUTOMATION_ALLOW_TX is set. |
| 3226 | // Tracks how long the radio has been continuously keyed and force-unkeys past |
nothing calls this directly
no test coverage detected