code/WPILib/CInterfaces/CUltrasonic.cpp
/**
 * Free the resources associated with an ultrasonic sensor.
 * Deallocate the Ultrasonic object and free the associated resources.
 *
 * @param pingSlot The slot for the digital module for the ping connection
 * @param pingChannel The channel on the digital module for the ping connection
 * @param echoSlot The slot for the digital module for the echo connection
 * @param echoChannel The channel on the digital module for the echo connection
 */
Free the resources associated with an ultrasonic sensor.
Deallocate the Ultrasonic object and free the associated resources.

@param pingSlot The slot for the digital module for the ping connection
@param pingChannel The channel on the digital module for the ping connection
@param echoSlot The slot for the digital module for the echo connection
@param echoChannel The channel on the digital module for the echo connection
Free the resources associated with an ultrasonic sensor . Deallocate the Ultrasonic object and free the associated resources . @param pingSlot The slot for the digital module for the ping connection @param pingChannel The channel on the digital module for the ping connection @param echoSlot The slot for the digital module for the echo connection @param echoChannel The channel on the digital module for the echo connection
void DeleteUltrasonic(UINT32 pingSlot, UINT32 pingChannel, UINT32 echoSlot, UINT32 echoChannel)
{
	if (SensorBase::CheckDigitalModule(pingSlot) && SensorBase::CheckDigitalChannel(pingChannel))
	{
		delete ultrasonics[DigitalModule::SlotToIndex(pingSlot)][pingChannel - 1];
		ultrasonics[DigitalModule::SlotToIndex(pingSlot)][pingChannel - 1] = NULL;
	}
}
void DeleteUltrasonic ( UINT32 pingSlot , UINT32 pingChannel , UINT32 echoSlot , UINT32 echoChannel ) { if ( SensorBase :: CheckDigitalModule ( pingSlot ) && SensorBase :: CheckDigitalChannel ( pingChannel ) ) { delete ultrasonics [ DigitalModule :: SlotToIndex ( pingSlot ) ] [ pingChannel - 1 ] ; ultrasonics [ DigitalModule :: SlotToIndex ( pingSlot ) ] [ pingChannel - 1 ] = NULL ; } }
Free the resources associated with an ultrasonic sensor.
Free the resources associated with an ultrasonic sensor .