Implement new controller
Dependencies: mbed-rtos mbed QEI BNO055 MPU6050_DMP_Nucleo-I2Cdev virgo3_imuHandler_Orion_PCB MAX17048 Servo
Fork of Orion_newPCB_test by
04_PowerMonitor/batt_guage.cpp@4:315716ef8178, 2016-01-20 (annotated)
- Committer:
- akashvibhute
- Date:
- Wed Jan 20 04:01:37 2016 +0000
- Revision:
- 4:315716ef8178
- Parent:
- 2:761e3c932ce0
added BNO055 wrapper to imuHandler function
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
akashvibhute | 4:315716ef8178 | 1 | #include "batt_guage.h" |
akashvibhute | 4:315716ef8178 | 2 | BattGuage::BattGuage():batt_gauge(i2c_SDA, i2c_SCL) |
akashvibhute | 4:315716ef8178 | 3 | { |
akashvibhute | 4:315716ef8178 | 4 | batt_gauge.open(); |
akashvibhute | 4:315716ef8178 | 5 | batt_gauge.compensation(MAX17048::RCOMP0); //Load the default compensation value |
akashvibhute | 4:315716ef8178 | 6 | } |
akashvibhute | 4:315716ef8178 | 7 | |
akashvibhute | 4:315716ef8178 | 8 | void BattGuage::reset() |
akashvibhute | 4:315716ef8178 | 9 | { |
akashvibhute | 4:315716ef8178 | 10 | batt_gauge.reset(); |
akashvibhute | 4:315716ef8178 | 11 | wait(0.1); |
akashvibhute | 4:315716ef8178 | 12 | } |
akashvibhute | 4:315716ef8178 | 13 | |
akashvibhute | 4:315716ef8178 | 14 | float BattGuage::getSOC() |
akashvibhute | 4:315716ef8178 | 15 | { |
akashvibhute | 4:315716ef8178 | 16 | return(batt_gauge.soc()); |
akashvibhute | 4:315716ef8178 | 17 | } |
akashvibhute | 4:315716ef8178 | 18 | |
akashvibhute | 4:315716ef8178 | 19 | float BattGuage::getVcell() |
akashvibhute | 4:315716ef8178 | 20 | { |
akashvibhute | 4:315716ef8178 | 21 | return(batt_gauge.vcell()); |
akashvibhute | 4:315716ef8178 | 22 | } |