Is it possible to send a telemetry value from Lua running on the flight controller, over CRSF/ELRS, in such a way that I can show it on the screen of my remote TX16s?
There are a 25 values my drone currently sends - heading, altitude, battery, signal quality etc. I want to either hijack one of them or (ideally) create a custom one that is sent via a Lua script
1 Like
You can use gcs:send_named_float and then it will be available in mission planner as one of the quick view items named MAV_yournamedfloat.
here is an example of a script I used to report watts, current consumed by the right side of the craft, current consumed by the left side of the craft.
if millis() - previous_print_time_ms > 1000 then
previous_print_time_ms = millis()
gcs:send_named_float("watts", previous_watts)
gcs:send_named_float("left_amps", max_left_amps)
gcs:send_named_float("right_amps", max_right_amps)
-- only track the max amps over the last second
max_right_amps = 0
max_left_amps = 0
end
1 Like