diff --git a/apps/obc/src/common.c b/apps/obc/src/common.c new file mode 100644 index 0000000..6c49c1d --- /dev/null +++ b/apps/obc/src/common.c @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2025 The FINCH CubeSat Project Flight Software Contributors + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file common.c + * @brief Source for Definitions Common Across Modules + */ + +#include "common.h" +#include +#include + +LOG_MODULE_REGISTER(finch_common); + +/** + * @brief Enter specified ADCS control mode + */ +void cmd_adcs_mode(mode_adcs mode, uint8_t* orbit_info, float current_time, uint8_t* tle) +{ + switch (mode) { + case MODE_ADCS_SAFE: + LOG_INF("Setting ADCS to Safe mode"); + // Setting ADCS to Safe mode + break; + + case MODE_ADCS_DETUMBLING: + LOG_INF("Setting ADCS to Detumbling mode"); + // Set ADCS to Detumbling mode + break; + + case MODE_ADCS_SUN_POINTING: + LOG_INF("Setting ADCS to Sun Pointing mode"); + // Set ADCS to Sun Pointing mode + break; + + case MODE_ADCS_FINE_POINTING: + LOG_INF("Setting ADCS to Fine Pointing mode"); + // Set ADCS to Fine Pointing mode + break; + + case MODE_ADCS_LVLH: + LOG_INF("Setting ADCS to LVLH mode"); + // Set ADCS to LVLH mode + break; + + case MODE_ADCS_TRACKING: + LOG_INF("Setting ADCS to Tracking mode"); + // Set ADCS to Tracking mode + break; + + case MODE_ADCS_OFF: + LOG_INF("Setting ADCS to Off mode"); + // Set ADCS to Off mode + break; + + default: + LOG_WRN("Unknown ADCS control mode"); + break; + } +} + +/** + * @brief Enter specified PAY control mode + */ +void cmd_pay_mode(mode_pay mode) +{ + switch (mode) { + case MODE_PAY_OFF: + LOG_INF("Setting PAY to Off mode"); + // Set PAY to Off mode + break; + + case MODE_PAY_ON: + LOG_INF("Setting PAY to On mode"); + // Set PAY to On mode + break; + + default: + LOG_WRN("Unknown PAY control mode"); + break; + } +} \ No newline at end of file diff --git a/apps/obc/src/common.h b/apps/obc/src/common.h new file mode 100644 index 0000000..ef8b8db --- /dev/null +++ b/apps/obc/src/common.h @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2025 The FINCH CubeSat Project Flight Software Contributors + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file common.h + * @brief Header for Definitions Common Across Modules + */ + +#ifndef FINCH_COMMON_H +#define FINCH_COMMON_H + +/** + * @brief System modules + */ +typedef enum system_module { + MODULE_OPERATOR, + MODULE_MCC_GS, + MODULE_RF, + MODULE_OBC, + MODULE_ADCS, + MODULE_PAY +} system_module; + +/** + * @brief Modes of operation + */ +typedef enum mode_op { + MODE_OP_IDLE, + MODE_OP_IMAGING, + MODE_OP_DOWNLINKING, + MODE_OP_SAFETY, + MODE_OP_FIRMWARE_UPDATE +} mode_op; + +/** + * @brief ADCS control modes + */ +typedef enum mode_adcs { + MODE_ADCS_SAFE, + MODE_ADCS_DETUMBLING, + MODE_ADCS_SUN_POINTING, + MODE_ADCS_FINE_POINTING, + MODE_ADCS_LVLH, + MODE_ADCS_TRACKING, + MODE_ADCS_OFF +} mode_adcs; + +/** + * @brief PAY control mode + */ +typedef enum mode_pay { + MODE_PAY_OFF, + MODE_PAY_ON +} mode_pay; + +/** + * @brief Enter specified mode of operation + */ +// void enter_mode_op(mode_op mode); + +/** + * @brief Enter specified ADCS control mode + */ +void cmd_adcs_mode(mode_adcs mode, uint8_t* orbit_info, float current_time, uint8_t* tle); + +/** + * @brief Enter specified PAY control mode + */ +void cmd_pay_mode(mode_pay mode); + +#endif \ No newline at end of file diff --git a/apps/obc/src/downlinking.c b/apps/obc/src/downlinking.c new file mode 100644 index 0000000..e0caa20 --- /dev/null +++ b/apps/obc/src/downlinking.c @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2025 The FINCH CubeSat Project Flight Software Contributors + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file downlinking.c + * @brief Downlinking Command Sequence Implementation + */ + +#include "common.h" +#include "downlinking.h" +#include +#include + +LOG_MODULE_REGISTER(downlinking); + +/** + * @brief Main loop for Downlinking command sequence + */ +mode_op downlinking_command_sequence(void) +{ + cmd_adcs_mode(MODE_ADCS_FINE_POINTING, 0, 0.0, 0); // Placeholder values for orbit_info, current_time and tle + + downlink_type dl_type = downlinking_prepare_rf(); + uint8_t* downlink_data; + + if (dl_type == DOWNLINK_TELEMETRY) + { + downlink_data = downlinking_get_telemetry_data(); + } + + else if (dl_type == DOWNLINK_IMAGE) + { + downlink_data = downlinking_get_image_data(); + } + + int ret = downlinking_downlink_rf(downlink_data); + + // Error handling - to be implemented + if (ret < 0) + { + return ret; + } + + return MODE_OP_IDLE; +} + +/** + * @brief Prepare RF for downlinking + */ +downlink_type downlinking_prepare_rf(void) +{ + // Implement RF downlink preparation + // Return type of downlinking + return NULL; +} + +/** + * @brief Get telemetry data for downlinking + */ +uint8_t* downlinking_get_telemetry_data(void) +{ + // Get telemetry data + return NULL; +} + +/** + * @brief Get image data for downlinking + */ +uint8_t* downlinking_get_image_data(void) +{ + // Get image data + return NULL; +} + +/** + * @brief Downlink data to RF + */ +int downlinking_downlink_rf(const uint8_t* downlink_data) +{ + // Implement downlinking data to RF + return 0; +} \ No newline at end of file diff --git a/apps/obc/src/downlinking.h b/apps/obc/src/downlinking.h new file mode 100644 index 0000000..e30b336 --- /dev/null +++ b/apps/obc/src/downlinking.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2025 The FINCH CubeSat Project Flight Software Contributors + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file downlinking.h + * @brief Header for Downlinking Command Sequence Implementation + */ + +#ifndef DOWNLINKING_H +#define DOWNLINKING_H + +#include "common.h" + +/** + * @brief Downlink types + */ +typedef enum downlink_type { + DOWNLINK_TELEMETRY, + DOWNLINK_IMAGE +} downlink_type; + +/** + * @brief Main loop for Downlinking command sequence + */ +mode_op downlinking_command_sequence(void); + +/** + * @brief Prepare RF for downlinking + */ +downlink_type downlinking_prepare_rf(void); + +/** + * @brief Get telemetry data for downlinking + */ +uint8_t* downlinking_get_telemetry_data(void); + +/** + * @brief Get image data for downlinking + */ +uint8_t* downlinking_get_image_data(void); + +/** + * @brief Downlink data to RF + */ +int downlinking_downlink_rf(const uint8_t* downlink_data); + +#endif \ No newline at end of file diff --git a/apps/obc/src/firmware-update.c b/apps/obc/src/firmware-update.c new file mode 100644 index 0000000..90a7b61 --- /dev/null +++ b/apps/obc/src/firmware-update.c @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2025 The FINCH CubeSat Project Flight Software Contributors + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file firmware-update.c + * @brief Firmware Update Command Sequence Implementation + */ + +#include "common.h" +#include "firmware-update.h" +#include +#include + +LOG_MODULE_REGISTER(firmware_update); + +/** + * @brief Main loop for Firmware Update command sequence + */ +mode_op firmware_update_command_sequence(void) +{ + // RUN BELOW IN PARALLEL + + // Parallel block 1 + cmd_adcs_mode(MODE_ADCS_FINE_POINTING, 0, 0.0, 0); // Placeholder values for orbit_info, current_time and tle + + // Parallel block 2 + if (cmd_obc_available_update()) + { + cmd_obc_update(); + // Transmit update feedback to RF + } + + if (cmd_pay_available_update()) + { + cmd_pay_update(); + // Transmit update feedback to RF + } + + // END PARALLEL + + return MODE_OP_IDLE; +} + +/** + * @brief Polls for available OBC firmware upate + */ +int cmd_obc_available_update(void) +{ + // Implement check for OBC firmware update + return 0; +} + +/** + * @brief Polls for available PAY firmware upate + */ +int cmd_pay_available_update(void) +{ + // Implement check for PAY firmware update + return 0; +} + +/** + * @brief Executes OBC firmware update + */ +int cmd_obc_update(void) +{ + // Implement OBC firmware update + return 0; +} + +/** + * @brief Executes PAY firmware update + */ +int cmd_pay_update(void) +{ + // Implement PAY firmware update + return 0; +} \ No newline at end of file diff --git a/apps/obc/src/firmware-update.h b/apps/obc/src/firmware-update.h new file mode 100644 index 0000000..1f6dfd4 --- /dev/null +++ b/apps/obc/src/firmware-update.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2025 The FINCH CubeSat Project Flight Software Contributors + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file firmware-update.h + * @brief Header for Firmware Update Command Sequence Implementation + */ + +#ifndef FIRMWARE_UPDATE_H +#define FIRMWARE_UPDATE_H + +#include "common.h" + +/** + * @brief Main loop for Firmware Update command sequence + */ +mode_op firmware_update_command_sequence(void); + +/** + * @brief Polls for available OBC firmware upate + */ +int obc_available_update(void); + +/** + * @brief Polls for available PAY firmware upate + */ +int pay_available_update(void); + +/** + * @brief Executes OBC firmware update + */ +int obc_update(void); + +/** + * @brief Executes PAY firmware update + */ +int pay_update(void); + +#endif diff --git a/apps/obc/src/idle.c b/apps/obc/src/idle.c new file mode 100644 index 0000000..6140b0a --- /dev/null +++ b/apps/obc/src/idle.c @@ -0,0 +1,220 @@ +/* + * Copyright (c) 2025 The FINCH CubeSat Project Flight Software Contributors + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file idle.c + * @brief Idle Command Sequence Implementation + */ + +#include "common.h" +#include "idle.h" +#include +#include + +LOG_MODULE_REGISTER(idle); + +/** + * @brief Execute ADCS command for Idle mode + */ +idle_ret_t adcs_command(void) +{ + cmd_adcs_mode(MODE_ADCS_SUN_POINTING, 0, 0.0, 0); // Placeholder values for orbit_info, current_time and tle +} + +/** + * @brief Handle incoming commands for Idle mode + */ +idle_ret_t handle_incoming(void) +{ + idle_command rf_command; + mode_op rf_mode_change; + + idle_command scheduled_cmd; + mode_op scheduled_mode; + + // RUN BELOW IN PARALLEL + + // Parallel block 1 + rf_command = rf_incoming_command(); + rf_mode_change = rf_incoming_mode_change(); + + // If command from RF + if (rf_command != NULL) + { + schedule_command(rf_command); + } + + // If mode change from RF + else if (rf_mode_change != NULL) + { + schedule_mode_change(rf_mode_change); + } + + // Parallel block 2 + + while (1) + { + // Wait for ping + + scheduled_cmd = check_scheduled_command(); + scheduled_mode = check_scheduled_mode_change(); + + if (scheduled_cmd != NULL) + { + execute_command(scheduled_cmd); + } + + else if (scheduled_mode != NULL) + { + return scheduled_mode; + } + } + + // END PARALLEL +} + +/** + * @brief Execute specified command + */ +idle_ret_t execute_command(command_t cmd) +{ + // Execute specified command + idle_ret_t (*fname)(void) = cmd->fname; + return fname(); +} + +/** + * @brief Main loop for Idle command sequence + */ +mode_op idle_command_sequence(void) +{ + idle_ret_t ret; + command_t cmd; + + for (int i = 0; i < MAX_SCHEDULE_LENGTH; i++) { + cmd = idle_schedule[i]; + + if (cmd->mode != MODE_OP_IDLE) { + return cmd->mode; + } + + ret = execute_command(cmd); + + // error handling + } +} + +/** + * @brief Main loop for Idle command sequence (deprecated) + */ +/*mode_op idle_command_sequence(void) +{ + idle_command rf_command; + mode_op rf_mode_change; + + idle_command scheduled_cmd; + mode_op scheduled_mode; + + // Enter schedule based on location + + cmd_adcs_mode(MODE_ADCS_SUN_POINTING, 0, 0.0, 0); // Placeholder values for orbit_info, current_time and tle + + // RUN BELOW IN PARALLEL + + // Parallel block 1 + rf_command = rf_incoming_command(); + rf_mode_change = rf_incoming_mode_change(); + + // If command from RF + if (rf_command != NULL) + { + schedule_command(rf_command); + } + + // If mode change from RF + else if (rf_mode_change != NULL) + { + schedule_mode_change(rf_mode_change); + } + + // Parallel block 2 + + while (1) + { + // Wait for ping + + scheduled_cmd = check_scheduled_command(); + scheduled_mode = check_scheduled_mode_change(); + + if (scheduled_cmd != NULL) + { + execute_command(scheduled_cmd); + } + + else if (scheduled_mode != NULL) + { + return scheduled_mode; + } + } + + // END PARALLEL + + return 0; +}*/ + +/** + * @brief Check RF for incoming command + */ +idle_command rf_incoming_command(void) +{ + // Check RF for incoming command + return NULL; +} + +/** + * @brief Check RF for incoming mode change + */ +mode_op rf_incoming_mode_change(void) +{ + // Check RF for incoming mode change + return NULL; +} + +/** + * @brief Schedule specified command + */ +int schedule_command(idle_command cmd) +{ + // Schedule specified command + return 0; +} + +/** + * @brief Schedule specified mode change + */ +int schedule_mode_change(mode_op mode) +{ + // Schedule specified mode change + return 0; +} + +/** + * @brief Check if any command is scheduled + */ +idle_command check_scheduled_command(void) +{ + // Check if any command is scheduled + return NULL; +} + +/** + * @brief Check if any mode change is scheduled + */ +mode_op check_scheduled_mode_change(void) +{ + // Check if any mode change is scheduled + return NULL; +} diff --git a/apps/obc/src/idle.h b/apps/obc/src/idle.h new file mode 100644 index 0000000..e07c919 --- /dev/null +++ b/apps/obc/src/idle.h @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2025 The FINCH CubeSat Project Flight Software Contributors + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file idle.h + * @brief Header for Idle Command Sequence Implementation + */ + +#ifndef IDLE_H +#define IDLE_H + +#include "common.h" + +typedef enum { + IDLE_RET_SUCCESS, + IDLE_ADCS_ERROR, + // ... + IDLE_RET_ERROR +} idle_ret_t; + +/** + * @brief Idle commands + */ +typedef struct idle_command { + // idle_ret_t (*fname)(int argc, char *argv), + + mode_op mode; + idle_ret_t (*fname)(void); + uint8_t *loc; +} command_t; + +command_t idle_schedule[MAX_SCHEDULE_LENGTH]; + +// command_t idle_schedule[MAX_SCHEDULE_LENGTH] = { +// idle, idle_adcs +// idle, idle_listen +// ... +// imaging, null, +// null, +// }; + + +/** + * @brief Execute ADCS command for Idle mode + */ +idle_ret_t adcs_command(void); + +/** + * @brief Handle incoming commands for Idle mode + */ +idle_ret_t handle_incoming(void); + +/** + * @brief Main loop for Idle command sequence + */ +mode_op idle_command_sequence(void); + +/** + * @brief Check RF for incoming command + */ +idle_command rf_incoming_command(void); + +/** + * @brief Check RF for incoming mode change + */ +mode_op rf_incoming_mode_change(void); + +/** + * @brief Schedule specified command + */ +int schedule_command(idle_command cmd); + +/** + * @brief Schedule specified mode change + */ +int schedule_mode_change(mode_op mode); + +/** + * @brief Check if any command is scheduled + */ +idle_command check_scheduled_command(void); + +/** + * @brief Check if any mode change is scheduled + */ +mode_op check_scheduled_mode_change(void); + +/** + * @brief Execute specified command + */ +idle_ret_t execute_command(command_t cmd); + +#endif \ No newline at end of file diff --git a/apps/obc/src/imaging.c b/apps/obc/src/imaging.c new file mode 100644 index 0000000..d00471e --- /dev/null +++ b/apps/obc/src/imaging.c @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2025 The FINCH CubeSat Project Flight Software Contributors + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file imaging.c + * @brief Imaging Command Sequence Implementation + */ + +#include "common.h" +#include "imaging.h" +#include +#include + +LOG_MODULE_REGISTER(imaging); + +/** + * @brief Main loop for Imaging command sequence + */ +mode_op imaging_command_sequence(void) +{ + cmd_pay_camera_cool(); + + cmd_adcs_mode(MODE_ADCS_FINE_POINTING, 0, 0.0, 0); // Placeholder values for orbit_info, current_time and tle + + cmd_pay_camera_image(); + LOG_INF("Image capture complete"); + + // If near ground station + if (true) // Placeholder condition + { + return MODE_OP_DOWNLINKING; + } + + else + { + LOG_INF("Downlink request"); // Log downlink request + + return MODE_OP_IDLE; + } +} + +/** + * @brief Execute camera cooling + */ +int cmd_pay_camera_cool(void) +{ + // Implement camera cooling + return 0; +} + +/** + * @brief Execute image capture + */ +int cmd_pay_camera_image(void) +{ + // Implement image capture + return 0; +} \ No newline at end of file diff --git a/apps/obc/src/imaging.h b/apps/obc/src/imaging.h new file mode 100644 index 0000000..080fa65 --- /dev/null +++ b/apps/obc/src/imaging.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 The FINCH CubeSat Project Flight Software Contributors + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file imaging.h + * @brief Header for Imaging Command Sequence Implementation + */ + +#ifndef IMAGING_H +#define IMAGING_H + +#include "common.h" + +/** + * @brief Main loop for Imaging command sequence + */ +mode_op imaging_command_sequence(void); + +/** + * @brief Execute camera cooling + */ +int cmd_pay_camera_cool(void); + +/** + * @brief Execute image capture + */ +int cmd_pay_camera_image(void); + +#endif \ No newline at end of file diff --git a/apps/obc/src/init.c b/apps/obc/src/init.c new file mode 100644 index 0000000..30e3110 --- /dev/null +++ b/apps/obc/src/init.c @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2025 The FINCH CubeSat Project Flight Software Contributors + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file init.c + * @brief Init Command Sequence Implementation + */ + +#include "common.h" +#include "imaging.h" +#include +#include + +LOG_MODULE_REGISTER(initializing_sequence); + +int init() { + mode_op operation = MODE_OP_IDLE; + + while (1) { + switch (operation) { + case MODE_OP_IDLE: + LOG_INF("Entering Idle mode"); + + operation = idle_command_sequence(); + + break; + + case MODE_OP_IMAGING: + LOG_INF("Entering Imaging mode"); + + operation = imaging_command_sequence(); + + break; + + case MODE_OP_DOWNLINKING: + LOG_INF("Entering Downlinking mode"); + + operation = downlinking_command_sequence(); + + break; + + case MODE_OP_SAFETY: + LOG_INF("Entering Safety mode"); + + operation = safety_command_sequence(); + + break; + + case MODE_OP_FIRMWARE_UPDATE: + LOG_INF("Entering Firmware Update mode"); + + operation = firmware_update_command_sequence(); + + break; + + default: + LOG_WRN("Unknown mode of operation"); + + operation = MODE_OP_SAFETY; + + break; + } + } +} + diff --git a/apps/obc/src/main.c b/apps/obc/src/main.c index db7327a..e68f3f4 100644 --- a/apps/obc/src/main.c +++ b/apps/obc/src/main.c @@ -11,9 +11,6 @@ LOG_MODULE_REGISTER(obc); int main(void) { - while (1) { - LOG_INF("obc"); - k_msleep(1000); - } + init(); return 0; -} +} \ No newline at end of file diff --git a/apps/obc/src/safety.c b/apps/obc/src/safety.c new file mode 100644 index 0000000..a1cfe66 --- /dev/null +++ b/apps/obc/src/safety.c @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2025 The FINCH CubeSat Project Flight Software Contributors + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file safety.c + * @brief Safety Command Sequence Implementation + */ + +#include "common.h" +#include "safety.h" +#include +#include + +LOG_MODULE_REGISTER(safety); + +/** + * @brief Main loop for Safety command sequence + */ +mode_op safety_command_sequence(void) +{ + cmd_pay_off(); + cmd_adcs_mode(MODE_ADCS_OFF, 0, 0.0, 0); // Placeholder values for orbit_info, current_time and tle + + uint8_t* error_info; + safety_command cmd; + + while (1) + { + // Receive ping + + error_info = cmd_rf_get_error_info(); + cmd_rf_send_error_info(error_info); + + cmd = cmd_rf_get_error_handler(); + cmd_rf_execute_error_handler(cmd); + + // Check if operator commands to exit Safety mode + if (cmd_rf_check_exit_safety_mode()) + { + cmd_pay_mode(MODE_PAY_ON); + cmd_adcs_mode(MODE_ADCS_SUN_POINTING, 0, 0.0, 0); // Placeholder values for orbit_info, current_time and tle + + // Send to RF that exiting Safety mode + + return MODE_OP_IDLE; + } + } +} + +/** + * @brief Get error info from RF + */ +uint8_t* cmd_rf_get_error_info(void) +{ + // Get error info from RF + return NULL; +} + +/** + * @brief Get error handler from RF + */ +safety_command cmd_rf_get_error_handler(void) +{ + // Get error handler from RF + return NULL; +} + +/** + * @brief Send error info to RF + */ +int cmd_rf_send_error_info(const uint8_t* error_info) +{ + // Send error info to RF + return 0; +} + +/** + * @brief Send error handler command to RF + */ +int cmd_rf_execute_error_handler(safety_command cmd) +{ + // Send error handler command to RF + return 0; +} + +/** + * @brief Check if operator commands to exit Safety mode + */ +int cmd_rf_check_exit_safety_mode(void) +{ + // Check if operator commands to exit Safety mode + return 0; +} \ No newline at end of file diff --git a/apps/obc/src/safety.h b/apps/obc/src/safety.h new file mode 100644 index 0000000..157d46d --- /dev/null +++ b/apps/obc/src/safety.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2025 The FINCH CubeSat Project Flight Software Contributors + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file safety.h + * @brief Header for Safety Command Sequence Implementation + */ + +#ifndef SAFETY_H +#define SAFETY_H + +#include "common.h" + +/** + * @brief Safety commands + */ +typedef enum safety_command { + CMD_SAFETY_EXAMPLE +} safety_command; + +/** + * @brief Main loop for Safety command sequence + */ +mode_op safety_command_sequence(void); + +/** + * @brief Get error info from RF + */ +uint8_t* cmd_rf_get_error_info(void); + +/** + * @brief Get error handler from RF + */ +safety_command cmd_rf_get_error_handler(void); + +/** + * @brief Send error info to RF + */ +int cmd_rf_send_error_info(const uint8_t* error_info); + +/** + * @brief Send error handler command to RF + */ +int cmd_rf_execute_error_handler(safety_command cmd); + +/** + * @brief Check if operator commands to exit Safety mode + */ +int cmd_rf_check_exit_safety_mode(void); + +#endif \ No newline at end of file