Adds RobotController class (#828)

Unifies random functionality from other classes
Deprecates all old functions.
This commit is contained in:
Thad House
2017-12-10 21:52:49 -08:00
committed by Peter Johnson
parent 88a6b4ac38
commit 8b7aa61091
21 changed files with 668 additions and 19 deletions

View File

@@ -7,7 +7,7 @@
#include "AnalogPotentiometer.h"
#include "ControllerPower.h"
#include "RobotController.h"
#include "SmartDashboard/SendableBuilder.h"
using namespace frc;
@@ -67,7 +67,7 @@ AnalogPotentiometer::AnalogPotentiometer(std::shared_ptr<AnalogInput> input,
* fullRange and offset).
*/
double AnalogPotentiometer::Get() const {
return (m_analog_input->GetVoltage() / ControllerPower::GetVoltage5V()) *
return (m_analog_input->GetVoltage() / RobotController::GetVoltage5V()) *
m_fullRange +
m_offset;
}