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

@@ -14,6 +14,7 @@
#include "adc.h"
#include "timer.h"
#include "utils.h"
#include "System/system.h"
#include <stdbool.h>
#include <stdint.h>
@@ -28,7 +29,7 @@ uint8_t mode,psu_index;
extern uint8_t Power_Level;
uint8_t Psu_Pot_Data[5] = {V_18V,V_24V,V_27V,V_36V,V_55V}; // PSU Pot values.
extern ADC_t adc;
extern SYSTEM_DATA_t sys;
void Set_PSU_Voltage(uint8_t value)
@@ -117,7 +118,7 @@ uint16_t escape_count;
escape_count = 350;
while(adc.V_PSU > volt_limit && escape_count > 0 )
while(sys.adc.V_PSU > volt_limit && escape_count > 0 )
{
Delay_Ticks(1);
escape_count--;