code/WPILib/MotorSafetyHelper.cpp
/**
 * The constructor for a MotorSafetyHelper object.
 * The helper object is constructed for every object that wants to implement the Motor
 * Safety protocol. The helper object has the code to actually do the timing and call the
 * motors Stop() method when the timeout expires. The motor object is expected to call the
 * Feed() method whenever the motors value is updated.
 * @param safeObject a pointer to the motor object implementing MotorSafety. This is used
 * to call the Stop() method on the motor.
 */
The constructor for a MotorSafetyHelper object.
The helper object is constructed for every object that wants to implement the Motor
Safety protocol. The helper object has the code to actually do the timing and call the
motors Stop() method when the timeout expires. The motor object is expected to call the
Feed() method whenever the motors value is updated.
@param safeObject a pointer to the motor object implementing MotorSafety. This is used
to call the Stop() method on the motor.
The constructor for a MotorSafetyHelper object . The helper object is constructed for every object that wants to implement the Motor Safety protocol . The helper object has the code to actually do the timing and call the motors Stop () method when the timeout expires . The motor object is expected to call the Feed () method whenever the motors value is updated . @param safeObject a pointer to the motor object implementing MotorSafety . This is used to call the Stop () method on the motor .
MotorSafetyHelper::MotorSafetyHelper(MotorSafety *safeObject)
{
	m_safeObject = safeObject;
	m_enabled = false;
	m_expiration = DEFAULT_SAFETY_EXPIRATION;
	m_stopTime = Timer::GetFPGATimestamp();
	m_nextHelper = m_headHelper;
	m_headHelper = this;
}
MotorSafetyHelper :: MotorSafetyHelper ( MotorSafety * safeObject ) { m_safeObject = safeObject ; m_enabled = false ; m_expiration = DEFAULT_SAFETY_EXPIRATION ; m_stopTime = Timer :: GetFPGATimestamp ( ) ; m_nextHelper = m_headHelper ; m_headHelper = this ; }
The constructor for a MotorSafetyHelper object.
The constructor for a MotorSafetyHelper object .