mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-09-12 01:24:04 +00:00
[GPS] Add course (bearing) as output option
This commit is contained in:
@@ -435,6 +435,14 @@ boolean Plugin_082(uint8_t function, struct EventStruct *event, String& string)
|
||||
# endif // ifndef BUILD_NO_DEBUG
|
||||
success = true;
|
||||
}
|
||||
|
||||
if (P082_data->gps->course.isUpdated()) {
|
||||
P082_setOutputValue(event, static_cast<uint8_t>(P082_query::P082_QUERY_COURSE), P082_data->gps->course.deg());
|
||||
# ifndef BUILD_NO_DEBUG
|
||||
addLog(LOG_LEVEL_DEBUG, F("GPS: Course update."));
|
||||
# endif // ifndef BUILD_NO_DEBUG
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
P082_setOutputValue(event, static_cast<uint8_t>(P082_query::P082_QUERY_SATVIS), P082_data->gps->satellitesStats.nrSatsVisible());
|
||||
P082_setOutputValue(event, static_cast<uint8_t>(P082_query::P082_QUERY_SATUSE), P082_data->gps->satellitesStats.nrSatsTracked());
|
||||
|
||||
@@ -23,6 +23,7 @@ const __FlashStringHelper* Plugin_082_valuename(P082_query value_nr, bool displa
|
||||
case P082_query::P082_QUERY_CHKSUM_FAIL: return displayString ? F("Checksum Fail") : F("chksum_fail");
|
||||
case P082_query::P082_QUERY_DISTANCE: return displayString ? F("Distance (ODO)") : F("dist");
|
||||
case P082_query::P082_QUERY_DIST_REF: return displayString ? F("Distance from Reference Point") : F("dist_ref");
|
||||
case P082_query::P082_QUERY_COURSE: return displayString ? F("Course (BeaRinG)") : F("course");
|
||||
case P082_query::P082_NR_OUTPUT_OPTIONS: break;
|
||||
}
|
||||
return F("");
|
||||
|
||||
@@ -61,6 +61,7 @@ enum class P082_query : uint8_t {
|
||||
P082_QUERY_CHKSUM_FAIL = 9,
|
||||
P082_QUERY_DISTANCE = 10,
|
||||
P082_QUERY_DIST_REF = 11,
|
||||
P082_QUERY_COURSE = 12,
|
||||
P082_NR_OUTPUT_OPTIONS
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user