Lots of refactoring

This commit is contained in:
2025-06-11 10:55:00 -05:00
parent a437bcf8b5
commit aaa7f0dc29
35 changed files with 1165 additions and 809 deletions

View File

@@ -34,8 +34,7 @@
#define HF_AMP_ON 0b01000000
#define PORT_LE 5
#define ESTOP 17
#define BYPASS_ON 0b00000001 //
//#define BYPASS_ON 0b00000001 //
#define HFDC_ON 0b00000010
#define LFDC_ON 0b00000000
#define LFANT_ON 0b00000100
@@ -84,30 +83,19 @@ typedef enum{
} AMP_XFRMR_SLCT_t;
typedef enum {
CONNECTED,
ISOLATED
} ESTOP_SELECT_t;
typedef enum {
OFF,
ON
}RELAY_SELECT_t;
} RELAY_SELECT_t;
typedef struct ClampData_s
{
float slope;
uint8_t pot;
float voltage;
float current;
float impedance;
float power;
float maxPower;
float targetPower;
uint32_t timeout;
bool regulate;
uint8_t prevPowerLevel;
} ClampData_t;
void Select_Estop(RELAY_SELECT_t);
void Select_Estop(ESTOP_SELECT_t);
void Send_Pot_Data(uint16_t Data, SPI_MODE_t destination);
void Send_Update_Port(void);
void Clear_Relays(void);