Skip to content
Snippets Groups Projects
Commit 8bffe47d authored by User expired's avatar User expired
Browse files

battery monitor config

parent 52379e96
No related branches found
No related tags found
3 merge requests!39Merge Develop into Main,!19development into master,!18Power management satellite
......@@ -41,9 +41,10 @@ uint8_t i2c_address = LC709203F_I2C_ADDR ;
bool LC709203F::begin( void )
{
Wire.begin();
setPowerMode(LC709203F_POWER_OPERATE) ;
setCellCapacity(LC709203F_APA_500MAH) ;
setTemperatureMode(LC709203F_TEMPERATURE_THERMISTOR) ;
setPowerMode(LC709203F_POWER_OPERATE);
setCellCapacity(LC709203F_APA_1000MAH);
setTemperatureMode(LC709203F_TEMPERATURE_I2C);
setCellProfile(LC709203_NOM3p7_Charge4p2);
return true;
}
......@@ -207,6 +208,7 @@ std::list<Message> LC709203F::buildMessages()
{
std::list<Message> messages;
float data =cellVoltage_mV()/1000.0;
//FIXME: use enum instead of string
MeasurementData IncrementData{data, 0, {},"Voltage-Batterie"};
messages.emplace_back(IncrementData, sensorInformation, Time::getInstance().getEpochSeconds());
return messages;
......
......@@ -106,7 +106,7 @@ protected:
void write16( uint8_t regAddress, uint16_t data);
int16_t read16(uint8_t regAddress);
private:
const SensorInformation sensorInformation{"DR26", Protocol::Analog};
const SensorInformation sensorInformation{"LC709203", Protocol::I2C};
};
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment