Has base BMU code but sends dummy temperature and voltage readings to test CAN

Dependencies:   CUER_CAN DS1820 LTC2943 LTC6804 mbed

Fork of BMS_BMUCore_Max by CUER

LTC2943_Read.cpp

Committer:
DasSidG
Date:
2017-07-02
Revision:
15:e901aff1f5b3
Parent:
4:9050c5d6925e

File content as of revision 15:e901aff1f5b3:

#include "LTC2943_Read.h"
 
LTC2943 ltc2943(i2c_sda, i2c_scl, alcc_pin, &dummyfunction, R_SENSE, BATTERY_CAPACITY);

void LTC2943_initialise()
{
    ltc2943.setADCMode(ADCMODE);
    ltc2943.configALCC(ALCCMODE);
    ltc2943.setChargeThresholdLow(chargeLow);
    ltc2943.setChargeThresholdHigh(chargeHigh);
    ltc2943.setCurrentThresholdLow(currentLow);
    ltc2943.setCurrentThresholdHigh(currentHigh);
    ltc2943.setVoltageThresholdLow(voltageLow);
    ltc2943.setVoltageThresholdHigh(voltageHigh);
    ltc2943.setTemperatureThresholdLow(temperatureLow);
    ltc2943.setTemperatureThresholdHigh(temperatureHigh);
    ltc2943.setPrescAndBattCap(BATTERY_CAPACITY); //TODO: Give this a correct value, this value was randomly picked for compilation
}
 
 
void dummyfunction(void) //this is a functiona attached to an interrupt triggered by ALCC falling low
{
    printf("ALCC DUMMY");
}