code/WPILib/CANJaguar.cpp
/**
 * Check if the Jaguar's power has been cycled since this was last called.
 * 
 * This should return true the first time called after a Jaguar power up,
 * and false after that.
 * 
 * @return The Jaguar was power cycled since the last call to this function.
 */
Check if the Jaguar's power has been cycled since this was last called.

This should return true the first time called after a Jaguar power up,
and false after that.

@return The Jaguar was power cycled since the last call to this function.
Check if the Jaguar ' s power has been cycled since this was last called . This should return true the first time called after a Jaguar power up and false after that . @return The Jaguar was power cycled since the last call to this function .
bool CANJaguar::GetPowerCycled()
{
	UINT8 dataBuffer[8];
	UINT8 dataSize;
	getTransaction(LM_API_STATUS_POWER, dataBuffer, &dataSize);
	if (dataSize == sizeof(UINT8))
	{
		bool powerCycled = (*dataBuffer != 0);
		if (powerCycled)
		{
			dataBuffer[0] = 1;
			setTransaction(LM_API_STATUS_POWER, dataBuffer, sizeof(UINT8));
		}
		return powerCycled;
	}
	return 0;
}
bool CANJaguar :: GetPowerCycled ( ) { UINT8 dataBuffer [ 8 ] ; UINT8 dataSize ; getTransaction ( LM_API_STATUS_POWER , dataBuffer , & dataSize ) ; if ( dataSize == sizeof ( UINT8 ) ) { bool powerCycled = ( * dataBuffer != 0 ) ; if ( powerCycled ) { dataBuffer [ 0 ] = 1 ; setTransaction ( LM_API_STATUS_POWER , dataBuffer , sizeof ( UINT8 ) ) ; } return powerCycled ; } return 0 ; }
Check if the Jaguar's power has been cycled since this was last called.
Check if the Jaguar ' s power has been cycled since this was last called .
// Clear the power cycled bit now that we've accessed it