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 Team Virgo v3

Committer:
akashvibhute
Date:
Sun Apr 24 23:54:50 2016 +0000
Revision:
11:49344285c82a
Purepursuit + pid pitch control works nicely; this is the demo setup for the french contigent - 25/Apr/2016

Who changed what in which revision?

UserRevisionLine numberNew contents of line
akashvibhute 11:49344285c82a 1 #include "batt_guage.h"
akashvibhute 11:49344285c82a 2 BattGuage::BattGuage():batt_gauge(i2c_SDA, i2c_SCL)
akashvibhute 11:49344285c82a 3 {
akashvibhute 11:49344285c82a 4 batt_gauge.open();
akashvibhute 11:49344285c82a 5 batt_gauge.compensation(MAX17048::RCOMP0); //Load the default compensation value
akashvibhute 11:49344285c82a 6 }
akashvibhute 11:49344285c82a 7
akashvibhute 11:49344285c82a 8 void BattGuage::reset()
akashvibhute 11:49344285c82a 9 {
akashvibhute 11:49344285c82a 10 batt_gauge.reset();
akashvibhute 11:49344285c82a 11 wait(0.1);
akashvibhute 11:49344285c82a 12 }
akashvibhute 11:49344285c82a 13
akashvibhute 11:49344285c82a 14 float BattGuage::getSOC()
akashvibhute 11:49344285c82a 15 {
akashvibhute 11:49344285c82a 16 return(batt_gauge.soc());
akashvibhute 11:49344285c82a 17 }
akashvibhute 11:49344285c82a 18
akashvibhute 11:49344285c82a 19 float BattGuage::getVcell()
akashvibhute 11:49344285c82a 20 {
akashvibhute 11:49344285c82a 21 return(batt_gauge.vcell());
akashvibhute 11:49344285c82a 22 }