We can see our pdh on rev hardware client and can enable the switchable port on it. But when we try to enable it via java code like this:
public class Robot extends TimedRobot {
private Command m_autonomousCommand;
private final RobotContainer m_robotContainer;
private PowerDistribution pdh;
@Override
public void robotInit() {
pdh = new PowerDistribution(1, ModuleType.kRev);
pdh.setSwitchableChannel(true);
}
it just does not power the port. We can also get the voltage data from pdh via java code and can write it on SmartDashboard so we think we can access the phd via code. On our first try we wired cancoders to the switchable port but then we thought that the canbus was not completed because that switchable port was not open and cancoders were off. So on our second try we wired the radio to swtichable port and canbus is now completed but again port did not turn on.