Searched refs:Mag (Results 1 – 9 of 9) sorted by relevance
49 void ApplyMagHAL(struct MagSensor *Mag) in ApplyMagHAL() argument54 for (i = 0; i < Mag->iFIFOCount; i++) in ApplyMagHAL()58 int16 itmp16 = Mag->iBsFIFO[i][CHX]; in ApplyMagHAL()59 Mag->iBsFIFO[i][CHX] = -Mag->iBsFIFO[i][CHY]; in ApplyMagHAL()60 Mag->iBsFIFO[i][CHY] = -itmp16; in ApplyMagHAL()61 Mag->iBsFIFO[i][CHZ] = -Mag->iBsFIFO[i][CHZ]; in ApplyMagHAL()64 Mag->iBsFIFO[i][CHX] = -Mag->iBsFIFO[i][CHX]; in ApplyMagHAL()65 Mag->iBsFIFO[i][CHY] = -Mag->iBsFIFO[i][CHY]; in ApplyMagHAL()68 Mag->iBsFIFO[i][CHX] = -Mag->iBsFIFO[i][CHX]; in ApplyMagHAL()69 Mag->iBsFIFO[i][CHY] = -Mag->iBsFIFO[i][CHY]; in ApplyMagHAL()
88 sfg->Mag.iWhoAmI = reg; in MAG3110_Init()103 sfg->Mag.iCountsPeruT = MAG3110_COUNTSPERUT; in MAG3110_Init()104 …sfg->Mag.fCountsPeruT = (float)MAG3110_COUNTSPERUT; // IAR optimized this out without the #pragma … in MAG3110_Init()105 …sfg->Mag.fuTPerCount = 1.0F / MAG3110_COUNTSPERUT; // IAR optimized this out without the #pragma … in MAG3110_Init()108 …sfg->Mag.isEnabled = true; // IAR optimized this out without the #pragma before t… in MAG3110_Init()131 addToFifo((union FifoSensor*) &(sfg->Mag), MAG_FIFO_SIZE, sample); in MAG3110_Read()153 sfg->Mag.isEnabled = false; in MAG3110_Idle()
93 sfg->Mag.iWhoAmI = 0; in initSensorFusionGlobals()203 if (sfg->Mag.iFIFOExceeded > 0) { in processMagData()207 ApplyMagHAL(&(sfg->Mag)); // This function is board-dependent in processMagData()211 for (i = 0; i < sfg->Mag.iFIFOCount; i++) in processMagData()212 for (j = CHX; j <= CHZ; j++) iSum[j] += sfg->Mag.iBsFIFO[i][j]; in processMagData()213 if (sfg->Mag.iFIFOCount > 0) in processMagData()217 sfg->Mag.iBs[j] = (int16)(iSum[j] / (int32) sfg->Mag.iFIFOCount); in processMagData()218 sfg->Mag.fBs[j] = (float)sfg->Mag.iBs[j] * sfg->Mag.fuTPerCount; in processMagData()225 fInvertMagCal(&(sfg->Mag), &(sfg->MagCal)); in processMagData()227 iUpdateMagBuffer(&(sfg->MagBuffer), &(sfg->Mag), sfg->loopcounter); in processMagData()[all …]
144 sfg->Mag.iWhoAmI = reg; in FXOS8700_Init()145 sfg->Mag.iCountsPeruT = FXOS8700_COUNTSPERUT; in FXOS8700_Init()146 sfg->Mag.fCountsPeruT = (float) FXOS8700_COUNTSPERUT; in FXOS8700_Init()147 sfg->Mag.fuTPerCount = 1.0F / FXOS8700_COUNTSPERUT; in FXOS8700_Init()166 sfg->Mag.isEnabled = true; in FXOS8700_Init()241 addToFifo((union FifoSensor*) &(sfg->Mag), MAG_FIFO_SIZE, sample); in FXOS8700_ReadMagData()290 sfg->Mag.isEnabled = false; in FXOS8700_Idle()
255 struct MagSensor Mag; member489 struct MagSensor Mag; ///< magnetometer storage member598 …struct MagSensor *Mag ///< pointer to magnetometer logical sen…
250 scratch16 = (int16_t) (sfg->Mag.iBc[CHX] * 10) / (sfg->Mag.iCountsPeruT); in CreateAndSendPackets()252 scratch16 = (int16_t) ((sfg->Mag.iBc[CHY] * 10) / sfg->Mag.iCountsPeruT); in CreateAndSendPackets()254 scratch16 = (int16_t) ((sfg->Mag.iBc[CHZ] * 10) / sfg->Mag.iCountsPeruT); in CreateAndSendPackets()
327 scratch16 = (int16_t) (sfg->Mag.iBc[CHX] * 10) / (sfg->Mag.iCountsPeruT); in encodeOrientPacketStream()329 scratch16 = (int16_t) ((sfg->Mag.iBc[CHY] * 10) / sfg->Mag.iCountsPeruT); in encodeOrientPacketStream()331 scratch16 = (int16_t) ((sfg->Mag.iBc[CHZ] * 10) / sfg->Mag.iCountsPeruT); in encodeOrientPacketStream()
326 scratch16 = (int16_t) (sfg->Mag.iBc[CHX] * 10) / (sfg->Mag.iCountsPeruT); in encodeOrientPacketStream()328 scratch16 = (int16_t) ((sfg->Mag.iBc[CHY] * 10) / sfg->Mag.iCountsPeruT); in encodeOrientPacketStream()330 scratch16 = (int16_t) ((sfg->Mag.iBc[CHZ] * 10) / sfg->Mag.iCountsPeruT); in encodeOrientPacketStream()
325 scratch16 = (int16_t) (sfg->Mag.iBc[CHX] * 10) / (sfg->Mag.iCountsPeruT); in encodeOrientPacketStream()327 scratch16 = (int16_t) ((sfg->Mag.iBc[CHY] * 10) / sfg->Mag.iCountsPeruT); in encodeOrientPacketStream()329 scratch16 = (int16_t) ((sfg->Mag.iBc[CHZ] * 10) / sfg->Mag.iCountsPeruT); in encodeOrientPacketStream()