File syn_rc_failsafe.h¶
FileList > control > syn_rc_failsafe.h
Go to the source code of this file
Zero-Heap RC Safety Failsafe Manager & Watchdog. More...
#include "syntropic/common/syn_defs.h"#include <stdbool.h>#include <stddef.h>#include <stdint.h>
Classes¶
| Type | Name |
|---|---|
| struct | SYN_Failsafe_Config |
| struct | SYN_Failsafe_Manager |
Public Types¶
| Type | Name |
|---|---|
| enum | SYN_Failsafe_ChannelMode |
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). |
Macros¶
| Type | Name |
|---|---|
| define | SYN_RC_FAILSAFE_MAX_CHANNELS 16U |
Detailed Description¶
Monitors receiver frame updates and enforces pre-configured failsafe fallback positions or emergency disarming if signal loss exceeds timeout threshold.
Public Types Documentation¶
enum SYN_Failsafe_ChannelMode¶
enum SYN_Failsafe_ChannelMode {
SYN_FAILSAFE_HOLD = 0,
SYN_FAILSAFE_FALLBACK,
SYN_FAILSAFE_DISARM
};
Failsafe Channel Mode.
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.
Macro Definition Documentation¶
define SYN_RC_FAILSAFE_MAX_CHANNELS¶
Maximum supported failsafe RC channels.
The documentation for this class was generated from the following file src/syntropic/control/syn_rc_failsafe.h