Fix crashing due to config with the wrong number of ports

This commit is contained in:
2026-02-18 16:46:08 -05:00
parent 7b9aa3cd95
commit c66c7bf17c
2 changed files with 13 additions and 0 deletions

View File

@@ -16,6 +16,16 @@ inline std::unordered_map<int, int> MODULE_TO_NUM_CHANNELS_MAP {
{ModuleType_SERVO_2, 2},
{ModuleType_DISPLAY, 1},
{ModuleType_GRIPPER, 1},
{ModuleType_SPEAKER, 1},
{ModuleType_IMU, 1},
{ModuleType_DISTANCE_SENSOR, 1},
{ModuleType_SPLITTER_2, 4},
{ModuleType_SPLITTER_3, 3},
{ModuleType_SPLITTER_4, 3},
{ModuleType_SPLITTER_5, 3},
{ModuleType_SPLITTER_6, 3},
{ModuleType_SPLITTER_7, 3},
{ModuleType_SPLITTER_8, 3},
};
#define PC_ADDR 0