WPILibC++  2018.4.1-20180729124724-1140-gcbb62fb
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
AnalogGyro.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
10 #include <stdint.h>
11 
12 #include "hal/Types.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
24 HAL_GyroHandle HAL_InitializeAnalogGyro(HAL_AnalogInputHandle handle,
25  int32_t* status);
26 
33 void HAL_SetupAnalogGyro(HAL_GyroHandle handle, int32_t* status);
34 
40 void HAL_FreeAnalogGyro(HAL_GyroHandle handle);
41 
53 void HAL_SetAnalogGyroParameters(HAL_GyroHandle handle,
54  double voltsPerDegreePerSecond, double offset,
55  int32_t center, int32_t* status);
56 
63 void HAL_SetAnalogGyroVoltsPerDegreePerSecond(HAL_GyroHandle handle,
64  double voltsPerDegreePerSecond,
65  int32_t* status);
66 
72 void HAL_ResetAnalogGyro(HAL_GyroHandle handle, int32_t* status);
73 
83 void HAL_CalibrateAnalogGyro(HAL_GyroHandle handle, int32_t* status);
84 
91 void HAL_SetAnalogGyroDeadband(HAL_GyroHandle handle, double volts,
92  int32_t* status);
93 
100 double HAL_GetAnalogGyroAngle(HAL_GyroHandle handle, int32_t* status);
101 
108 double HAL_GetAnalogGyroRate(HAL_GyroHandle handle, int32_t* status);
109 
118 double HAL_GetAnalogGyroOffset(HAL_GyroHandle handle, int32_t* status);
119 
128 int32_t HAL_GetAnalogGyroCenter(HAL_GyroHandle handle, int32_t* status);
129 #ifdef __cplusplus
130 } // extern "C"
131 #endif