friday code dump
This commit is contained in:
@ -35,7 +35,7 @@ uint16_t amsov = 0;
|
||||
uint8_t amserrorcode = 0;
|
||||
uint8_t amswarningcode = 0;
|
||||
|
||||
uint8_t numberofCells = 16;
|
||||
uint8_t numberofCells = 14;
|
||||
uint8_t numberofAux = 0;
|
||||
|
||||
uint8_t packetChecksumFails = 0;
|
||||
@ -52,7 +52,7 @@ struct pollingTimes {
|
||||
uint32_t TMP1075;
|
||||
};
|
||||
|
||||
struct pollingTimes pollingTimes = {0, 0, 0, 0};
|
||||
struct pollingTimes pollingTimes = {0, 0};
|
||||
|
||||
void AMS_Init(SPI_HandleTypeDef* hspi) {
|
||||
if (eepromconfigured == 1) {
|
||||
@ -124,8 +124,8 @@ void AMS_Loop() {
|
||||
|
||||
uint8_t AMS_Idle_Loop() {
|
||||
if (!amsWakeUp()) {
|
||||
error_data.data_kind = SEK_INTERNAL_BMS_TIMEOUT;
|
||||
set_error_source(ERROR_SOURCE_INTERNAL);
|
||||
//error_data.data_kind = SEK_INTERNAL_BMS_TIMEOUT;
|
||||
//set_error_source(ERROR_SOURCE_INTERNAL);
|
||||
}
|
||||
|
||||
packetChecksumFails += amsAuxAndStatusMeasurement(&module);
|
||||
@ -197,34 +197,6 @@ uint8_t AMS_Idle_Loop() {
|
||||
}
|
||||
|
||||
mcuDelay(10);
|
||||
|
||||
// static uint32_t channelstobalance = 1;
|
||||
|
||||
// channelstobalance = 0x1FFFF;
|
||||
/* if(channelstobalance & 0x20000){
|
||||
channelstobalance = 1;
|
||||
}*/
|
||||
|
||||
// amsConfigBalancing(channelstobalance);
|
||||
// amsStartBalancing(100);
|
||||
|
||||
if ((module.overVoltage | module.underVoltage)) {
|
||||
// amsSendWarning();
|
||||
// currentAMSState = AMSWARNING;
|
||||
}
|
||||
|
||||
// AMS_Balancing_Loop();
|
||||
|
||||
/* if(BalancingActive)
|
||||
{
|
||||
amsStartBalancing(100);
|
||||
}
|
||||
else
|
||||
{
|
||||
amsStopBalancing();
|
||||
}*/
|
||||
// amsConfigBalancing(balancedCells);
|
||||
// volatile amscheck = amscheckOpenCellWire(&module);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user