Skip to content

Commit

Permalink
fix portmapping blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
JayAgra committed Aug 14, 2023
1 parent 9199816 commit ffa0ccf
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 18 deletions.
6 changes: 6 additions & 0 deletions .github/linters/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@
<property name="optional" value="true"/>
</module>

<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE.OFF\: ([\w\|]+)"/>
<property name="onCommentFormat" value="CHECKSTYLE.ON\: ([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>

</module>

</module>
47 changes: 29 additions & 18 deletions src/main/java/com/team766/hal/simulator/VrConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,24 @@ private static class CANPortMapping {
);
private static final List<PortMapping> RELAY_CHANNELS = Arrays.asList();

private static final List<CANPortMapping> CAN_MOTOR_CHANNELS =
Arrays.asList(new CANPortMapping(6, 10, 10), // Left motor
new CANPortMapping(4, 11, 11), // Right motor
new CANPortMapping(10, 12, 13), // Intake
new CANPortMapping(12, 14, 0), // Aux/center motor
new CANPortMapping(14, 16, 0), // Aux2 motor

new CANPortMapping(84, 84, 84), // FLD motor
new CANPortMapping(85, 85, 85), // BLD motor
new CANPortMapping(86, 86, 86), // FRD motor
new CANPortMapping(87, 87, 87), // BRD motor
new CANPortMapping(88, 88, 88), // FLS motor
new CANPortMapping(89, 89, 89), // BLS motor
new CANPortMapping(90, 90, 90), // FRS motor
new CANPortMapping(91, 91, 91) // BRS motor
);
//CHECKSTYLE:OFF
private static final List<CANPortMapping> CAN_MOTOR_CHANNELS = Arrays.asList(
new CANPortMapping(6, 10, 10), // Left motor
new CANPortMapping(4, 11, 11), // Right motor
new CANPortMapping(10, 12, 13), // Intake
new CANPortMapping(12, 14, 0), // Aux/center motor
new CANPortMapping(14, 16, 0), // Aux2 motor

new CANPortMapping(84, 84, 84), // FLD motor
new CANPortMapping(85, 85, 85), // BLD motor
new CANPortMapping(86, 86, 86), // FRD motor
new CANPortMapping(87, 87, 87), // BRD motor
new CANPortMapping(88, 88, 88), // FLS motor
new CANPortMapping(89, 89, 89), // BLS motor
new CANPortMapping(90, 90, 90), // FRS motor
new CANPortMapping(91, 91, 91) // BRS motor
);
//CHECKSTYLE:ON

/// Feedback indexes

Expand All @@ -93,22 +95,31 @@ private static class CANPortMapping {
private static final int BEACON_SENSOR_START = 120;
private static final int BEACON_SENSOR_STRIDE = 6; // (x, y, z, yaw, pitch, roll)

private static final List<PortMapping> ENCODER_CHANNELS = Arrays.asList(new PortMapping(10, 0), // Left
//CHECKSTYLE:OFF
private static final List<PortMapping> ENCODER_CHANNELS = Arrays.asList(
new PortMapping(10, 0), // Left
// encoder
new PortMapping(11, 2), // Right encoder
new PortMapping(13, 4) // Mechanism encoder
);
//CHECKSTYLE:ON

private static final int GYRO_CHANNEL = 15;
private static final int GYRO_RATE_CHANNEL = 16;
private static final int GYRO_PITCH_CHANNEL = 80;
private static final int GYRO_ROLL_CHANNEL = 81;
private static final List<PortMapping> DIGITAL_CHANNELS = Arrays.asList(new PortMapping(13, 0), // Intake

//CHECKSTYLE:OFF
private static final List<PortMapping> DIGITAL_CHANNELS = Arrays.asList(
new PortMapping(13, 0), // Intake
// state
new PortMapping(14, 1), // Ball presence
new PortMapping(17, 4), // Line Sensor 1
new PortMapping(18, 5), // Line Sensor 2
new PortMapping(19, 6) // Line Sensor 3
);
//CHECKSTYLE:ON

private static final List<PortMapping> ANALOG_CHANNELS = Arrays.asList();

private static final int NUM_JOYSTICK = 4;
Expand Down

0 comments on commit ffa0ccf

Please sign in to comment.