BrushlessPower / SBUS2-Telemetry

Arduino Library for SBUS and SBUS2 with Futaba Telemetry
GNU General Public License v3.0
84 stars 23 forks source link

SBUS_Ready() forever true #24

Open ericlangel opened 4 years ago

ericlangel commented 4 years ago

If the SBUS(2) Signal is broken (wire broken, disconnected or receiver unpowered) the SBUS_Ready() function would return true forever.

There should be a reset of sbus_ready and telemetry_ready.

The Functions will be false until a new SBUS(2) Frame is received

ericlangel commented 4 years ago

same for SBUS2_Ready()

ericlangel commented 4 years ago

done

ericlangel commented 3 years ago

issue reopen because:

SBUS2_Ready() also reset SBUS_Ready() -> this should be handled somehow

an always resetting isn't a good solution sometimes you want to trigger on SBUS_Ready at different lines of code, but reset it on an special line

so there should be a SBUS_Ready(bool reset) to decide if you want to reset or not

same for SBUS2_Ready()

BrushlessPower commented 3 years ago

new functions:

SBUS_Ready(bool reset) and SBUS2_Ready(bool reset) -> true = reset / false = not reset use false on your own risk

SBUS_Ready() and SBUS2_Ready() do reset the Flag on every call

Have to test it