WXK
2024-03-25 578cdb830c456877b4d7539cab72c4f97fea016b
Src/application/GPS.c
@@ -337,41 +337,41 @@
    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 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 >= 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;
    }
//    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
//    return HIDO_OK;
//}
//#endif
/*******************************************************************************
 * Function Name     : GPS_ParseSpeed
@@ -585,8 +585,8 @@
 * 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)
    {
@@ -720,14 +720,14 @@
// * Return            : None
// * Author            : hido.ltd
// *******************************************************************************/
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);
}
//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事件回调