Skip to content

Commit

Permalink
Support incidents for OSRM responses
Browse files Browse the repository at this point in the history
This parses incidents on the OSRM response route leg, and splits the
incidents across the corresponding route step. Since an incident may
span multiple steps, this will duplicate an incident and adjust the
indices accordingly whenever that happens. Clients can de-duplicate
these if necessary based on the incident identifier.
  • Loading branch information
ahmedre committed Nov 19, 2024
1 parent 4b24de5 commit ad53720
Show file tree
Hide file tree
Showing 23 changed files with 2,207 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if useLocalFramework {
path: "./common/target/ios/libferrostar-rs.xcframework"
)
} else {
let releaseTag = "0.22.0"
let releaseTag = "0.23.0"
let releaseChecksum = "00b7372e4c0a3f3c63845d411db0b9841dffc7ed201af8a5ca4b279ef3eab516"
binaryTarget = .binaryTarget(
name: "FerrostarCoreRS",
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ ext {

allprojects {
group = "com.stadiamaps.ferrostar"
version = "0.22.0"
version = "0.23.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ class FerrostarCoreTest {
triggerDistanceBeforeManeuver = 42.0)),
spokenInstructions = listOf(),
duration = 0.0,
annotations = null)))
annotations = null,
incidents = listOf())))

@Test
fun test401UnauthorizedRouteResponse() = runTest {
Expand Down
3 changes: 2 additions & 1 deletion apple/Sources/FerrostarCore/Mock/MockNavigationState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public extension NavigationState {
),
],
spokenInstructions: [],
annotations: nil
annotations: nil,
incidents: []
),
],
remainingWaypoints: [],
Expand Down
3 changes: 2 additions & 1 deletion apple/Sources/FerrostarSwiftUI/TestFixtureFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ struct RouteStepFactory: TestFixtureFactory {
instruction: "Walk west on \(roadNameBuilder(n))",
visualInstructions: [visualInstructionBuilder(n)],
spokenInstructions: [],
annotations: nil
annotations: nil,
incidents: []
)
}
}
Expand Down
Loading

0 comments on commit ad53720

Please sign in to comment.