Skip to content

Commit

Permalink
PSA: fix position api
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Aug 29, 2022
1 parent d40d31d commit 24ecaf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vehicle/psa/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ var _ api.VehiclePosition = (*Provider)(nil)
func (v *Provider) Position() (float64, float64, error) {
res, err := v.statusG()
if err == nil {
if coord := res.LastPosition.Geometry.Coordinates; len(coord) == 2 {
if coord := res.LastPosition.Geometry.Coordinates; len(coord) >= 2 {
return coord[0], coord[1], nil
}
return 0, 0, api.ErrNotAvailable
Expand Down

0 comments on commit 24ecaf7

Please sign in to comment.