mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Switches HAL to fixed length signed integers, and adds our own HAL_Bool Type (#155)
* Switches HAL to fixed length signed integers, and adds our own HAL_Bool type * Replaces HAL Floats with Doubles Doubles are just as fast as floats with optimizations turned on, so switches to all doubles. All made doubles for consistency. * Prepends HAL/ to HAL include files. Also fixes some range errors
This commit is contained in:
committed by
Peter Johnson
parent
4a98e68815
commit
b51e85ae26
@@ -10,7 +10,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "HAL/AnalogTrigger.h"
|
||||
#include "HAL/Handles.h"
|
||||
#include "HAL/Types.h"
|
||||
|
||||
extern "C" {
|
||||
enum HAL_EncoderIndexingType {
|
||||
@@ -28,7 +28,7 @@ enum HAL_EncoderEncodingType {
|
||||
HAL_EncoderHandle HAL_InitializeEncoder(
|
||||
HAL_Handle digitalSourceHandleA, HAL_AnalogTriggerType analogTriggerTypeA,
|
||||
HAL_Handle digitalSourceHandleB, HAL_AnalogTriggerType analogTriggerTypeB,
|
||||
bool reverseDirection, HAL_EncoderEncodingType encodingType,
|
||||
HAL_Bool reverseDirection, HAL_EncoderEncodingType encodingType,
|
||||
int32_t* status);
|
||||
void HAL_FreeEncoder(HAL_EncoderHandle encoder_handle, int32_t* status);
|
||||
int32_t HAL_GetEncoder(HAL_EncoderHandle encoder_handle, int32_t* status);
|
||||
@@ -36,13 +36,13 @@ int32_t HAL_GetEncoderRaw(HAL_EncoderHandle encoder_handle, int32_t* status);
|
||||
int32_t HAL_GetEncoderEncodingScale(HAL_EncoderHandle encoder_handle,
|
||||
int32_t* status);
|
||||
void HAL_ResetEncoder(HAL_EncoderHandle encoder_handle, int32_t* status);
|
||||
int32_t HAL_GetEncoderPeriod(HAL_EncoderHandle encoder_handle, int32_t* status);
|
||||
double HAL_GetEncoderPeriod(HAL_EncoderHandle encoder_handle, int32_t* status);
|
||||
void HAL_SetEncoderMaxPeriod(HAL_EncoderHandle encoder_handle, double maxPeriod,
|
||||
int32_t* status);
|
||||
uint8_t HAL_GetEncoderStopped(HAL_EncoderHandle encoder_handle,
|
||||
int32_t* status);
|
||||
uint8_t HAL_GetEncoderDirection(HAL_EncoderHandle encoder_handle,
|
||||
int32_t* status);
|
||||
HAL_Bool HAL_GetEncoderStopped(HAL_EncoderHandle encoder_handle,
|
||||
int32_t* status);
|
||||
HAL_Bool HAL_GetEncoderDirection(HAL_EncoderHandle encoder_handle,
|
||||
int32_t* status);
|
||||
double HAL_GetEncoderDistance(HAL_EncoderHandle encoder_handle,
|
||||
int32_t* status);
|
||||
double HAL_GetEncoderRate(HAL_EncoderHandle encoder_handle, int32_t* status);
|
||||
@@ -51,7 +51,7 @@ void HAL_SetEncoderMinRate(HAL_EncoderHandle encoder_handle, double minRate,
|
||||
void HAL_SetEncoderDistancePerPulse(HAL_EncoderHandle encoder_handle,
|
||||
double distancePerPulse, int32_t* status);
|
||||
void HAL_SetEncoderReverseDirection(HAL_EncoderHandle encoder_handle,
|
||||
uint8_t reverseDirection, int32_t* status);
|
||||
HAL_Bool reverseDirection, int32_t* status);
|
||||
void HAL_SetEncoderSamplesToAverage(HAL_EncoderHandle encoder_handle,
|
||||
int32_t samplesToAverage, int32_t* status);
|
||||
int32_t HAL_GetEncoderSamplesToAverage(HAL_EncoderHandle encoder_handle,
|
||||
|
||||
Reference in New Issue
Block a user