Skip to content

add RDY ready-to-arm sensor - #308

Open
ramiss wants to merge 1 commit into
yaapu:masterfrom
ramiss:rdy-ready-to-arm-sensor
Open

add RDY ready-to-arm sensor#308
ramiss wants to merge 1 commit into
yaapu:masterfrom
ramiss:rdy-ready-to-arm-sensor

Conversation

@ramiss

@ramiss ramiss commented Sep 7, 2026

Copy link
Copy Markdown

Publishes a synthetic telemetry sensor "RDY" that reads 100 when the flight controller is effectively ready to arm and 0 otherwise, so EdgeTX logical switches can drive Special Functions (VTX power, custom sounds). No sound or output logic lives in the script; it only publishes the value.

Note: I am working on a future PR that utilizes this same added sensor, but pulls the actual ready to arm state when using ELRS 4.0 with the new Mavlink to CRSF capability.

For this PR, ready is either:

  • a "using GPS" statustext received during the CURRENT FC power cycle (ArduPilot's "EKF3 IMUx is using GPS"), or
  • the repeating 0x5002 GPS STATUS frame reporting gpsStatus >= 3, gpsHdopC <= 14 (HDOP 1.4) and numSats >= 10

The composite fallback exists because statustexts are fire-once over a lossy link, while the 0x5002 frames repeat and self-heal.

The state must not survive a FC power cycle, so three independent resets clear it: the "ArduCopter V" boot banner in the 0x5000 handler, 800 ticks (8s) without a passthrough frame, and resetTelemetry() / reset().

Sensor: appId 0x060F, subId 0, instance 2 (instances 0 and 1 are already used by Fuel and ARM). It is deliberately published BEFORE the telemetryEnabled() guard in setSensorValues(): inside the guard, link loss returns early and EdgeTX keeps serving the last value, so RDY would freeze at 100 with the vehicle unplugged and a VTX logical switch would stay latched on.

The statustext hook is added to both the S.Port 0x5000 handler and the CRSF 0xF1 branch in crossfirePop(), so it works on CRSF/ELRS links too.

Applies to all OpenTX/EdgeTX colour and B&W variants. Behaviour is identical to before when the new conditions never fire. Ethos is unchanged (no setTelemetryValue equivalent in that API).

Note: the B&W .luac binaries under SD/SCRIPTS/TELEMETRY are not regenerated here, as the repo has no build step; they need recompiling from SRC/ for the sensor to appear on B&W radios.

Publishes a synthetic telemetry sensor "RDY" that reads 100 when the
flight controller is effectively ready to arm and 0 otherwise, so EdgeTX
logical switches can drive Special Functions (VTX power, custom sounds).
No sound or output logic lives in the script; it only publishes the value.

Ready is either:
  - a "using GPS" statustext received during the CURRENT FC power cycle
    (ArduPilot's "EKF3 IMUx is using GPS"), or
  - the repeating 0x5002 GPS STATUS frame reporting gpsStatus >= 3,
    gpsHdopC <= 14 (HDOP 1.4) and numSats >= 10

The composite fallback exists because statustexts are fire-once over a
lossy link, while the 0x5002 frames repeat and self-heal.

The state must not survive an FC power cycle, so three independent resets
clear it: the "ArduCopter V" boot banner in the 0x5000 handler, 800 ticks
(8s) without a passthrough frame, and resetTelemetry() / reset().

Sensor: appId 0x060F, subId 0, instance 2 (instances 0 and 1 are already
used by Fuel and ARM). It is deliberately published BEFORE the
telemetryEnabled() guard in setSensorValues(): inside the guard, link loss
returns early and EdgeTX keeps serving the last value, so RDY would freeze
at 100 with the vehicle unplugged and a VTX logical switch would stay
latched on.

The statustext hook is added to both the S.Port 0x5000 handler and the
CRSF 0xF1 branch in crossfirePop(), so it works on CRSF/ELRS links too.

Applies to all OpenTX/EdgeTX colour and B&W variants. Behaviour is
identical to before when the new conditions never fire. Ethos is
unchanged (no setTelemetryValue equivalent in that API).

Note: the B&W .luac binaries under SD/SCRIPTS/TELEMETRY are not
regenerated here, as the repo has no build step; they need recompiling
from SRC/ for the sensor to appear on B&W radios.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant