Give leeway for nw/ne/sw/se within a few degrees like n/e/s/w.

md1702
vk7js 2022-09-14 09:34:31 +10:00 zatwierdzone przez Silvano Seva
rodzic 8c9f034b93
commit dbc86ea392
1 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -614,6 +614,7 @@ void vp_announceGPSInfo(vpGPSInfoFlags_t gpsInfoFlags)
}
char buffer[17] = "\0";
if (gpsInfoFlags & vpGPSDirection)
{
vp_queuePrompt(PROMPT_COMPASS);
@ -623,19 +624,19 @@ void vp_announceGPSInfo(vpGPSInfoFlags_t gpsInfoFlags)
vp_queueString(buffer, vpAnnounceCommonSymbols);
vp_queuePrompt(PROMPT_DEGREES);
}
if (state.gps_data.tmg_true <= 45 || state.gps_data.tmg_true >= 315)
if (state.gps_data.tmg_true < (45+margin) || state.gps_data.tmg_true > (315-margin))
{
vp_queuePrompt(PROMPT_NORTH);
}
if (state.gps_data.tmg_true >= 45 && state.gps_data.tmg_true <= 135)
if (state.gps_data.tmg_true > (45-margin) && state.gps_data.tmg_true < (135+margin))
{
vp_queuePrompt(PROMPT_EAST);
}
if (state.gps_data.tmg_true >= 135 && state.gps_data.tmg_true <= 225)
if (state.gps_data.tmg_true > (135-margin) && state.gps_data.tmg_true < (225+margin))
{
vp_queuePrompt(PROMPT_SOUTH);
}
if (state.gps_data.tmg_true >= 225 && state.gps_data.tmg_true <= 315)
if (state.gps_data.tmg_true > (225-margin) && state.gps_data.tmg_true < (315+margin))
{
vp_queuePrompt(PROMPT_WEST);
}