tortuga DataLogging Library: battery, speed, time, average...

Dependents:   TORTUGA_BLE

Fork of DataLogging by aapje monkey

Committer:
ptuytsch
Date:
Mon Jul 18 13:18:07 2016 +0000
Revision:
6:9079496c6e25
Parent:
4:f91f45d52f9b
minor changes

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ptuytsch 4:f91f45d52f9b 1 #ifndef BATTERYSTATE_H
ptuytsch 4:f91f45d52f9b 2 #define BATTERYSTATE_H
ptuytsch 4:f91f45d52f9b 3 #include "mbed.h"
ptuytsch 4:f91f45d52f9b 4
ptuytsch 4:f91f45d52f9b 5 class BatteryState{
ptuytsch 4:f91f45d52f9b 6
ptuytsch 4:f91f45d52f9b 7 public:
ptuytsch 4:f91f45d52f9b 8 typedef enum batteryType {
ptuytsch 4:f91f45d52f9b 9 Battery12V=0,
ptuytsch 4:f91f45d52f9b 10 Battery48V
ptuytsch 4:f91f45d52f9b 11 } batteryType;
ptuytsch 4:f91f45d52f9b 12
ptuytsch 4:f91f45d52f9b 13 BatteryState(PinName pin, batteryType batType);
ptuytsch 4:f91f45d52f9b 14 uint8_t getBatteryPercentage();
ptuytsch 4:f91f45d52f9b 15
ptuytsch 4:f91f45d52f9b 16
ptuytsch 4:f91f45d52f9b 17 protected:
ptuytsch 4:f91f45d52f9b 18 AnalogIn batteryPin;
ptuytsch 4:f91f45d52f9b 19 batteryType type;
ptuytsch 4:f91f45d52f9b 20 };
ptuytsch 4:f91f45d52f9b 21
ptuytsch 4:f91f45d52f9b 22 #endif