File syn_rc_failsafe.c¶
FileList > control > syn_rc_failsafe.c
Go to the source code of this file
Zero-Heap RC Safety Failsafe Manager & Watchdog Implementation.
#include "syntropic/control/syn_rc_failsafe.h"#include <string.h>
Public Functions¶
| Type | Name |
|---|---|
| SYN_Status | syn_failsafe_feed_frame (SYN_Failsafe_Manager * mgr, const uint16_t * in_channels, uint8_t num_channels, uint32_t timestamp_ms) Register valid incoming frame from RC receiver (resets watchdog timer). |
| SYN_Status | syn_failsafe_init (SYN_Failsafe_Manager * mgr, const SYN_Failsafe_Config * config) Initialize failsafe manager instance. |
| bool | syn_failsafe_step (SYN_Failsafe_Manager * mgr, uint32_t now_ms, uint16_t * out_channels) Step failsafe manager state machine and retrieve active channels (or fallback channels if timed out). |
Public Functions Documentation¶
function syn_failsafe_feed_frame¶
Register valid incoming frame from RC receiver (resets watchdog timer).
SYN_Status syn_failsafe_feed_frame (
SYN_Failsafe_Manager * mgr,
const uint16_t * in_channels,
uint8_t num_channels,
uint32_t timestamp_ms
)
Parameters:
mgrPointer to failsafe manager struct.in_channelsPointer to array of channel pulse widths in us.num_channelsTotal channels provided (max 16).timestamp_msCurrent system timestamp in ms.
Returns:
SYN_OK on success.
function syn_failsafe_init¶
Initialize failsafe manager instance.
Parameters:
mgrPointer to failsafe manager struct.configPointer to failsafe configuration struct.
Returns:
SYN_OK on success, SYN_INVALID_PARAM if NULL.
function syn_failsafe_step¶
Step failsafe manager state machine and retrieve active channels (or fallback channels if timed out).
Parameters:
mgrPointer to failsafe manager struct.now_msCurrent system timestamp in ms.out_channelsPointer to output channel array (must hold at least 16 uint16_t values).
Returns:
true if system is currently in Failsafe state, false if active link.
The documentation for this class was generated from the following file src/syntropic/control/syn_rc_failsafe.c