mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Adds RobotController class (#828)
Unifies random functionality from other classes Deprecates all old functions.
This commit is contained in:
committed by
Peter Johnson
parent
88a6b4ac38
commit
8b7aa61091
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user