mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-12 15:33:45 +08:00
1ce9f73ae2
Add navigation and map matching providers with the vendored map service sources.
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
|
|
}
|