I would just like to say that, we are experimenting with the dashboard that is already on the classmate.
We have to run the following code each loop of operator control.
Code:
float gyroValue;
Dashboard lowDashData = DriverStation.getInstance().getDashboardPackerLow();
lowDashData.addCluster();
{
lowDashData.addCluster();
{ //analog modules
lowDashData.addCluster();
{
for (int i = 1; i <= 6; i++) {
lowDashData.addFloat((float) AnalogModule.getInstance(1).getAverageValue(i));
}
gyroValue = AnalogModule.getInstance(1).getAverageValue(7);
if (gyroValue > 360)
gyroValue %= 360;
lowDashData.addFloat((float) gyroValue);
lowDashData.addFloat((float) AnalogModule.getInstance(1).getAverageValue(8));
}
lowDashData.finalizeCluster();
lowDashData.addCluster();
{
for (int i = 1; i <= 6; i++) {
lowDashData.addFloat((float) AnalogModule.getInstance(2).getAverageValue(i));
}
gyroValue = AnalogModule.getInstance(1).getAverageValue(7);
if (gyroValue > 360)
gyroValue %= 360;
lowDashData.addFloat((float) gyroValue);
lowDashData.addFloat((float) AnalogModule.getInstance(1).getAverageValue(8));
}
lowDashData.finalizeCluster();
}
lowDashData.finalizeCluster();
lowDashData.addCluster();
{ //digital modules
lowDashData.addCluster();
{
lowDashData.addCluster();
{
int module = 4;
lowDashData.addByte(DigitalModule.getInstance(module).getRelayForward());
lowDashData.addByte(DigitalModule.getInstance(module).getRelayForward());
lowDashData.addShort(DigitalModule.getInstance(module).getAllDIO());
lowDashData.addShort(DigitalModule.getInstance(module).getDIODirection());
lowDashData.addCluster();
{
for (int i = 1; i <= 10; i++) {
lowDashData.addByte((byte) DigitalModule.getInstance(module).getPWM(i));
}
}
lowDashData.finalizeCluster();
}
lowDashData.finalizeCluster();
}
lowDashData.finalizeCluster();
lowDashData.addCluster();
{
lowDashData.addCluster();
{
int module = 6;
lowDashData.addByte(DigitalModule.getInstance(module).getRelayForward());
lowDashData.addByte(DigitalModule.getInstance(module).getRelayReverse());
lowDashData.addShort(DigitalModule.getInstance(module).getAllDIO());
lowDashData.addShort(DigitalModule.getInstance(module).getDIODirection());
lowDashData.addCluster();
{
for (int i = 1; i <= 10; i++) {
lowDashData.addByte((byte) DigitalModule.getInstance(module).getPWM(i));
}
}
lowDashData.finalizeCluster();
}
lowDashData.finalizeCluster();
}
lowDashData.finalizeCluster();
}
lowDashData.finalizeCluster();
lowDashData.addByte(Solenoid.getAll());
}
lowDashData.finalizeCluster();
lowDashData.commit();
Best,