-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Specifications
We want to be able to dynamically adjust the chassis power consumption and the firing speed of our robots according to the limits set by the referee system.
Implementation
Taproot provides the data needed for this adjustment in the RefSerial class. The important type to consider for this issue is the Struct Rx::RobotData that contains the chassis and turrret data types.
The robot data is obtained by calling drivers->refSerial.getRobotData().
Chassis subsystem
- Check if the current power consumption level exceeds the chassis power consumption limit. If that's the case, the chassis speed needs to be lowered in order for the power to go below the consumption power limit. To do that, the values of the
xInputRamp,yInputRampandrInputRamptargets need to be lowered. - In the
refresh()method, first check for the chassis consumption power before updating the RPM setpoints.
Flywheel subsystem
- Check if the last bullet speed exceeds the power consumption limit. If that's the case,the current throttle value should be lowered in the
refresh()method.