From 17e7fc8f2089e4d5001bae3a32bc938e73cb2905 Mon Sep 17 00:00:00 2001 From: Omar Zrien Date: Sun, 24 Aug 2014 19:57:40 -0400 Subject: [PATCH] fix for Artifact artf3431 : Solenoids initialize to random/arbitrary stat Change-Id: I0bdcf073637a47a9e6864f6d561cc812a1d5b021 --- hal/lib/Athena/ctre/CtreCanNode.h | 5 +++++ hal/lib/Athena/ctre/PCM.cpp | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hal/lib/Athena/ctre/CtreCanNode.h b/hal/lib/Athena/ctre/CtreCanNode.h index bf5a4a5353..ead88b43e0 100644 --- a/hal/lib/Athena/ctre/CtreCanNode.h +++ b/hal/lib/Athena/ctre/CtreCanNode.h @@ -88,6 +88,11 @@ private: uint32_t arbId; uint8_t toSend[8]; uint32_t periodMs; + txJob_t() : arbId(0),periodMs(0) + { + for(int i=0;i toFill = GetTx(CONTROL_1 | GetDeviceNumber()); - toFill->closedLoopEnable = 1; + SetClosedLoopControl(1); } /* PCM D'tor */