diff --git a/client/libs/LC7090203F/LC709203F.cpp b/client/libs/LC7090203F/LC709203F.cpp index b7db139da8b51d3bc9fad1475324ff1e71b98d73..7d93d52888e83f29a5e20d052d489d30cdc76dc1 100644 --- a/client/libs/LC7090203F/LC709203F.cpp +++ b/client/libs/LC7090203F/LC709203F.cpp @@ -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; diff --git a/client/libs/LC7090203F/LC709203F.h b/client/libs/LC7090203F/LC709203F.h index 2b139191cd4da2f3ed52249999bd25baceb003d2..c776d9b387139886d5083d91563447ac6a139b0b 100644 --- a/client/libs/LC7090203F/LC709203F.h +++ b/client/libs/LC7090203F/LC709203F.h @@ -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