Skip to content

Commit

Permalink
fix:vehicle:gpsd: Fix#1130 (#1137)
Browse files Browse the repository at this point in the history
* Fix #1135

* Fix #1130

* Revert "Fix #1135"

This reverts commit 585ab7b.
  • Loading branch information
OLFDB committed Aug 28, 2021
1 parent 63b4204 commit 0978c41
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions navit/vehicle/gpsd/vehicle_gpsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ vehicle_gpsd_callback(struct gps_data_t *data, const char *buf, size_t len,
}
if (data->set & MODE_SET) {
priv->fix_type = data->fix.mode - 1;
dbg(lvl_debug,"Fix Mode: %i", priv->fix_type);
data->set &= ~MODE_SET;
}
if (data->set & TIME_SET) {
Expand Down Expand Up @@ -378,6 +379,9 @@ static int vehicle_gpsd_position_attr_get(struct vehicle_priv *priv,
enum attr_type type, struct attr *attr) {
struct attr * active=NULL;
switch (type) {
case attr_position_valid: // Fix #1130
attr->u.num=(priv->fix_type>0?attr_position_valid_valid:attr_position_valid_invalid);
break;
case attr_position_fix_type:
attr->u.num = priv->fix_type;
break;
Expand Down

0 comments on commit 0978c41

Please sign in to comment.