@@ -10,6 +10,7 @@ import com.mapbox.navigation.base.ExperimentalPreviewMapboxNavigationAPI
1010 * @param roadCondition if true, roadCondition type will be generated
1111 * @param variableSpeedSign if true, variableSpeedSign type will be generated
1212 * @param headingChange if true, headingChange type will be generated
13+ * @param historyAverageSpeed if true, headingChange type will be generated
1314 */
1415@ExperimentalPreviewMapboxNavigationAPI
1516class AdasisConfigProfileShortTypeOptions private constructor(
@@ -18,6 +19,7 @@ class AdasisConfigProfileShortTypeOptions private constructor(
1819 val roadCondition : Boolean ,
1920 val variableSpeedSign : Boolean ,
2021 val headingChange : Boolean ,
22+ val historyAverageSpeed : Boolean ,
2123) {
2224
2325 /* *
@@ -29,6 +31,7 @@ class AdasisConfigProfileShortTypeOptions private constructor(
2931 .roadCondition(roadCondition)
3032 .variableSpeedSign(variableSpeedSign)
3133 .headingChange(headingChange)
34+ .historyAverageSpeed(historyAverageSpeed)
3235
3336 @JvmSynthetic
3437 internal fun toNativeAdasisConfigProfileShortTypeOptions ():
@@ -38,7 +41,8 @@ class AdasisConfigProfileShortTypeOptions private constructor(
3841 curvature,
3942 roadCondition,
4043 variableSpeedSign,
41- headingChange
44+ headingChange,
45+ historyAverageSpeed,
4246 )
4347 }
4448
@@ -55,7 +59,8 @@ class AdasisConfigProfileShortTypeOptions private constructor(
5559 if (curvature != other.curvature) return false
5660 if (roadCondition != other.roadCondition) return false
5761 if (variableSpeedSign != other.variableSpeedSign) return false
58- return headingChange == other.headingChange
62+ if (headingChange != other.headingChange) return false
63+ return historyAverageSpeed == other.historyAverageSpeed
5964 }
6065
6166 /* *
@@ -67,6 +72,7 @@ class AdasisConfigProfileShortTypeOptions private constructor(
6772 result = 31 * result + roadCondition.hashCode()
6873 result = 31 * result + variableSpeedSign.hashCode()
6974 result = 31 * result + headingChange.hashCode()
75+ result = 31 * result + historyAverageSpeed.hashCode()
7076 return result
7177 }
7278
@@ -80,6 +86,7 @@ class AdasisConfigProfileShortTypeOptions private constructor(
8086 " roadCondition=$roadCondition , " +
8187 " variableSpeedSign=$variableSpeedSign , " +
8288 " headingChange=$headingChange " +
89+ " historyAverageSpeed=$historyAverageSpeed " +
8390 " )"
8491 }
8592
@@ -93,6 +100,7 @@ class AdasisConfigProfileShortTypeOptions private constructor(
93100 private var roadCondition: Boolean = true
94101 private var variableSpeedSign: Boolean = false
95102 private var headingChange: Boolean = true
103+ private var historyAverageSpeed: Boolean = false
96104
97105 /* *
98106 * If true, slopeStep type will be generated
@@ -129,6 +137,13 @@ class AdasisConfigProfileShortTypeOptions private constructor(
129137 this .headingChange = headingChange
130138 }
131139
140+ /* *
141+ * If true, historyAverageSpeed type will be generated
142+ */
143+ fun historyAverageSpeed (historyAverageSpeed : Boolean ) = apply {
144+ this .historyAverageSpeed = historyAverageSpeed
145+ }
146+
132147 /* *
133148 * Build the [AdasisConfigProfileShortTypeOptions]
134149 */
@@ -138,6 +153,7 @@ class AdasisConfigProfileShortTypeOptions private constructor(
138153 roadCondition = roadCondition,
139154 variableSpeedSign = variableSpeedSign,
140155 headingChange = headingChange,
156+ historyAverageSpeed = historyAverageSpeed,
141157 )
142158 }
143159}
0 commit comments