Merge "fix for Artifact artf3431 : Solenoids initialize to random/arbitrary stat"

This commit is contained in:
Thomas Clark (WPI)
2014-08-29 09:38:51 -07:00
committed by Gerrit Code Review
2 changed files with 6 additions and 2 deletions

View File

@@ -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<sizeof(toSend);++i)
toSend[i] = 0;
}
};
class rxEvent_t{

View File

@@ -101,8 +101,7 @@ PCM::PCM(UINT8 deviceNumber): CtreCanNode(deviceNumber)
RegisterRx(STATUS_DEBUG | deviceNumber );
RegisterTx(CONTROL_1 | deviceNumber, kCANPeriod);
/* enable close loop */
CtreCanNode::txTask<PcmControl_t> toFill = GetTx<PcmControl_t>(CONTROL_1 | GetDeviceNumber());
toFill->closedLoopEnable = 1;
SetClosedLoopControl(1);
}
/* PCM D'tor
*/