WPILib 2012
WPILibRoboticsLibraryforFRC
CInterfaces/CUltrasonic.h
00001 /*----------------------------------------------------------------------------*/
00002 /* Copyright (c) FIRST 2008. All Rights Reserved.                                                         */
00003 /* Open Source Software - may be modified and shared by FRC teams. The code   */
00004 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib.  */
00005 /*----------------------------------------------------------------------------*/
00006 #ifndef C_ULTRASONIC_H
00007 #define C_ULTRASONIC_H
00008 
00009 #include "Ultrasonic.h"
00010 
00011 void InitUltrasonic(UINT32 pingChannel, UINT32 echoChannel);
00012 void InitUltrasonic(UINT8 pingModuleNumber, UINT32 pingChannel, UINT8 echoModuleNumber, UINT32 echoChannel);
00013 double GetUltrasonicInches(UINT32 pingChannel, UINT32 echoChannel);
00014 double GetUltrasonicInches(UINT8 pingModuleNumber, UINT32 pingChannel, UINT8 echoModuleNumber, UINT32 echoChannel);
00015 double GetUltrasonicMM(UINT32 pingChannel, UINT32 echoChannel);
00016 double GetUltrasonicMM(UINT8 pingModuleNumber, UINT32 pingChannel, UINT8 echoModuleNumber, UINT32 echoChannel);
00017 void DeleteUltrasonic(UINT32 pingChannel, UINT32 echoChannel);
00018 void DeleteUltrasonic(UINT8 pingModuleNumber, UINT32 pingChannel, UINT8 echoModuleNumber, UINT32 echoChannel);
00019 
00020 typedef void *UltrasonicObject;
00021 
00022 UltrasonicObject CreateUltrasonic(UINT32 pingChannel, UINT32 echoChannel);
00023 UltrasonicObject CreateUltrasonic(UINT8 pingModuleNumber, UINT32 pingChannel, UINT8 echoModuleNumber, UINT32 echoChannel);
00024 double GetUltrasonicInches(UltrasonicObject o);
00025 double GetUltrasonicMM(UltrasonicObject o);
00026 void DeleteUltrasonic(UltrasonicObject o);
00027 
00028 #endif
 All Classes Functions Variables