code can be found at https://github.com/FlamingoStorm/Robot2020ColorSensor. the title says it all I have a putnumber in my ColorWheel subsystem and it isn’t printing to the smart dashboard even when I enable the robot. Do I need to somehow call the stuff from the subsystem? all of this is to test a color sensor.
It looks like your ColorWheel subsystem is extending the new Command Based framework’s SubsystemBase class (from the new package name edu.wpi.first.wpilibj2.command, note the 2), while your other subsystems are extending the old Command Based framework Subsystem class (from edu.wpi.first.wpilibj.command). Specifics can be found via the WPILib Docs.
Troubleshooting steps:
Open up Shuffleboard (instead of Smartdashboard).
Click on the margin on the left to add more widgets. Find the Scheduler widget and drag it on to the tiles.
Watch what is happening to see what the scheduler is doing versus what you expect it to be doing.
Secondly, if you read the previously mentioned docs you’ll see that the new framework doesn’t use Scheduler.getInstance(),
It uses CommandScheduler.getInstance().
You can’t mix and match the old and new frameworks, as they operate very differently.
how should I go about fixing the new vs old command and subsystem thing?
You either need to change ColorWheel to use the old command framework, or update your subsystems/commands/Robot.java to use the new command framework.
is there a guide to update my other code to the new command framework?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.