![]() |
ISSDK
1.8
IoT Sensing Software Development Kit
|
Implements streaming function for the status subsystem. See status.h. More...
Go to the source code of this file.
Macros | |
#define | MAXPACKETRATEHZ 40 |
#define | RATERESOLUTION 1000 |
Functions | |
void | sBufAppendItem (uint8_t *pDest, uint16_t *pIndex, uint8_t *pSource, uint16_t iBytesToCopy) |
Utility function used to place data in output buffer about to be transmitted via UART. More... | |
void | sBufAppendZeros (uint8_t *pDest, uint16_t *pIndex, uint16_t numZeros) |
void | readCommon (SV_ptr data, Quaternion *fq, int16_t *iPhi, int16_t *iThe, int16_t *iRho, int16_t iOmega[], uint16_t *isystick) |
uint16_t | throttle () |
(OVERSAMPLE_RATIO * MAXPACKETRATEHZ) / SENSORFS More... | |
void | CreateAndSendPackets (SensorFusionGlobals *sfg, uint8_t *sUARTOutputBuffer) |
Implements streaming function for the status subsystem. See status.h.
Definition in file output_stream.c.
#define MAXPACKETRATEHZ 40 |
Definition at line 16 of file output_stream.c.
Referenced by throttle().
#define RATERESOLUTION 1000 |
Definition at line 17 of file output_stream.c.
Referenced by throttle().
void CreateAndSendPackets | ( | SensorFusionGlobals * | sfg, |
uint8_t * | sUARTOutputBuffer | ||
) |
Called once per fusion cycle to stream information required by the NXP Sensor Fusion Toolbox. Packet protocols are defined in the NXP Sensor Fusion for Kinetis Product Development Kit User Guide.
Definition at line 122 of file output_stream.c.
References ControlSubsystem::AccelCalPacketOn, ControlSubsystem::AltPacketOn, ControlSubsystem::AngularVelocityPacketOn, CHX, CHY, CHZ, ControlSubsystem::DebugPacketOn, F_1DOF_P_BASIC, F_3DOF_B_BASIC, F_3DOF_G_BASIC, F_3DOF_Y_BASIC, F_6DOF_GB_BASIC, F_6DOF_GY_KALMAN, F_9DOF_GBY_KALMAN, F_USING_ACCEL, F_USING_GYRO, F_USING_MAG, MagCalibration::fB, MagCalibration::fFitErrorpc, MagCalibration::finvW, FUSION_HZ, MagCalibration::fV, MagSensor::iBc, MagBuffer::iBs, MagSensor::iCountsPeruT, SensorFusionGlobals::iFlags, MagBuffer::iMagBufferCount, MagBuffer::index, int32_t(), SensorFusionGlobals::Mag, SensorFusionGlobals::MagBuffer, MAGBUFFSIZEX, MAGBUFFSIZEY, SensorFusionGlobals::MagCal, MAX_ACCEL_CAL_ORIENTATIONS, SensorFusionGlobals::pControlSubsystem, Quaternion::q0, Quaternion::q1, Quaternion::q2, Quaternion::q3, Q3, Q3G, Q3M, Q6AG, Q6MA, Q9, ControlSubsystem::QuaternionPacketType, readCommon(), ControlSubsystem::RPCPacketOn, sBufAppendItem(), sBufAppendZeros(), THIS_BOARD, THIS_SHIELD, THISBUILD, throttle(), and ControlSubsystem::write.
Referenced by initializeControlPort().
void readCommon | ( | SV_ptr | data, |
Quaternion * | fq, | ||
int16_t * | iPhi, | ||
int16_t * | iThe, | ||
int16_t * | iRho, | ||
int16_t | iOmega[], | ||
uint16_t * | isystick | ||
) |
Definition at line 78 of file output_stream.c.
References CHX, CHY, CHZ, SV_COMMON::fOmega, SV_COMMON::fPhi, SV_COMMON::fq, SV_COMMON::fRho, SV_COMMON::fThe, and SV_COMMON::systick.
Referenced by CreateAndSendPackets().
void sBufAppendItem | ( | uint8_t * | pDest, |
uint16_t * | pIndex, | ||
uint8_t * | pSource, | ||
uint16_t | iBytesToCopy | ||
) |
Utility function used to place data in output buffer about to be transmitted via UART.
Definition at line 37 of file output_stream.c.
Referenced by appendZerosOrientBuf(), CreateAndSendPackets(), and sBufAppendZeros().
void sBufAppendZeros | ( | uint8_t * | pDest, |
uint16_t * | pIndex, | ||
uint16_t | numZeros | ||
) |
Definition at line 70 of file output_stream.c.
References sBufAppendItem().
Referenced by CreateAndSendPackets().
uint16_t throttle | ( | ) |
(OVERSAMPLE_RATIO * MAXPACKETRATEHZ) / SENSORFS
Definition at line 97 of file output_stream.c.
References FUSION_HZ, MAXPACKETRATEHZ, and RATERESOLUTION.
Referenced by CreateAndSendPackets().