WPILibC++  2019.2.1-24-g74f7ba0
 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 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
30 HAL_GyroHandle HAL_InitializeAnalogGyro(HAL_AnalogInputHandle handle,
31  int32_t* status);
32 
39 void HAL_SetupAnalogGyro(HAL_GyroHandle handle, int32_t* status);
40 
46 void HAL_FreeAnalogGyro(HAL_GyroHandle handle);
47 
59 void HAL_SetAnalogGyroParameters(HAL_GyroHandle handle,
60  double voltsPerDegreePerSecond, double offset,
61  int32_t center, int32_t* status);
62 
69 void HAL_SetAnalogGyroVoltsPerDegreePerSecond(HAL_GyroHandle handle,
70  double voltsPerDegreePerSecond,
71  int32_t* status);
72 
78 void HAL_ResetAnalogGyro(HAL_GyroHandle handle, int32_t* status);
79 
89 void HAL_CalibrateAnalogGyro(HAL_GyroHandle handle, int32_t* status);
90 
97 void HAL_SetAnalogGyroDeadband(HAL_GyroHandle handle, double volts,
98  int32_t* status);
99 
106 double HAL_GetAnalogGyroAngle(HAL_GyroHandle handle, int32_t* status);
107 
114 double HAL_GetAnalogGyroRate(HAL_GyroHandle handle, int32_t* status);
115 
124 double HAL_GetAnalogGyroOffset(HAL_GyroHandle handle, int32_t* status);
125 
134 int32_t HAL_GetAnalogGyroCenter(HAL_GyroHandle handle, int32_t* status);
135 #ifdef __cplusplus
136 } // extern "C"
137 #endif
138 
int32_t HAL_GetAnalogGyroCenter(HAL_GyroHandle handle, int32_t *status)
Gets the calibrated gyro center.
double HAL_GetAnalogGyroAngle(HAL_GyroHandle handle, int32_t *status)
Gets the gyro angle in degrees.
HAL_GyroHandle HAL_InitializeAnalogGyro(HAL_AnalogInputHandle handle, int32_t *status)
Initializes an analog gyro.
double HAL_GetAnalogGyroRate(HAL_GyroHandle handle, int32_t *status)
Gets the gyro rate in degrees/second.
void HAL_SetAnalogGyroVoltsPerDegreePerSecond(HAL_GyroHandle handle, double voltsPerDegreePerSecond, int32_t *status)
Sets the analog gyro volts per degrees per second scaling.
double HAL_GetAnalogGyroOffset(HAL_GyroHandle handle, int32_t *status)
Gets the calibrated gyro offset.
void HAL_FreeAnalogGyro(HAL_GyroHandle handle)
Frees an analog gyro.
void HAL_SetupAnalogGyro(HAL_GyroHandle handle, int32_t *status)
Sets up an analog gyro with the proper offsets and settings for the KOP analog gyro.
void HAL_SetAnalogGyroDeadband(HAL_GyroHandle handle, double volts, int32_t *status)
Sets the deadband of the analog gyro.
void HAL_CalibrateAnalogGyro(HAL_GyroHandle handle, int32_t *status)
Calibrates the analog gyro.
void HAL_SetAnalogGyroParameters(HAL_GyroHandle handle, double voltsPerDegreePerSecond, double offset, int32_t center, int32_t *status)
Sets the analog gyro parameters to the specified values.
void HAL_ResetAnalogGyro(HAL_GyroHandle handle, int32_t *status)
Resets the analog gyro value to 0.