blob: b68d9d47fd8cb210f385e68167f59fa25abb5379 [file] [log] [blame]
#ifndef SENSOR_DATA_H
#define SENSOR_DATA_H
#include "gps_oal.h"
typedef struct
{
U8 rawAcc[6];
U8 rawGyro[6];
U8 rawMag[6];
U8 rawBaro[3];
U8 rawTemp[2];
} snrRawData_t;
typedef struct
{
FLT phyAcc[3];
FLT phyGyro[3];
FLT phyMag[3];
FLT phyBaro;
FLT phyTemp;
FLT walkDis;
U32 stepCnt;
} snrPhysicalData_t;
typedef struct
{
U32 version;
U8 sensor;
U8 type;
FLT data[3];
FLT result[6];
U64 timestamp;
snrRawData_t rawData;
snrPhysicalData_t phyData;
} snrHubSensorParse_t;
typedef struct
{
U16 override;
U16 oldDataLen;
U16 newDataLen;
} snrFiFoDataHdrT;
extern U64 stepCntBase;
extern FLT walkDistBase;
extern U32 virtualSnrMask;
extern gpsMutexT sensorMaskContext;
extern gpsMutexT sensorLogContext;
extern void sensorHubInit(void);
extern void sensorHubStart(void);
extern void sensorHubStop(void);
extern void sensorHubReset(void);
extern void gpsSeSysInit(void);
extern U8 gpsSeLogControl(void);
extern void gpsSeSysDataFileInit(void);
extern void gpsSeSysDataFileOpen(void);
extern void gpsSeSysDataFileClose(void);
extern void sensorHubUpdateSnrType(U32 type);
extern void sesnorHubVirtualSnrInit(U8 type);
extern void sesnorHubVirtualSnrDeInit(U8 type);
extern void sensorHubDataParseFinish(void);
extern void sensorHubExtractDataPackInfo(U8* buf, U8** msg, U16 len, U16* msgSize);
extern S8 sensorHubParseDataPack(U8* msg, U16 len, U8* res);
extern S8 sensorHubDataReportScreen(U16* event, U8 type);
#endif