2022-03-07 02:11:21 -04:00
|
|
|
-- example of overriding RC inputs
|
|
|
|
|
2024-05-03 15:22:25 -03:00
|
|
|
---@diagnostic disable: need-check-nil
|
|
|
|
---@diagnostic disable: param-type-mismatch
|
|
|
|
|
2022-03-07 02:11:21 -04:00
|
|
|
local RC4 = rc:get_channel(4)
|
|
|
|
|
|
|
|
function update()
|
|
|
|
-- mirror RC1 onto RC4
|
|
|
|
rc1_input = rc:get_pwm(1)
|
|
|
|
RC4:set_override(rc1_input)
|
|
|
|
return update, 10
|
|
|
|
end
|
|
|
|
|
|
|
|
gcs:send_text(0, "RC_override example")
|
|
|
|
|
|
|
|
return update()
|