|
CTS-SAT-1-OBC-Firmware
|
#include "eps_drivers/eps_power_management.h"#include "eps_drivers/eps_types_to_json.h"#include "eps_drivers/eps_commands.h"#include "log/log.h"#include <string.h>#include <stdint.h>#include <stdio.h>
Functions | |
| uint8_t | EPS_monitor_and_disable_overcurrent_channels () |
| Monitors the power consumption of each channel. | |
| void | EPS_channel_management (const EPS_struct_pdu_housekeeping_data_eng_t *EPS_pdu_housekeeping_data_eng) |
| Monitor the power consumption of each channel and disable any channels that exceed a certain threshold. | |
| void | EPS_CMD_power_management_set_current_threshold (uint8_t channel, uint16_t threshold) |
Variables | |
| uint16_t | EPS_current_mA_threshhold [32] |
| void EPS_channel_management | ( | const EPS_struct_pdu_housekeeping_data_eng_t * | EPS_pdu_housekeeping_data_eng | ) |
Monitor the power consumption of each channel and disable any channels that exceed a certain threshold.
| [in] | EPS_pdu_housekeeping_data_eng | PDU housekeeping data with the current power consumption of each channel |
| [in] | prev_EPS_pdu_housekeeping_data_eng | Previous PDU housekeeping data with the previous power consumption of each chan/// |


| void EPS_CMD_power_management_set_current_threshold | ( | uint8_t | channel, |
| uint16_t | threshold ) |

| uint8_t EPS_monitor_and_disable_overcurrent_channels | ( | ) |
Monitors the power consumption of each channel.
This function will obtain the PDU housekeeping data. If this is the first time the function is called, it will save the data for future comparisons. It will then check if the power consumption has increased or decreased by more than a certain threshold. If it has, it will disable the channel and log an error message. The function will log an error message if the channel is disabled due to a power issue.


| uint16_t EPS_current_mA_threshhold[32] |