CTRE Phoenix C++ 5.33.1
PigeonIMU_CCI.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
2/*
3 * �Software License Agreement
4 *
5 *�Copyright (C) Cross The Road Electronics.� All rights
6 *�reserved.
7 *�
8 *�Cross The Road Electronics (CTRE) licenses to you the right to�
9 *�use, publish, and distribute copies of CRF (Cross The Road) firmware files (*.crf) and Software
10 * API Libraries ONLY when in use with Cross The Road Electronics hardware products.
11 *�
12 *�THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
13 *�WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
14 *�LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A
15 *�PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
16 *�CROSS THE ROAD ELECTRONICS BE LIABLE FOR ANY INCIDENTAL, SPECIAL,�
17 *�INDIRECT OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF
18 *�PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS
19 *�BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE
20 *�THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION, OR OTHER
21 *�SIMILAR COSTS, WHETHER ASSERTED ON THE BASIS OF CONTRACT, TORT
22 *�(INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR OTHERWISE
23 */
24
25 #pragma once
26
29#include <map>
30#include <cstddef>
31
32 static std::map<void *, bool> pigeonPresent;
33
34 extern "C"{
35 CCIEXPORT void *c_PigeonIMU_Create2(int talonDeviceID, const char *version);
36 CCIEXPORT void *c_PigeonIMU_Create1(int deviceNumber, const char *version, const char *canbus);
39 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetDescription(void *handle, char * toFill, int toFillByteSz, size_t * numBytesFilled);
40 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_ConfigSetParameter(void *handle, int param, double value, uint8_t subValue, int ordinal, int timeoutMs);
41 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_ConfigGetParameter(void *handle, int param, double *value, int ordinal, int timeoutMs);
42 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_ConfigGetParameter_6(void *handle, int32_t param, int32_t valueToSend, int32_t * valueRecieved, uint8_t * subValue, int32_t ordinal, int32_t timeoutMs);
43 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_ConfigSetCustomParam(void *handle, int newValue, int paramIndex, int timeoutMs);
44 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_ConfigGetCustomParam(void *handle, int *readValue, int paramIndex, int timoutMs);
46 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetYaw(void *handle, double angleDeg, int timeoutMs);
47 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_AddYaw(void *handle, double angleDeg, int timeoutMs);
49 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetFusedHeading(void *handle, double angleDeg, int timeoutMs);
50 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_AddFusedHeading(void *handle, double angleDeg, int timeoutMs);
52 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetAccumZAngle(void *handle, double angleDeg, int timeoutMs);
53 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetTemperatureCompensationDisable(void *handle, int bTempCompDisable, int timeoutMs);
54 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetCompassDeclination(void *handle, double angleDegOffset, int timeoutMs);
55 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetCompassAngle(void *handle, double angleDeg, int timeoutMs);
56 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_EnterCalibrationMode(void *handle, int calMode, int timeoutMs);
57 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetGeneralStatus(void *handle, int *state, int *currentMode, int *calibrationError, int *bCalIsBooting, double *tempC, int *upTimeSec, int *noMotionBiasCount, int *tempCompensationCount, int *lastError);
79 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetFusedHeading2(void *handle, int *bIsFusing, int *bIsValid, double *value, int *lastError);
89 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetStatusFramePeriod(void *handle, int frame, uint8_t periodMs, int timeoutMs);
90 CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetStatusFramePeriod(void *handle, int frame, int *periodMs, int timeoutMs) ;
92}
#define CCIEXPORT
Definition: CCI.h:10
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetCompassDeclination(void *handle, double angleDegOffset, int timeoutMs)
CCIEXPORT void c_PigeonIMU_DestroyAll()
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetLastError(void *handle, int value)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetGeneralStatus(void *handle, int *state, int *currentMode, int *calibrationError, int *bCalIsBooting, double *tempC, int *upTimeSec, int *noMotionBiasCount, int *tempCompensationCount, int *lastError)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetFusedHeading2(void *handle, int *bIsFusing, int *bIsValid, double *value, int *lastError)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetStatusFramePeriod(void *handle, int frame, int *periodMs, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetResetCount(void *handle, int *value)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_ClearStickyFaults(void *handle, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetCompassAngle(void *handle, double angleDeg, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_ConfigGetParameter_6(void *handle, int32_t param, int32_t valueToSend, int32_t *valueRecieved, uint8_t *subValue, int32_t ordinal, int32_t timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_ConfigFactoryDefault(void *handle, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetLastTimestamp(void *handle, double *timestamp)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetYawPitchRoll(void *handle, double ypr[3])
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetAccelerometerAngles(void *handle, double tiltAngles[3])
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetAbsoluteCompassHeading(void *handle, double *value)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_EnterCalibrationMode(void *handle, int calMode, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetRawGyro(void *handle, double xyz_dps[3])
static std::map< void *, bool > pigeonPresent
Definition: PigeonIMU_CCI.h:32
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_ConfigGetParameter(void *handle, int param, double *value, int ordinal, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetAccumGyro(void *handle, double xyz_deg[3])
CCIEXPORT void * c_PigeonIMU_Create2(int talonDeviceID, const char *version)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetYawPitchRoll2(void *handle, double ypr[3])
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetLastError(void *handle)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_HasResetOccurred(void *handle, bool *hasReset)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetCompassFieldStrength(void *handle, double *value)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetYawToCompass(void *handle, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetRawMagnetometer(void *handle, short rm_xyz[3])
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetStickyFaults(void *handle, int *param)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_ConfigSetParameter(void *handle, int param, double value, uint8_t subValue, int ordinal, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetFusedHeadingToCompass(void *handle, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetAccumZAngle(void *handle, double angleDeg, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetState(void *handle, int *state)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetTemp(void *handle, double *value)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_Destroy(void *handle)
CCIEXPORT void * c_PigeonIMU_Create1(int deviceNumber, const char *version, const char *canbus)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetRoll(void *handle, double *roll)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetDescription(void *handle, char *toFill, int toFillByteSz, size_t *numBytesFilled)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetYaw(void *handle, double angleDeg, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetYaw(void *handle, double *yaw)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_ConfigSetCustomParam(void *handle, int newValue, int paramIndex, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetFaults(void *handle, int *param)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetUpTime(void *handle, int *value)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetFusedHeading(void *handle, double angleDeg, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetStatusFramePeriod(void *handle, int frame, uint8_t periodMs, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetGravityVector(void *handle, double ypr[3])
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetCompassHeading(void *handle, double *value)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetFirmwareVersion(void *handle, int *firmwareVers)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_ConfigGetCustomParam(void *handle, int *readValue, int paramIndex, int timoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetTemperatureCompensationDisable(void *handle, int bTempCompDisable, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetBiasedMagnetometer(void *handle, short bm_xyz[3])
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_SetControlFramePeriod(void *handle, int frame, int periodMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetBiasedAccelerometer(void *handle, short ba_xyz[3])
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetFusedHeading1(void *handle, double *value)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetResetFlags(void *handle, int *value)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_AddFusedHeading(void *handle, double angleDeg, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_GetPitch(void *handle, double *pitch)
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_Get6dQuaternion(void *handle, double wxyz[4])
CCIEXPORT ctre::phoenix::ErrorCode c_PigeonIMU_AddYaw(void *handle, double angleDeg, int timeoutMs)
ErrorCode
Definition: ErrorCode.h:13