Team Virgo v3 / Orion_newPCB_test_LV

Dependencies:   mbed-rtos mbed QEI BNO055 MPU6050_DMP_Nucleo-I2Cdev virgo3_imuHandler_Orion_PCB MAX17048 Servo

Fork of Orion_newPCB_test by Team Virgo v3

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers batt_guage.cpp Source File

batt_guage.cpp

00001 #include "batt_guage.h"
00002 BattGuage::BattGuage():batt_gauge(i2c_SDA, i2c_SCL)
00003 {
00004     batt_gauge.open();
00005     batt_gauge.compensation(MAX17048::RCOMP0); //Load the default compensation value
00006 }
00007 
00008 void BattGuage::reset()
00009 {
00010     batt_gauge.reset();
00011     wait(0.1);
00012 }
00013 
00014 float BattGuage::getSOC()
00015 {
00016     return(batt_gauge.soc());
00017 }
00018 
00019 float BattGuage::getVcell()
00020 {
00021     return(batt_gauge.vcell());
00022 }