39 static const int nodeID = 0;
41 static const struct PIN {
42 const GPIO ONBOARD_LED = {13, &SIGNAL.ONBOARD_LED, 1, 1};
43 const GPIO ANALOG_TEST = {24,
nullptr, 0, 1};
44 const GPIO BUTTON_OFF = {2,
nullptr, 1, 0};
45 const GPIO WHEEL_1 = {21,
nullptr, 0, 0};
46 const GPIO WHEEL_0 = {20,
nullptr, 0, 0};
47 const VIRT CHARGE_SIGNAL = {128 + 0,
nullptr, 1, 1,
true};
48 const VIRT START_LED = {128 + 1,
nullptr, 1, 1,
true};
50 static const int virtCount = 2;
51 static const int gpioMax = 55;
53 static const struct MESSAGE {
54 const SIG *MSGBLK_FRONT_LED_SIGNALS[2] = {
56 &SIGNAL.OTHER_CTRL_SIG,
58 const SIG *MSGBLK_FRONT_DEBUG_SIGNALS[1] = {
59 &SIGNAL.DEBUG_INTEGER,
61 const SIG *MSGBLK_FRONT_WHEEL_SPEED_SIGNALS[2] = {
62 &SIGNAL.WHEEL_SPEED_FRONT_LEFT,
63 &SIGNAL.WHEEL_SPEED_FRONT_RIGHT,
65 const MSG MSGBLK_FRONT_LED = {8,
false, MSGBLK_FRONT_LED_SIGNALS, 2,
true};
66 const MSG MSGBLK_FRONT_DEBUG = {5,
true, MSGBLK_FRONT_DEBUG_SIGNALS, 1,
false};
67 const MSG MSGBLK_FRONT_WHEEL_SPEED = {2,
true, MSGBLK_FRONT_WHEEL_SPEED_SIGNALS, 2,
true};
70 static const struct SIGNAL {
71 const SIG ONBOARD_LED = {0x00000000FFFFFFFF, Messages + 0, &PIN.ONBOARD_LED, dt::int_t, 0, 0};
72 const SIG OTHER_CTRL_SIG = {0x0000FFFF00000000, Messages + 0,
nullptr, dt::short_t, 32, 0};
73 const SIG DEBUG_INTEGER = {0x00000000FFFFFFFF, Messages + 1,
nullptr, dt::int_t, 0, 0};
74 const SIG WHEEL_SPEED_FRONT_LEFT = {0x00000000FFFFFFFF, Messages + 2, &PIN.WHEEL_0, dt::int_t, 0, 0};
75 const SIG WHEEL_SPEED_FRONT_RIGHT = {0xFFFFFFFF00000000, Messages + 2, &PIN.WHEEL_1, dt::int_t, 32, 0};
77 const std::unordered_map<const uint16_t, const GPIO *> __pinMap = {
78 {13, &PIN.ONBOARD_LED},
79 {24, &PIN.ANALOG_TEST},
83 {128 + 0, &PIN.CHARGE_SIGNAL},
84 {128 + 1, &PIN.START_LED},
91 const GPIO ONBOARD_LED = {13,
nullptr, 1, 1};
92 const GPIO SERVO_OFF = {0,
nullptr, 1, 1};
93 const GPIO TSV_SIGNAL = {3,
nullptr, 1, 0};
94 const GPIO WHEEL_1 = {21,
nullptr, 0, 0};
95 const GPIO WHEEL_0 = {20,
nullptr, 0, 0};
96 const GPIO AIR2 = {4,
nullptr, 1, 1};
97 const VIRT STATE = {128 + 0,
nullptr, 0, 1,
true};
99 const SIG WHEEL_SPEED_BACK_LEFT = {0x00000000FFFFFFFF, Messages + 3, &
PIN.WHEEL_0, dt::int_t, 0, 1};
100 const SIG WHEEL_SPEED_BACK_RIGHT = {0xFFFFFFFF00000000, Messages + 3, &PIN.WHEEL_1, dt::int_t, 32, 1};
101 const SIG ONBOARD_LED = {0x00000000FFFFFFFF, Messages + 4, &PIN.ONBOARD_LED, dt::int_t, 0, 0};