Merge "Added column controller."
diff --git a/frc971/wpilib/ADIS16448.cc b/frc971/wpilib/ADIS16448.cc
index ec219cc..d551667 100644
--- a/frc971/wpilib/ADIS16448.cc
+++ b/frc971/wpilib/ADIS16448.cc
@@ -127,6 +127,12 @@
}
void ADIS16448::operator()() {
+ // NI's SPI driver defaults to SCHED_OTHER. Find it's PID with ps, and change
+ // it to a RT priority of 33.
+ PCHECK(system(
+ "ps -ef | grep '\\[spi0\\]' | awk '{print $1}' | xargs chrt -f -p "
+ "33") == 0);
+
::aos::SetCurrentThreadName("IMU");
// Try to initialize repeatedly as long as we're supposed to be running.
@@ -135,6 +141,8 @@
}
LOG(INFO, "IMU initialized successfully\n");
+ ::aos::SetCurrentThreadRealtimePriority(33);
+
// Rounded to approximate the 204.8 Hz.
constexpr size_t kImuSendRate = 205;