| | |
| | | typedef struct |
| | | { |
| | | E_GPSRecvState m_eState; |
| | | HIDO_CHAR m_acRecvBuf[128]; |
| | | HIDO_CHAR m_acRecvBuf[256]; |
| | | HIDO_UINT32 m_u32RecvLen; |
| | | } ST_GPSRecv; |
| | | |
| | |
| | | static HIDO_BOOL l_bIsPowerOn = HIDO_FALSE; |
| | | static ST_GPSRecv l_stGPSRecv; |
| | | static FN_GPSEventCallback l_fnGPSEventCallback; |
| | | |
| | | static HIDO_UINT8 l_u8PosState = 0; |
| | | static HIDO_UINT8 l_u8GPS_HZ = 0; |
| | | static HIDO_BOOL l_bGPSConfig = HIDO_FALSE; |
| | | static HIDO_BOOL l_bATLocationConfig = HIDO_FALSE; |
| | | static HIDO_CHAR l_acConfigGGA[128]; |
| | | static HIDO_CHAR l_acCmdBuff[256]; |
| | | static HIDO_UINT32 l_u32QXTick = 0; |
| | | HIDO_UINT32 getRTK_Tick = 0; |
| | | |
| | | static HIDO_UINT32 l_u32SetupStep = 0; |
| | | static HIDO_UINT32 l_u32SetupTimerID = 0; |
| | | |
| | | /* GPS命令 */ |
| | | static HIDO_UINT8 l_au8CmdSave[] = { 0xB5, 0x62, 0x06, 0x09, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x31, 0xBF }; |
| | | static HIDO_UINT8 l_au8CmdRate1Hz[] = { 0xB5, 0x62, 0x06, 0x08, 0x06, 0x00, 0xE8, 0x03, 0x01, 0x00, 0x01, 0x00, 0x01, 0x39 }; |
| | | static HIDO_UINT8 l_au8CmdRate2Hz[] = { 0xB5, 0x62, 0x06, 0x08, 0x06, 0x00, 0xF4, 0x01, 0x01, 0x00, 0x01, 0x00, 0x0B, 0x77 }; |
| | | static HIDO_UINT8 l_au8CmdRate5Hz[] = { 0xB5, 0x62, 0x06, 0x08, 0x06, 0x00, 0xC8, 0x00, 0x01, 0x00, 0x01, 0x00, 0xDE, 0x6A }; |
| | | static HIDO_UINT8 l_au8CmdRate10Hz[] = { 0xB5, 0x62, 0x06, 0x08, 0x06, 0x00, 0x64, 0x00, 0x01, 0x00, 0x01, 0x00, 0x7A, 0x12 }; |
| | | |
| | | /******************************************************************************* |
| | | * Function Name : GPS_DataCheck |
| | |
| | | |
| | | return HIDO_OK; |
| | | } |
| | | /******************************************************************************* |
| | | * Function Name : GPS_ParseTime |
| | | * Description : |
| | | * Input : None |
| | | * Output : None |
| | | * Return : HIDO_OK 成功, HIDO_ERR 失败 |
| | | * Author : www.hido-studio.com |
| | | * Modified Date: : 2022年5月2日 |
| | | *******************************************************************************/ |
| | | static HIDO_INT32 GPS_ParseTime(HIDO_DataStruct *_pstTimeData, ST_GPS *_pstGPS) |
| | | { |
| | | HIDO_UINT32 u32Len = _pstTimeData->m_u32Len; |
| | | HIDO_CHAR *pcStart = (HIDO_CHAR *) _pstTimeData->m_pData; |
| | | HIDO_CHAR *pcDot = NULL; |
| | | |
| | | pcDot = HIDO_UtilStrnchr(pcStart, '.', u32Len); |
| | | if (NULL == pcDot) |
| | | { |
| | | return HIDO_ERR; |
| | | } |
| | | |
| | | if ((pcDot - pcStart) != 6) |
| | | { |
| | | return HIDO_ERR; |
| | | } |
| | | |
| | | _pstGPS->m_u8Hour = HIDO_UtilStrBufToInt(pcStart, 2); |
| | | _pstGPS->m_u8Min = HIDO_UtilStrBufToInt(pcStart + 2, 2); |
| | | _pstGPS->m_u8Sec = HIDO_UtilStrBufToInt(pcStart + 4, 2); |
| | | |
| | | return HIDO_OK; |
| | | } |
| | | |
| | | /******************************************************************************* |
| | | * Function Name : GPS_ParseLat |
| | | * Description : |
| | | * Input : None |
| | | * Output : None |
| | | * Return : HIDO_OK 成功, HIDO_ERR 失败 |
| | | * Author : www.hido-studio.com |
| | | * Modified Date: : 2022年5月2日 |
| | | *******************************************************************************/ |
| | | static HIDO_INT32 GPS_ParseLat(HIDO_DataStruct *_pstLatData, ST_GPS *_pstGPS) |
| | | { |
| | | HIDO_UINT32 u32Len = _pstLatData->m_u32Len; |
| | | HIDO_CHAR *pcStart = (HIDO_CHAR *) _pstLatData->m_pData; |
| | | HIDO_CHAR *pcDot = NULL; |
| | | HIDO_UINT32 u32TempLen = 0; |
| | | HIDO_DOUBLE dd; |
| | | HIDO_DOUBLE mmmm; |
| | | HIDO_DOUBLE mm; |
| | | |
| | | if (u32Len < 9) |
| | | { |
| | | return HIDO_ERR; |
| | | } |
| | | |
| | | pcDot = HIDO_UtilStrnchr(pcStart, '.', u32Len); |
| | | if (NULL == pcDot || (pcDot - pcStart) != 4) |
| | | { |
| | | return HIDO_ERR; |
| | | } |
| | | |
| | | dd = HIDO_UtilStrBufToInt(pcStart, 2); |
| | | mm = HIDO_UtilStrBufToInt(pcStart + 2, 2); |
| | | u32TempLen = u32Len - (pcDot + 1 - pcStart); |
| | | mmmm = HIDO_UtilStrBufToInt(pcDot + 1, u32TempLen); |
| | | while(u32TempLen != 0) |
| | | { |
| | | mmmm /= 10.0; |
| | | u32TempLen--; |
| | | } |
| | | |
| | | mm = mm + mmmm; |
| | | _pstGPS->m_dLat = dd + (mm / 60.0); |
| | | |
| | | return HIDO_OK; |
| | | } |
| | | |
| | | /******************************************************************************* |
| | | * Function Name : GPS_ParseLon |
| | | * Description : |
| | | * Input : None |
| | | * Output : None |
| | | * Return : HIDO_OK 成功, HIDO_ERR 失败 |
| | | * Author : www.hido-studio.com |
| | | * Modified Date: : 2022年5月2日 |
| | | *******************************************************************************/ |
| | | static HIDO_INT32 GPS_ParseLon(HIDO_DataStruct *_pstLonData, ST_GPS *_pstGPS) |
| | | { |
| | | HIDO_UINT32 u32Len = _pstLonData->m_u32Len; |
| | | HIDO_CHAR *pcStart = (HIDO_CHAR *) _pstLonData->m_pData; |
| | | HIDO_CHAR *pcDot = NULL; |
| | | HIDO_UINT32 u32TempLen = 0; |
| | | HIDO_DOUBLE ddd; |
| | | HIDO_DOUBLE mmmm; |
| | | HIDO_DOUBLE mm; |
| | | |
| | | if (u32Len < 10) |
| | | { |
| | | return HIDO_ERR; |
| | | } |
| | | |
| | | pcDot = HIDO_UtilStrnchr(pcStart, '.', u32Len); |
| | | if (NULL == pcDot || (pcDot - pcStart) != 5) |
| | | { |
| | | return HIDO_ERR; |
| | | } |
| | | |
| | | ddd = HIDO_UtilStrBufToInt(pcStart, 3); |
| | | mm = HIDO_UtilStrBufToInt(pcStart + 3, 2); |
| | | u32TempLen = u32Len - (pcDot + 1 - pcStart); |
| | | mmmm = HIDO_UtilStrBufToInt(pcDot + 1, u32TempLen); |
| | | while(u32TempLen != 0) |
| | | { |
| | | mmmm /= 10.0; |
| | | u32TempLen--; |
| | | } |
| | | |
| | | mm = mm + mmmm; |
| | | _pstGPS->m_dLon = ddd + (mm / 60.0); |
| | | |
| | | return HIDO_OK; |
| | | } |
| | | |
| | | #if 0 |
| | | /******************************************************************************* |
| | | * Function Name : GPS_ParseDir |
| | | * Description : |
| | | * Input : None |
| | | * Output : None |
| | | * Return : HIDO_OK 成功, HIDO_ERR 失败 |
| | | * Author : www.hido-studio.com |
| | | * Modified Date: : 2022年5月2日 |
| | | *******************************************************************************/ |
| | | static HIDO_INT32 GPS_ParseDir(HIDO_DataStruct *_pstDirData, ST_GPS *_pstGPS) |
| | | { |
| | | HIDO_UINT32 u32Len = _pstDirData->m_u32Len; |
| | | HIDO_CHAR *pcStart = (HIDO_CHAR *) _pstDirData->m_pData; |
| | | HIDO_CHAR *pcDot = NULL; |
| | | |
| | | if (u32Len >= 1) |
| | | { |
| | | pcDot = HIDO_UtilStrnchr(pcStart, '.', u32Len); |
| | | if (pcDot) |
| | | { |
| | | _pstGPS->m_u16Dir = HIDO_UtilStrBufToInt(pcStart, pcDot - pcStart); |
| | | } |
| | | else |
| | | { |
| | | _pstGPS->m_u16Dir = HIDO_UtilStrBufToInt(pcStart, u32Len); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | _pstGPS->m_u16Dir = 0; |
| | | } |
| | | |
| | | return HIDO_OK; |
| | | } |
| | | #endif |
| | | |
| | | /******************************************************************************* |
| | | * Function Name : GPS_ParseLatSign |
| | | * Description : |
| | | * Input : None |
| | | * Output : None |
| | | * Return : HIDO_OK 成功, HIDO_ERR 失败 |
| | | * Author : www.hido-studio.com |
| | | * Modified Date: : 2022年5月2日 |
| | | *******************************************************************************/ |
| | | static HIDO_INT32 GPS_ParseLatSign(HIDO_DataStruct *_pstLatSignData, ST_GPS *_pstGPS) |
| | | { |
| | | HIDO_UINT32 u32Len = _pstLatSignData->m_u32Len; |
| | | HIDO_CHAR *pcStart = (HIDO_CHAR *) _pstLatSignData->m_pData; |
| | | |
| | | if (u32Len > 1) |
| | | { |
| | | return HIDO_ERR; |
| | | } |
| | | |
| | | if (0 == u32Len) |
| | | { |
| | | return HIDO_OK; |
| | | } |
| | | else |
| | | { |
| | | if (pcStart[0] == 'S') |
| | | { |
| | | _pstGPS->m_dLat = -_pstGPS->m_dLat; |
| | | } |
| | | } |
| | | |
| | | return HIDO_OK; |
| | | } |
| | | |
| | | /******************************************************************************* |
| | | * Function Name : GPS_ParseLonSign |
| | | * Description : |
| | | * Input : None |
| | | * Output : None |
| | | * Return : HIDO_OK 成功, HIDO_ERR 失败 |
| | | * Author : www.hido-studio.com |
| | | * Modified Date: : 2022年5月2日 |
| | | *******************************************************************************/ |
| | | static HIDO_INT32 GPS_ParseLonSign(HIDO_DataStruct *_pstLonSignData, ST_GPS *_pstGPS) |
| | | { |
| | | HIDO_UINT32 u32Len = _pstLonSignData->m_u32Len; |
| | | HIDO_CHAR *pcStart = (HIDO_CHAR *) _pstLonSignData->m_pData; |
| | | |
| | | if (u32Len > 1) |
| | | { |
| | | return HIDO_ERR; |
| | | } |
| | | |
| | | if (0 == u32Len) |
| | | { |
| | | return HIDO_OK; |
| | | } |
| | | else |
| | | { |
| | | if (pcStart[0] == 'W') |
| | | { |
| | | _pstGPS->m_dLon = -_pstGPS->m_dLon; |
| | | } |
| | | } |
| | | |
| | | return HIDO_OK; |
| | | } |
| | | |
| | | //#if 0 |
| | | ///******************************************************************************* |
| | | // * Function Name : GPS_ParseSpeed |
| | | // * Description : |
| | | // * Input : None |
| | | // * Output : None |
| | | // * Return : HIDO_OK 成功, HIDO_ERR 失败 |
| | | // * Author : www.hido-studio.com |
| | | // * Modified Date: : 2022年5月2日 |
| | | // *******************************************************************************/ |
| | | //static HIDO_INT32 GPS_ParseSpeed(HIDO_DataStruct *_pstSpeedData, ST_GPS *_pstGPS) |
| | | //{ |
| | | // HIDO_UINT32 u32Len = _pstSpeedData->m_u32Len; |
| | | // HIDO_CHAR *pcStart = (HIDO_CHAR *) _pstSpeedData->m_pData; |
| | | // HIDO_CHAR acSpeed[10]; |
| | | |
| | | // if (u32Len >= 10) |
| | | // { |
| | | // return HIDO_ERR; |
| | | // } |
| | | |
| | | // if (u32Len >= 1) |
| | | // { |
| | | // memcpy(acSpeed, pcStart, u32Len); |
| | | // acSpeed[u32Len] = 0; |
| | | // _pstGPS->m_u16Speed = atof(acSpeed) * 1.852; |
| | | // } |
| | | // else |
| | | // { |
| | | // _pstGPS->m_u16Speed = 0; |
| | | // } |
| | | |
| | | // return HIDO_OK; |
| | | //} |
| | | //#endif |
| | | |
| | | /******************************************************************************* |
| | | * Function Name : GPS_ParseSpeed |
| | | * Description : |
| | | * Input : None |
| | | * Output : None |
| | | * Return : HIDO_OK 成功, HIDO_ERR 失败 |
| | | * Author : www.hido-studio.com |
| | | * Modified Date: : 2022年5月2日 |
| | | *******************************************************************************/ |
| | | static HIDO_INT32 GPS_ParseAlt(HIDO_DataStruct *_pstSpeedData, ST_GPS *_pstGPS) |
| | | { |
| | | HIDO_UINT32 u32Len = _pstSpeedData->m_u32Len; |
| | | HIDO_CHAR *pcStart = (HIDO_CHAR *) _pstSpeedData->m_pData; |
| | | HIDO_CHAR acAlt[10]; |
| | | |
| | | if (u32Len >= 10) |
| | | { |
| | | return HIDO_ERR; |
| | | } |
| | | |
| | | if (u32Len >= 1) |
| | | { |
| | | memcpy(acAlt, pcStart, u32Len); |
| | | acAlt[u32Len] = 0; |
| | | _pstGPS->m_fAlt = atof(acAlt); |
| | | } |
| | | else |
| | | { |
| | | _pstGPS->m_fAlt = 0; |
| | | } |
| | | |
| | | return HIDO_OK; |
| | | } |
| | | |
| | | static HIDO_INT32 GPS_ParseMsl(HIDO_DataStruct *_pstSpeedData, ST_GPS *_pstGPS) |
| | | { |
| | | HIDO_UINT32 u32Len = _pstSpeedData->m_u32Len; |
| | | HIDO_CHAR *pcStart = (HIDO_CHAR *) _pstSpeedData->m_pData; |
| | | HIDO_CHAR acAlt[10]; |
| | | |
| | | if (u32Len >= 10) |
| | | { |
| | | return HIDO_ERR; |
| | | } |
| | | |
| | | if (u32Len >= 1) |
| | | { |
| | | memcpy(acAlt, pcStart, u32Len); |
| | | acAlt[u32Len] = 0; |
| | | _pstGPS->m_fMsl = atof(acAlt); |
| | | } |
| | | else |
| | | { |
| | | _pstGPS->m_fMsl = 0; |
| | | } |
| | | |
| | | return HIDO_OK; |
| | | } |
| | | /******************************************************************************* |
| | | * Function Name : GPS_ParseGGA |
| | | * Description : GPS GGA数据解析(仅检查数据是否有效) |
| | |
| | | char _pcData_final[256]; |
| | | extern uint8_t fangchai_flag; |
| | | extern uint8_t GPSchangdu; |
| | | extern uint8_t GPS_GGAdate[200]; |
| | | static HIDO_INT32 GPS_ParseGGA(HIDO_CHAR *_pcData, HIDO_UINT32 _u32Len) |
| | | extern uint8_t GPS_GGAdate[400]; |
| | | extern u8 gps_state,gps_chafenlingqi,gps_satel_num,gps_signalpower; |
| | | extern double gps_jingdu,gps_weidu; |
| | | extern float gps_height; |
| | | extern uint8_t fangzhijinrushuimian_flag; |
| | | HIDO_INT32 GPS_ParseGGA(HIDO_CHAR *_pcData, HIDO_UINT32 _u32Len) |
| | | { |
| | | ST_GPS stGPS; |
| | | HIDO_DataStruct stPosState; |
| | | HIDO_DataStruct stTime;//时间 |
| | | HIDO_DataStruct stLat;//维度 |
| | | HIDO_DataStruct stLatSign;//南/北 |
| | | HIDO_DataStruct stLon;//经度 |
| | | HIDO_DataStruct stLonSign;//东/西 |
| | | HIDO_DataStruct stPosState;//gps״̬ |
| | | HIDO_DataStruct stAlt;//海拔高度 |
| | | HIDO_DataStruct stAltUnit;//高度单位 |
| | | HIDO_DataStruct stMsl;// |
| | | HIDO_DataStruct stDiffAge;// |
| | | HIDO_DataStruct stWeixingshuliang;//卫星数量 |
| | | HIDO_DataStruct stChafenshijian;//差分时间 |
| | | // HIDO_DataStruct stPosState; |
| | | static u8 gpsledstate; |
| | | |
| | | memset(&stGPS, 0, sizeof(ST_GPS)); |
| | |
| | | return HIDO_ERR; |
| | | } |
| | | |
| | | if (HIDO_UtilParseFormat((HIDO_UINT8 *) _pcData, _u32Len, "$%*,%*,%*,%*,%*,%*,%p,%*,%*,%*,%*,%*,%*,%*,%**", &stPosState) != 15) |
| | | // if (HIDO_UtilParseFormat((HIDO_UINT8 *) _pcData, _u32Len, "$%*,%*,%*,%*,%*,%*,%p,%*,%*,%*,%*,%*,%*,%*,%**", &stPosState) != 15) |
| | | // { |
| | | // return HIDO_ERR; |
| | | // } |
| | | if (HIDO_UtilParseFormat((HIDO_UINT8 *) _pcData, _u32Len, "$%*,%p,%p,%p,%p,%p,%p,%p,%*,%p,%p,%p,%p,%p,%**", |
| | | &stTime, &stLat, &stLatSign, &stLon, &stLonSign, &stPosState,&stWeixingshuliang, &stAlt, &stAltUnit, &stMsl,&stChafenshijian, &stDiffAge) != 15) |
| | | { |
| | | return HIDO_ERR; |
| | | } |
| | | l_u8PosState = HIDO_UtilStrBufToInt((HIDO_CHAR *) stPosState.m_pData, stPosState.m_u32Len); |
| | | |
| | | if(l_u8PosState!=0) |
| | | {static uint8_t wait_pos_stable_times = 6; |
| | | // if(HIDO_FALSE == l_bATLocationConfig) |
| | | // { |
| | | // if(wait_pos_stable_times--==0) |
| | | // { |
| | | // l_bATLocationConfig = HIDO_TRUE; |
| | | // if(_u32Len < (sizeof(l_acConfigGGA) - 1)) |
| | | // { |
| | | // memcpy(l_acConfigGGA, _pcData, _u32Len); |
| | | // l_acConfigGGA[_u32Len-2] = '\0'; |
| | | // l_acConfigGGA[1] = 'J'; |
| | | // l_acConfigGGA[2] = 'Z'; |
| | | // } |
| | | |
| | | if (GPS_ParseLat(&stLat, &stGPS) != HIDO_OK) |
| | | { |
| | | //return HIDO_ERR; |
| | | } |
| | | |
| | | if (GPS_ParseLon(&stLon, &stGPS) != HIDO_OK) |
| | | { |
| | | //return HIDO_ERR; |
| | | } |
| | | |
| | | if (GPS_ParseLatSign(&stLatSign, &stGPS) != HIDO_OK) |
| | | { |
| | | //return HIDO_ERR; |
| | | } |
| | | |
| | | if (GPS_ParseLonSign(&stLonSign, &stGPS) != HIDO_OK) |
| | | { |
| | | //return HIDO_ERR; |
| | | } |
| | | |
| | | if (GPS_ParseAlt(&stAlt, &stGPS) != HIDO_OK) |
| | | { |
| | | //return HIDO_ERR; |
| | | } |
| | | if (GPS_ParseMsl(&stMsl, &stGPS) != HIDO_OK) |
| | | { |
| | | //return HIDO_ERR; |
| | | } |
| | | // } |
| | | // } |
| | | |
| | | } |
| | | |
| | | |
| | | // memset(&_pcData[_u32Len-2],0,2);//为了拼接后面的数据,删除\r\n。 |
| | | // HIDO_UINT32 lora_u32Len = HIDO_UtilSnprintf((HIDO_CHAR *)_pcData_final, sizeof(_pcData_final), "%s,%X,%02x,%x,%d,%x,%d%\r\n", |
| | | // _pcData, g_com_map[DEV_ID], bat_percent,g_com_map[VERSION],0,0,0);//与设备id,电量,版本号,等进行拼接。 |
| | | memcpy(&GPS_final_data, &_pcData, _u32Len);//gps最后一包的数据 |
| | | GPSchangdu=_u32Len; |
| | | memset(&GPS_final_data, 0, sizeof(GPS_final_data)); |
| | | // memcpy(&GPS_final_data, &_pcData, _u32Len);//gps最后一包的数据 |
| | | // GPSchangdu=_u32Len; |
| | | // memset(&GPS_final_data, 0, sizeof(GPS_final_data)); |
| | | // GPS_final_changdu=lora_u32Len;//gps最后一包的长度 |
| | | if(*(char *)stPosState.m_pData != '0')//如果是成功获取位置的那一包 |
| | | { |
| | | gpsled=BLUE; |
| | | gpsled=BLUE; |
| | | // memcpy(&gps_state,&stPosState.m_pData,stPosState.m_u32Len); |
| | | // memcpy(&gps_chafenlingqi,&stChafenshijian.m_pData,stChafenshijian.m_u32Len); |
| | | // memcpy(&gps_satel_num,&stWeixingshuliang.m_pData,stWeixingshuliang.m_u32Len); |
| | | // gps_state=*(uint8_t *)stPosState.m_pData; |
| | | // gps_chafenlingqi=*(uint8_t *)stChafenshijian.m_pData; |
| | | gps_state=HIDO_UtilStrBufToInt(stPosState.m_pData, stPosState.m_u32Len); |
| | | gps_chafenlingqi=HIDO_UtilStrBufToInt(stChafenshijian.m_pData, stChafenshijian.m_u32Len); |
| | | gps_satel_num=HIDO_UtilStrBufToInt(stWeixingshuliang.m_pData, stWeixingshuliang.m_u32Len); |
| | | // *(uint8_t *); |
| | | // gps_chafenlingqi= |
| | | // gps_satel_num= |
| | | gps_signalpower=0; |
| | | gps_jingdu=stGPS.m_dLat; |
| | | gps_weidu=stGPS.m_dLon; |
| | | gps_height=stGPS.m_fAlt+stGPS.m_fMsl; |
| | | fangzhijinrushuimian_flag=0; |
| | | } |
| | | else//如果不是成功获取位置的那一包 |
| | | { |
| | | gpsled=RED; |
| | | gps_state=0; |
| | | gps_chafenlingqi=0; |
| | | gps_satel_num=0; |
| | | gps_signalpower=0; |
| | | gps_jingdu=0; |
| | | gps_weidu=0; |
| | | gps_height=0; |
| | | fangzhijinrushuimian_flag=0; |
| | | } |
| | | |
| | | return HIDO_OK; |
| | |
| | | * Return : one |
| | | * Author : hido.ltd |
| | | * Modified Date: : 2021年5月07日 |
| | | *******************************************************************************/ |
| | | static HIDO_VOID GPS_RecvFsm(HIDO_UINT8 _u8RecvChar) |
| | | // *******************************************************************************/ |
| | | HIDO_VOID GPS_RecvFsm(HIDO_UINT8 _u8RecvChar) |
| | | { |
| | | switch (l_stGPSRecv.m_eState) |
| | | { |
| | |
| | | |
| | | if(strstr(l_stGPSRecv.m_acRecvBuf, "GGA,") != HIDO_NULL) |
| | | { |
| | | |
| | | GPS_ParseGGA(l_stGPSRecv.m_acRecvBuf, l_stGPSRecv.m_u32RecvLen); |
| | | memset(l_stGPSRecv.m_acRecvBuf,0,l_stGPSRecv.m_u32RecvLen); |
| | | // fangzhijinrushuimian_flag=0; |
| | | } |
| | | } |
| | | |
| | |
| | | // * Return : None |
| | | // * Author : hido.ltd |
| | | // *******************************************************************************/ |
| | | HIDO_VOID GPS_Recv_Poll(uint8_t u8RecvChar) |
| | | { |
| | | GPS_RecvFsm(u8RecvChar); |
| | | } |
| | | |
| | | //HIDO_VOID GPS_Recv_Poll(uint8_t u8RecvChar) |
| | | //{ |
| | | // GPS_RecvFsm(u8RecvChar); |
| | | //} |
| | | //HIDO_VOID GPS_ParseGGAPoll(HIDO_UINT8 data,HIDO_UINT8 datanum) |
| | | //{ |
| | | // GPS_ParseGGA(&data, datanum); |
| | | //} |
| | | ///******************************************************************************* |
| | | // * Function Name : GPS_SetEventCallback |
| | | // * Description : GPS设置GPS事件回调 |