Thunderbots Project
Loading...
Searching...
No Matches
charger.h
1#pragma once
2
3#include <pins.h>
4
5/*
6 * Represents the charger on the power board
7 */
8class Charger
9{
10 public:
14 Charger();
21 static void chargeCapacitors();
27 float getCapacitorVoltage();
33 bool getFlybackFault();
34
35 private:
36 static constexpr float VOLTAGE_DIVIDER = 1003.0 / 13.0;
37 static constexpr float RESOLUTION = 4096.0;
38 static constexpr float SCALE_VOLTAGE = 3.3;
39};
Definition charger.h:9
static void chargeCapacitors()
Definition charger.cpp:11
float getCapacitorVoltage()
Definition charger.cpp:16
bool getFlybackFault()
Definition charger.cpp:21
Charger()
Definition charger.cpp:3