From 57301a7f9cccc89df9df357222f5f2f6476534da Mon Sep 17 00:00:00 2001 From: Noah Andrews Date: Wed, 27 Oct 2021 01:36:47 -0500 Subject: [PATCH] [hal] REVPH: Start closed-loop compressor control on init (#3673) Similar to the PCM, we're going to make the PH not do anything with the compressor until the PH HAL object has been initialized. The mechanism we're going to use to signal to the PH that that has happened is to begin sending the state of the solenoids (which will all be set to off at this point). --- hal/src/main/native/athena/REVPH.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hal/src/main/native/athena/REVPH.cpp b/hal/src/main/native/athena/REVPH.cpp index 9932146cb5..155f92c1ff 100644 --- a/hal/src/main/native/athena/REVPH.cpp +++ b/hal/src/main/native/athena/REVPH.cpp @@ -216,7 +216,8 @@ HAL_REVPHHandle HAL_InitializeREVPH(int32_t module, hph->hcan = hcan; hph->controlPeriod = kDefaultControlPeriod; - // TODO any other things + // Start closed-loop compressor control by starting solenoid state updates + HAL_REV_SendSolenoidsState(hph.get(), status); return handle; }