Reprioritize CTRE's TX thread priority to reduce load
Every packet being sent was triggering 2 context switches as it woke the
thread up. This was increasing load for little latency improvement.
Wait until they are all queued up by matching the thread priorities.
Change-Id: I614ee7f770d7f4f53b5e9d9fa78dfe6952b874c3
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2024/wpilib_interface.cc b/y2024/wpilib_interface.cc
index c478419..b67b07e 100644
--- a/y2024/wpilib_interface.cc
+++ b/y2024/wpilib_interface.cc
@@ -529,7 +529,7 @@
ctre::phoenix::platform::can::CANComm_SetRxSchedPriority(
constants::Values::kDrivetrainRxPriority, true, "Drivetrain Bus");
ctre::phoenix::platform::can::CANComm_SetTxSchedPriority(
- constants::Values::kDrivetrainTxPriority, true, "Drivetrain Bus");
+ constants::Values::kDrivetrainWriterPriority, true, "Drivetrain Bus");
::aos::ShmEventLoop can_sensor_reader_event_loop(&config.message());
can_sensor_reader_event_loop.set_name("CANSensorReader");