mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-28 00:53:45 +08:00
ab81464bd1
Add navigation and map matching providers with the vendored map service sources. Co-authored-by: Daniel Koepping <elkoled@gmail.com> Co-authored-by: Danny <dannyirwin31@yahoo.com> Co-authored-by: Prabhaav Pillai <prabhaav@msu.edu> Co-authored-by: dirwin31 <83434411+dirwin31@users.noreply.github.com>
16 lines
341 B
Go
16 lines
341 B
Go
package main
|
|
|
|
import (
|
|
"pfeifer.dev/mapd/maps"
|
|
)
|
|
|
|
func checkWayForHazardChange(state *State, parent *Upcoming[string], way maps.NextWayResult) (valid bool, val string) {
|
|
nextHazard := way.Way.Hazard()
|
|
|
|
if nextHazard != state.CurrentWay.Way.Hazard() && nextHazard != "" {
|
|
return true, nextHazard
|
|
}
|
|
|
|
return false, parent.DefaultValue
|
|
}
|