Austin Schuh | 812d0d1 | 2021-11-04 20:16:48 -0700 | [diff] [blame^] | 1 | // Copyright (c) FIRST and other WPILib contributors. |
| 2 | // Open Source Software; you can modify and/or share it under the terms of |
| 3 | // the WPILib BSD license file in the root directory of this project. |
| 4 | |
| 5 | #pragma once |
| 6 | |
| 7 | #include <array> |
| 8 | #include <utility> |
| 9 | |
| 10 | namespace hlt { |
| 11 | |
| 12 | constexpr static std::array<std::pair<int, int>, 22> DIOCrossConnects{ |
| 13 | std::pair{20, 25}, |
| 14 | std::pair{19, 24}, |
| 15 | std::pair{17, 13}, |
| 16 | std::pair{16, 12}, |
| 17 | std::pair{15, 11}, |
| 18 | std::pair{14, 10}, |
| 19 | std::pair{26, 2}, |
| 20 | std::pair{27, 1}, |
| 21 | std::pair{28, 0}, |
| 22 | std::pair{29, 3}, |
| 23 | std::pair{30, 4}, |
| 24 | |
| 25 | // Opposite direction |
| 26 | std::pair{25, 20}, |
| 27 | std::pair{24, 19}, |
| 28 | std::pair{13, 17}, |
| 29 | std::pair{12, 16}, |
| 30 | std::pair{11, 15}, |
| 31 | std::pair{10, 14}, |
| 32 | std::pair{2, 26}, |
| 33 | std::pair{1, 27}, |
| 34 | std::pair{0, 28}, |
| 35 | std::pair{3, 29}, |
| 36 | std::pair{4, 30}, |
| 37 | }; |
| 38 | |
| 39 | // PWM on left, DIO on right |
| 40 | constexpr static std::array<std::pair<int, int>, 2> PWMCrossConnects{ |
| 41 | std::pair{0, 18}, |
| 42 | std::pair{16, 25}, |
| 43 | }; |
| 44 | |
| 45 | // FWD only, relay on left |
| 46 | constexpr static std::array<std::pair<int, int>, 2> RelayAnalogCrossConnects{ |
| 47 | std::pair{2, 0}, std::pair{3, 1}}; |
| 48 | |
| 49 | struct RelayCross { |
| 50 | int Relay; |
| 51 | int FwdDio; |
| 52 | int RevDio; |
| 53 | }; |
| 54 | |
| 55 | constexpr static std::array<RelayCross, 1> RelayCrossConnects{ |
| 56 | RelayCross{0, 23, 22}}; |
| 57 | |
| 58 | // input on left |
| 59 | constexpr static std::array<std::pair<int, int>, 2> AnalogCrossConnects{ |
| 60 | std::pair{2, 0}, std::pair{4, 1}}; |
| 61 | |
| 62 | } // namespace hlt |