Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
RingerJK committed May 24, 2023
1 parent 50bd79e commit 90a2db5
Show file tree
Hide file tree
Showing 15 changed files with 813 additions and 156 deletions.
2 changes: 1 addition & 1 deletion gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ext {
// version which we should use in this build
def mapboxNavigatorVersion = System.getenv("FORCE_MAPBOX_NAVIGATION_NATIVE_VERSION")
if (mapboxNavigatorVersion == null || mapboxNavigatorVersion == '') {
mapboxNavigatorVersion = '133.0.0'
mapboxNavigatorVersion = '134.0.0'
}
println("Navigation Native version: " + mapboxNavigatorVersion)

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ internal class EventFeedback(
val feedbackType: String,
val description: String,
val feedbackSubType: Array<String>,
val screenshot: String,
): EventBase(driverMode) {
override val event: String = "navigation.feedback"
}
Expand Down Expand Up @@ -70,30 +69,14 @@ internal class EventArrive : EventBaseActiveGuidance() {
override val event: String = "navigation.arrive"
}

/**
* "volumeLevel" -> {Value@20958} "33"
"driverMode" -> {Value@20960} "freeDrive"
"batteryPluggedIn" -> {Value@20962} "false"
"eventVersion" -> {Value@20964} "2.4"
"simulation" -> {Value@20966} "true"
"audioType" -> {Value@20968} "headphones"
"percentTimeInPortrait" -> {Value@20970} "100"
"operatingSystem" -> {Value@20972} "Android 11"
"driverModeId" -> {Value@20974} "6283cc3d-6262-4833-86f5-663581327e2f"
"connectivity" -> {Value@20976} "Unknown"
"driverModeStartTimestamp" -> {Value@20978} "2023-05-17T16:35:26.530Z"
"percentTimeInForeground" -> {Value@20980} "100"
"driverModeStartTimestampMonotime" -> {Value@20982} "526084002909708"
"event" -> {Value@20984} "navigation.freeDrive"
"lat" -> {Value@20986} "38.89514907122847"
"batteryLevel" -> {Value@20988} "100"
"lng" -> {Value@20990} "-77.03195362937024"
"created" -> {Value@20992} "2023-05-17T16:35:33.859Z"
"eventType" -> {Value@20994} "stop"
"version" -> {Value@20996} "2.4"
"sdkIdentifier" -> {Value@20998} "mapbox-navigation-android"
"createdMonotime" -> {Value@21000} "526091271247708"
"locationEngine" -> {Value@21002} "fused"
"screenBrightness" -> {Value@21004} "40"
"device" -> {Value@21006} "generic_x86 (x86; Android SDK built for x86)"
*/
internal class EventCancel : EventBaseActiveGuidance() {
override val event: String = "navigation.cancel"
}

internal class EventAlternativeRoute: EventBaseActiveGuidance() {
override val event: String = "navigation.alternativeRoute"
}

internal class EventReroute: EventBaseActiveGuidance() {
override val event: String = "navigation.reroute"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ internal fun EventBase.checkIfSubOf(value: Value): List<String> {

internal fun Collection<EventBase>.verifyEvents(events: List<Value>): List<String> {
if (this.size != events.size) {
return listOf("Events lists must have same sizes: List<EventBase> is ${this.size}, " +
"List<Value> is ${events.size}")
return listOf(
"""---
Events lists must have same sizes: expected List<EventBase> is ${this.size} actual List<Value> is ${events.size}
expected: ${this.joinToString { it.event }}
actual: ${events.joinToString { (it.contents as Map<String, Value>)["event"]?.contents as String }}
---"""
)
}

return this.foldIndexed(mutableListOf<String>()) { index, accumulateList, eventBase ->
Expand Down
Loading

0 comments on commit 90a2db5

Please sign in to comment.