Skip to content

Commit

Permalink
External wind via $LXWP0 added
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaLima authored and brunotl committed Mar 21, 2019
1 parent 991c781 commit cc462c5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Common/Source/Devices/devLX16xx.cpp
Expand Up @@ -356,12 +356,12 @@ bool DevLX16xx::LXWP0(PDeviceDescriptor_t d, const TCHAR* sentence, NMEA_INFO* i
info->VarioAvailable = FALSE;



/*
if (ParToDouble(sentence, 10, &info->ExternalWindDirection) &&
ParToDouble(sentence, 11, &info->ExternalWindSpeed))
{
info->ExternalWindSpeed /= TOKPH; /* convert to m/s */
info->ExternalWindAvailable = TRUE;
*/
}
TriggerVarioUpdate();

return(true);
Expand Down
13 changes: 7 additions & 6 deletions Common/Source/Devices/devLXV7.cpp
Expand Up @@ -342,12 +342,10 @@ BOOL DevLXV7::ParseNMEA(PDeviceDescriptor_t d, TCHAR* sentence, NMEA_INFO* info)
else
if (_tcsncmp(_T("$LXWP2"), sentence, 6) == 0)
return LXWP2(d, sentence + 7, info);


#ifdef OLD_LX_SENTENCES
else
if (_tcsncmp(_T("$LXWP0"), sentence, 6) == 0)
return LXWP0(d, sentence + 7, info);
return LXWP0(d, sentence + 7, info);
#ifdef OLD_LX_SENTENCES
else
if (_tcsncmp(_T("$LXWP1"), sentence, 6) == 0)
return LXWP1(d, sentence + 7, info);
Expand Down Expand Up @@ -391,11 +389,14 @@ bool DevLXV7::LXWP0(PDeviceDescriptor_t d, const TCHAR* sentence, NMEA_INFO* inf



/*

if (ParToDouble(sentence, 10, &info->ExternalWindDirection) &&
ParToDouble(sentence, 11, &info->ExternalWindSpeed))
{
info->ExternalWindSpeed /= TOKPH;
info->ExternalWindAvailable = TRUE;
*/
}

// TriggerVarioUpdate();

return(false);
Expand Down
14 changes: 8 additions & 6 deletions Common/Source/Devices/devLXV7_EXP.cpp
Expand Up @@ -547,11 +547,10 @@ else
else
if (_tcsncmp(_T("$LXWP1"), sentence, 6) == 0)
return LXWP1(d, sentence + 7, info);

#ifdef OLD_LX_SENTENCES
else
if (_tcsncmp(_T("$LXWP0"), sentence, 6) == 0)
return LXWP0(d, sentence + 7, info);
if (_tcsncmp(_T("$LXWP0"), sentence, 6) == 0)
return LXWP0(d, sentence + 7, info);
#ifdef OLD_LX_SENTENCES
else
if (_tcsncmp(_T("$LXWP1"), sentence, 6) == 0)
return LXWP1(d, sentence + 7, info);
Expand Down Expand Up @@ -594,11 +593,14 @@ bool DevLXV7_EXP::LXWP0(PDeviceDescriptor_t d, const TCHAR* sentence, NMEA_INFO*



/*

if (ParToDouble(sentence, 10, &info->ExternalWindDirection) &&
ParToDouble(sentence, 11, &info->ExternalWindSpeed))
{
info->ExternalWindSpeed /= TOKPH;
info->ExternalWindAvailable = TRUE;
*/
}

// TriggerVarioUpdate();

return(false);
Expand Down

0 comments on commit cc462c5

Please sign in to comment.