V1.0 - merged mvbms-test to main - made the changes needed for the project to compile V1.1 - changed PWM settings in mxcube for ESC_L/R_PWM - add pwm_calibrate_powerground - precharge and discharge are now timer dependent instead of voltage dependent - remove the transitions (precharge -> discharge) to stop weird interactions V1.2 - change auxvoltages and cellvoltages to float to achieve higher precision - added void sm_calibrate_powerground(); void sm_precharge_discharge_manager(); - fixed the clock in mxcube - cleaned up PWM_powerground_control() - cleaned up the state machine V1.3 - added eeprom.h and eeprom.c, is still WIP - void sm_check_charging(); was removed, you need to call 0xF1XX to enter charging mode, precharge is then 3 seconds then the relay closes. call 0x0000 to exit charging - removed some variables and some functions V1.4 - replaced ADBMS code with the newest version from the Slaves - added the Author to things i made - error_source is now set in the state_machine.c V1.5 - int16_t auxVoltages[MAXIMUM_AUX_VOLTAGES] to float - errors out when no messages are recieved for CAN_TIMEOUT messages - void set_error_source(int source); -> void set_error_source(SlaveErrorKind source); V1.6 - set temperature limit to 59 - precharge and discharge durations are now 5 seconds - RELAY_BAT/ESC_SIDE and CURRENT_MEASUREMENT to int32_t - CAN messages are now correctly formated - minimum cell voltage is now set to 3200 mV - powerground calibration is now done in STATE_PRECHARGE (well yes but actually no) V1.7 - added eeprom functions - fixed(tm) voltage and CURRENT_MEASUREMENT - changed the CAN message a bit - added soc_estimation.c soc_estimation.h - added MIN/MAX_CELL_VOLTAGE for AMS_HighLevel - cleaned up state_machine code - changed the format of the CAN message. V1.8 - removed macros from can.h - added documentation to PWM_control.h - the MVBMS only reacts to messages if they are different from the previous message - powerground calibration now starts at STATE_PRECHARGE - moved header files from state_machine.c to h - added status_LED.c, changed the ioc file accordingly V1.9 - switched ~CSB and ~WC to high speed GPIO - cleaned up the includes in most files - wrote some code for the eeprom V1.10 - PWM_control now has some macros and the method PWM_powerground_softcontrol() - added void sm_powerground_manager() to state_machine.c V1.11 - added can_handle_dump() to dump the logging data from the EEPROM to CAN - rewrote eeprom_read() and eeprom_write - added void sm_program_powerground() and void sm_eeprom_write_status() - V1.12 - added some TODOs as warnings - added AMS_Balancing_Loop() to AMS_HighLevel - added current_soc to logging data - removed void sm_balancing() (the AMS should do it automatically if we set it to charging state) - changed the colors for the states in status_LED V1.13 - moved macros and libraries from eeprom.c to h - added can.h to state_machine.h - added balancing to AMS_HighLevel.c (hopefully) - fixed can_handle_dump() V1.14 - added programming mode to program the ESCs - removed void status_led_blink_sequence(uint8_t blinks, color color) and added proper blinking - fixed the bit shift of temperature in the can message - moved tmp1075_measure() and can_handle_send_status() to the state_machine V1.15 - changed max temperature to 55 from 60 according to the data sheet of the cell - changed ocv_soc_pairs to something close to the curve of other swaytronics batteries - the can messages uses roundf to round the values - made the pwm spool up in 300ms - increased MIN_CELL_VOLTAGE - the STM32 wait 1s for the BMS to finish its measurements - added debugging mode (turns off error checking) - added and ERROR_LATCH_TIME - added different blink speeds for different states V1.16 - TIME_BLINK_SLOW: 1000 -> 2000 - moved can.c timers to can.h to detec - added logging of cells on can ID 0x503 - eeprom gets initialized in main - startup delay is now 500ms - removed a zero from ocv_soc_pairs - changed precharge and discharge timers to 8000ms