mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
Moves Gyros to the HAL (#131)
This commit is contained in:
committed by
Peter Johnson
parent
b036bf2e34
commit
0a983eeeb8
32
hal/include/HAL/AnalogGyro.h
Normal file
32
hal/include/HAL/AnalogGyro.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) FIRST 2016. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "HAL/Handles.h"
|
||||
|
||||
extern "C" {
|
||||
HalGyroHandle initializeAnalogGyro(HalAnalogInputHandle handle,
|
||||
int32_t* status);
|
||||
void setupAnalogGyro(HalGyroHandle handle, int32_t* status);
|
||||
void freeAnalogGyro(HalGyroHandle handle);
|
||||
void setAnalogGyroParameters(HalGyroHandle handle,
|
||||
float voltsPerDegreePerSecond, float offset,
|
||||
uint32_t center, int32_t* status);
|
||||
void setAnalogGyroVoltsPerDegreePerSecond(HalGyroHandle handle,
|
||||
float voltsPerDegreePerSecond,
|
||||
int32_t* status);
|
||||
void resetAnalogGyro(HalGyroHandle handle, int32_t* status);
|
||||
void calibrateAnalogGyro(HalGyroHandle handle, int32_t* status);
|
||||
void setAnalogGyroDeadband(HalGyroHandle handle, float volts, int32_t* status);
|
||||
float getAnalogGyroAngle(HalGyroHandle handle, int32_t* status);
|
||||
double getAnalogGyroRate(HalGyroHandle handle, int32_t* status);
|
||||
float getAnalogGyroOffset(HalGyroHandle handle, int32_t* status);
|
||||
uint32_t getAnalogGyroCenter(HalGyroHandle handle, int32_t* status);
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "Accelerometer.h"
|
||||
#include "AnalogAccumulator.h"
|
||||
#include "AnalogGyro.h"
|
||||
#include "AnalogInput.h"
|
||||
#include "AnalogOutput.h"
|
||||
#include "AnalogTrigger.h"
|
||||
|
||||
@@ -40,3 +40,5 @@ typedef HalHandle HalSolenoidHandle;
|
||||
typedef HalHandle HalFPGAEncoderHandle;
|
||||
|
||||
typedef HalHandle HalEncoderHandle;
|
||||
|
||||
typedef HalHandle HalGyroHandle;
|
||||
|
||||
Reference in New Issue
Block a user