Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ extension TripProgress {

mapTemplate.updateEstimates(estimates, for: session.trip)

if let currentManeuer = session.upcomingManeuvers.first {
if let currentManeuver = session.upcomingManeuvers.first {
let estimates = CPTravelEstimates.fromFerrostarForStep(
progress: self,
units: units,
locale: .current
)

session.updateEstimates(estimates, for: currentManeuer)
session.updateEstimates(estimates, for: currentManeuver)
}
}
}
6 changes: 3 additions & 3 deletions apple/Sources/FerrostarCore/FerrostarCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public protocol FerrostarCoreDelegate: AnyObject {
/// This matters in the case that a user is off route, the framework calculates a new route,
/// and the user is determined to still be off the new route.
/// This adds a minimum delay (default 5 seconds).
public var minimumTimeBeforeRecalculaton: TimeInterval = 5
public var minimumTimeBeforeRecalculation: TimeInterval = 5

/// The minimum distance (in meters) the user must move before performing another route recalculation.
///
Expand Down Expand Up @@ -444,7 +444,7 @@ public protocol FerrostarCoreDelegate: AnyObject {
// Ensure a minimum cool down before a new route fetch
self.lastAutomaticRecalculation?.timeIntervalSinceNow ?? -TimeInterval
.greatestFiniteMagnitude < -self
.minimumTimeBeforeRecalculaton,
.minimumTimeBeforeRecalculation,
// Don't recalculate again if the user hasn't moved much
self.lastRecalculationLocation?.clLocation
.distance(from: location.clLocation) ?? .greatestFiniteMagnitude
Expand Down Expand Up @@ -499,7 +499,7 @@ public protocol FerrostarCoreDelegate: AnyObject {
// Otherwise we'll ignore it.
spokenInstructionToAlert = spokenInstruction

// This sholud not happen on the main queue as it can block;
// This should not happen on the main queue as it can block;
// we'll probably remove the need for this eventually
// by making FerrostarCore its own actor
DispatchQueue.global(qos: .default).async {
Expand Down
2 changes: 1 addition & 1 deletion apple/Sources/FerrostarCore/URLRequestLoading.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

/// A generic prodocol describing a network session capable of loading URL requests.
/// A generic protocol describing a network session capable of loading URL requests.
///
/// This exists to allow mocking in test code. A conformance is provided for `URLSession`,
/// which should be used for production code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public extension GeometryProxy {
/// with other methods like size classes.
///
/// NOTE: This is a public computed property,
/// but you sholud not rely on this in your applications as we may ditch this
/// but you should not rely on this in your applications as we may ditch this
/// if a better model presents itself.
/// It is only public so that we can use it internally to other Ferrostar modules.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ protocol SpeedLimitStyleProviding {
// TODO: Create a location based Provider using:
// MUTCD Signage Regions: https://en.wikipedia.org/wiki/Manual_on_Uniform_Traffic_Control_Devices
// US, Canada, Mexico, Belize, Argentina, Bolivia, Brazil, Colombia, Equador, Guyana
// Paraguay, Peru, Venezuela, Austrialia, Thailand.
// Paraguay, Peru, Venezuela, Australia, Thailand.
// Region Codes: https://en.wikipedia.org/wiki/IETF_language_tag

/// Always prefer US Style (MUTCD)
Expand Down
2 changes: 1 addition & 1 deletion guide/src/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ We are tracking status via the following issues:
### On the web

We consider the web platform to be rougher **beta** quality than the native mobile platforms.
We do our best not to introduce any breaknig changes that are web-specific,
We do our best not to introduce any breaking changes that are web-specific,
but web (particularly the UI layer) is not quite as mature as mobile.

## How to use this guide
Expand Down
2 changes: 1 addition & 1 deletion guide/src/route-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class MyCustomRouteProvider(

val jsonAdapter = moshi.adapter(MyOsrmRoute::class.java)
// Using the intermediate OSRM route JSON. We map our custom response
// data into ferrostar waypionts.
// data into ferrostar waypoints.
val routes = myResponse.routes {
val osrmRoute = jsonAdapter.toJson(it.route).encodeToByteArray()
createRouteFromOsrmRoute(osrmRoute, outWaypoints, MyCustomRouteProvider.POLYLINE_PRECISION)
Expand Down
4 changes: 2 additions & 2 deletions react-native/core/src/FerrostarCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class FerrostarCore implements LocationUpdateListener {
* the user is determined to still be off the new route. This adds a minimum delay (default 5
* seconds).
*/
minimumTimeBeforeRecalculaton: number = 5;
minimumTimeBeforeRecalculation: number = 5;

/**
* Controls what happens when the user deviates from the route.
Expand Down Expand Up @@ -301,7 +301,7 @@ export class FerrostarCore implements LocationUpdateListener {
// We have to do some weird thing here with hrTime since JavaScript doesn't have a nice nanoseoncds method.
const isGreaterThanMinimumTime = this._lastAutomaticRecalculation
? getNanoTime() - this._lastAutomaticRecalculation >
this.minimumTimeBeforeRecalculaton
this.minimumTimeBeforeRecalculation
: true;

if (this._routeRequestInFlight || !isGreaterThanMinimumTime) {
Expand Down
Loading