Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
fang::chassis::PowerQuadDrive Class Reference

#include <power_quad_drive.hpp>

Inheritance diagram for fang::chassis::PowerQuadDrive:
Collaboration diagram for fang::chassis::PowerQuadDrive:

Public Member Functions

 PowerQuadDrive (Drivers &drivers, Motors &&motors, std::unique_ptr< IPowerLimiterSystem > powerLimiter)
 
virtual void setTargetWheelSpeeds (const QuadRPM &wheelSpeeds) override
 
virtual void initialize () override
 
virtual void update () override
 
virtual void refresh () override
 
virtual ~PowerQuadDrive ()
 
- Public Member Functions inherited from fang::chassis::BaseQuadDrive
 BaseQuadDrive (Drivers &drivers, std::unique_ptr< Motor > frontLeftMotor, std::unique_ptr< Motor > frontRightMotor, std::unique_ptr< Motor > rearLeftMotor, std::unique_ptr< Motor > rearRightMotor)
 
 BaseQuadDrive (Drivers &drivers, Motors &&motors)
 
virtual ~BaseQuadDrive ()
 
- Public Member Functions inherited from fang::chassis::QuadDriveSubsystem
 QuadDriveSubsystem (tap::Drivers &drivers)
 
virtual ~QuadDriveSubsystem ()=default
 
- Public Member Functions inherited from tap::control::Subsystem
 Subsystem (Drivers *drivers)
 
virtual ~Subsystem ()
 
void registerAndInitialize ()
 
mockable void setDefaultCommand (Command *defaultCommand)
 
mockable CommandgetDefaultCommand () const
 
virtual void refreshSafeDisconnect ()
 
mockable void setTestCommand (Command *testCommand)
 
mockable CommandgetTestCommand () const
 
virtual const char * getName () const
 
mockable int getGlobalIdentifier () const
 

Additional Inherited Members

- Public Types inherited from fang::chassis::BaseQuadDrive
using Motor = motor::ISpeedMotor
 
using Motors = QuadCollection< std::unique_ptr< Motor > >
 
- Protected Attributes inherited from tap::control::Subsystem
Driversdrivers
 

Detailed Description

This checks the power useage and appropriately downscales it

Constructor & Destructor Documentation

◆ PowerQuadDrive()

fang::chassis::PowerQuadDrive::PowerQuadDrive ( Drivers drivers,
Motors &&  motors,
std::unique_ptr< IPowerLimiterSystem powerLimiter 
)

◆ ~PowerQuadDrive()

virtual fang::chassis::PowerQuadDrive::~PowerQuadDrive ( )
inlinevirtual

Member Function Documentation

◆ initialize()

void fang::chassis::PowerQuadDrive::initialize ( )
overridevirtual

Called once when you add the Subsystem to the commandScheduler stored in the Drivers class.

Reimplemented from fang::chassis::BaseQuadDrive.

◆ refresh()

void fang::chassis::PowerQuadDrive::refresh ( )
overridevirtual

Called in the scheduler's run function assuming this command has been registered with the scheduler. This function should contain code that must be periodically updated and is generic to the subsystem (i.e. updating a control loop generic to this subsystem). This function should not contain command specific control code. When you create a subclass of Subsystem, you should overwrite this virtual function.

Must be virtual otherwise scheduler will refer to this function rather than looking in child for this function.

Reimplemented from fang::chassis::BaseQuadDrive.

◆ setTargetWheelSpeeds()

void fang::chassis::PowerQuadDrive::setTargetWheelSpeeds ( const QuadRPM wheelSpeeds)
overridevirtual

Reimplemented from fang::chassis::BaseQuadDrive.

◆ update()

void fang::chassis::PowerQuadDrive::update ( )
overridevirtual

Reimplemented from fang::chassis::BaseQuadDrive.


The documentation for this class was generated from the following files: