code/WPILib/CInterfaces/CUltrasonic.cpp
/**
 * Internal routine to return the pointer to an Ultrasonic sensor
 * Return the pointer to a previously allocated Ultrasonic sensor object. Only the ping connection
 * is required since there can only be a single sensor connected to that channel
 *
 * @param pingSlot The slot for the digital module for the ping connection
 * @param pingChannel The channel on the digital module for the ping connection
 */
Internal routine to return the pointer to an Ultrasonic sensor
Return the pointer to a previously allocated Ultrasonic sensor object. Only the ping connection
is required since there can only be a single sensor connected to that channel

@param pingSlot The slot for the digital module for the ping connection
@param pingChannel The channel on the digital module for the ping connection
Internal routine to return the pointer to an Ultrasonic sensor Return the pointer to a previously allocated Ultrasonic sensor object . Only the ping connection is required since there can only be a single sensor connected to that channel @param pingSlot The slot for the digital module for the ping connection @param pingChannel The channel on the digital module for the ping connection
static Ultrasonic *USptr(UINT32 pingSlot, UINT32 pingChannel)
{
	if (!SensorBase::CheckDigitalModule(pingSlot) || !SensorBase::CheckDigitalChannel(pingChannel))
		return NULL;
	Ultrasonic *us = ultrasonics[DigitalModule::SlotToIndex(pingSlot)][pingChannel - 1];
	return us;
}
static Ultrasonic * USptr ( UINT32 pingSlot , UINT32 pingChannel ) { if ( ! SensorBase :: CheckDigitalModule ( pingSlot ) || ! SensorBase :: CheckDigitalChannel ( pingChannel ) ) return NULL ; Ultrasonic * us = ultrasonics [ DigitalModule :: SlotToIndex ( pingSlot ) ] [ pingChannel - 1 ] ; return us ; }
Internal routine to return the pointer to an Ultrasonic sensor
 Return the pointer to a previously allocated Ultrasonic sensor object.
Internal routine to return the pointer to an Ultrasonic sensor Return the pointer to a previously allocated Ultrasonic sensor object .