Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Commit ee0ec2d

Browse files
committed
Merge tag '13.1.1'
# Conflicts: # auto-api-java/build.gradle # gradle/wrapper/gradle-wrapper.properties
2 parents 9d70d79 + 00f9fd5 commit ee0ec2d

File tree

137 files changed

+4897
-2398
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+4897
-2398
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Changelog
2+
3+
## [13.1.1]
4+
5+
- Update to (auto api branch)[https://github.com/highmobility/auto-api/commit/3953d8963ba5f3a615f528247a8f14f57c75d41d]
6+
- Change the java lib versioning to {autoapi-level}.{sub-autoapi-level}.{jar-version}

auto-api-java/build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ ext.ver = [
1414
"hmkit-auto-api" : "13.1.1"
1515
]
1616

17-
ext.deps = [
18-
"utils" : "com.high-mobility:hmkit-utils:${ver."hmkit-utils"}",
19-
"findBugs": 'com.google.code.findbugs:jsr305:3.0.2'
20-
]
17+
ext.deps = ["utils" : "com.high-mobility:hmkit-utils:${ver."hmkit-utils"}",
18+
"findBugs": 'com.google.code.findbugs:jsr305:3.0.2']
2119

2220
dependencies {
2321
if (project.hasProperty('depLocation') == true && project.depLocation == 0) {

auto-api-java/src/main/java/com/highmobility/autoapi/Adas.java

Lines changed: 44 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public class Adas {
5252
public static final byte PROPERTY_LANE_KEEP_ASSISTS_STATES = 0x09;
5353
public static final byte PROPERTY_PARK_ASSISTS = 0x0a;
5454
public static final byte PROPERTY_BLIND_SPOT_WARNING_SYSTEM = 0x0b;
55+
public static final byte PROPERTY_LAUNCH_CONTROL = 0x0c;
5556

5657
/**
5758
* Get ADAS property availability information
@@ -162,6 +163,7 @@ public static class State extends SetCommand {
162163
List<Property<LaneKeepAssistState>> laneKeepAssistsStates;
163164
List<Property<ParkAssist>> parkAssists;
164165
Property<OnOffState> blindSpotWarningSystem = new Property<>(OnOffState.class, PROPERTY_BLIND_SPOT_WARNING_SYSTEM);
166+
Property<ActiveState> launchControl = new Property<>(ActiveState.class, PROPERTY_LAUNCH_CONTROL);
165167

166168
/**
167169
* @return Indicates whether the driver assistance system is active or not.
@@ -240,14 +242,21 @@ public Property<OnOffState> getBlindSpotWarningSystem() {
240242
return blindSpotWarningSystem;
241243
}
242244

243-
State(byte[] bytes) throws CommandParseException, PropertyParseException {
245+
/**
246+
* @return State of launch control activation.
247+
*/
248+
public Property<ActiveState> getLaunchControl() {
249+
return launchControl;
250+
}
251+
252+
State(byte[] bytes) {
244253
super(bytes);
245254

246255
final ArrayList<Property<LaneKeepAssistState>> laneKeepAssistsStatesBuilder = new ArrayList<>();
247256
final ArrayList<Property<ParkAssist>> parkAssistsBuilder = new ArrayList<>();
248257

249258
while (propertyIterator.hasNext()) {
250-
propertyIterator.parseNext(p -> {
259+
propertyIterator.parseNextState(p -> {
251260
switch (p.getPropertyIdentifier()) {
252261
case PROPERTY_STATUS: return status.update(p);
253262
case PROPERTY_ALERTNESS_SYSTEM_STATUS: return alertnessSystemStatus.update(p);
@@ -266,6 +275,7 @@ public Property<OnOffState> getBlindSpotWarningSystem() {
266275
parkAssistsBuilder.add(parkAssist);
267276
return parkAssist;
268277
case PROPERTY_BLIND_SPOT_WARNING_SYSTEM: return blindSpotWarningSystem.update(p);
278+
case PROPERTY_LAUNCH_CONTROL: return launchControl.update(p);
269279
}
270280

271281
return null;
@@ -276,50 +286,24 @@ public Property<OnOffState> getBlindSpotWarningSystem() {
276286
parkAssists = parkAssistsBuilder;
277287
}
278288

279-
private State(Builder builder) {
280-
super(builder);
281-
282-
status = builder.status;
283-
alertnessSystemStatus = builder.alertnessSystemStatus;
284-
forwardCollisionWarningSystem = builder.forwardCollisionWarningSystem;
285-
blindSpotWarningState = builder.blindSpotWarningState;
286-
blindSpotWarningSystemCoverage = builder.blindSpotWarningSystemCoverage;
287-
rearCrossWarningSystem = builder.rearCrossWarningSystem;
288-
automatedParkingBrake = builder.automatedParkingBrake;
289-
laneKeepAssistSystem = builder.laneKeepAssistSystem;
290-
laneKeepAssistsStates = builder.laneKeepAssistsStates;
291-
parkAssists = builder.parkAssists;
292-
blindSpotWarningSystem = builder.blindSpotWarningSystem;
293-
}
294-
295-
public static final class Builder extends SetCommand.Builder {
296-
private Property<OnOffState> status;
297-
private Property<ActiveState> alertnessSystemStatus;
298-
private Property<ActiveState> forwardCollisionWarningSystem;
299-
private Property<ActiveState> blindSpotWarningState;
300-
private Property<BlindSpotWarningSystemCoverage> blindSpotWarningSystemCoverage;
301-
private Property<ActiveState> rearCrossWarningSystem;
302-
private Property<ActiveState> automatedParkingBrake;
303-
private Property<OnOffState> laneKeepAssistSystem;
304-
private final List<Property<LaneKeepAssistState>> laneKeepAssistsStates = new ArrayList<>();
305-
private final List<Property<ParkAssist>> parkAssists = new ArrayList<>();
306-
private Property<OnOffState> blindSpotWarningSystem;
307-
289+
public static final class Builder extends SetCommand.Builder<Builder> {
308290
public Builder() {
309291
super(IDENTIFIER);
310292
}
311293

312294
public State build() {
313-
return new State(this);
295+
SetCommand baseSetCommand = super.build();
296+
Command resolved = CommandResolver.resolve(baseSetCommand.getByteArray());
297+
return (State) resolved;
314298
}
315299

316300
/**
317301
* @param status Indicates whether the driver assistance system is active or not.
318302
* @return The builder
319303
*/
320304
public Builder setStatus(Property<OnOffState> status) {
321-
this.status = status.setIdentifier(PROPERTY_STATUS);
322-
addProperty(this.status);
305+
Property property = status.setIdentifier(PROPERTY_STATUS);
306+
addProperty(property);
323307
return this;
324308
}
325309

@@ -328,8 +312,8 @@ public Builder setStatus(Property<OnOffState> status) {
328312
* @return The builder
329313
*/
330314
public Builder setAlertnessSystemStatus(Property<ActiveState> alertnessSystemStatus) {
331-
this.alertnessSystemStatus = alertnessSystemStatus.setIdentifier(PROPERTY_ALERTNESS_SYSTEM_STATUS);
332-
addProperty(this.alertnessSystemStatus);
315+
Property property = alertnessSystemStatus.setIdentifier(PROPERTY_ALERTNESS_SYSTEM_STATUS);
316+
addProperty(property);
333317
return this;
334318
}
335319

@@ -338,8 +322,8 @@ public Builder setAlertnessSystemStatus(Property<ActiveState> alertnessSystemSta
338322
* @return The builder
339323
*/
340324
public Builder setForwardCollisionWarningSystem(Property<ActiveState> forwardCollisionWarningSystem) {
341-
this.forwardCollisionWarningSystem = forwardCollisionWarningSystem.setIdentifier(PROPERTY_FORWARD_COLLISION_WARNING_SYSTEM);
342-
addProperty(this.forwardCollisionWarningSystem);
325+
Property property = forwardCollisionWarningSystem.setIdentifier(PROPERTY_FORWARD_COLLISION_WARNING_SYSTEM);
326+
addProperty(property);
343327
return this;
344328
}
345329

@@ -348,8 +332,8 @@ public Builder setForwardCollisionWarningSystem(Property<ActiveState> forwardCol
348332
* @return The builder
349333
*/
350334
public Builder setBlindSpotWarningState(Property<ActiveState> blindSpotWarningState) {
351-
this.blindSpotWarningState = blindSpotWarningState.setIdentifier(PROPERTY_BLIND_SPOT_WARNING_STATE);
352-
addProperty(this.blindSpotWarningState);
335+
Property property = blindSpotWarningState.setIdentifier(PROPERTY_BLIND_SPOT_WARNING_STATE);
336+
addProperty(property);
353337
return this;
354338
}
355339

@@ -358,8 +342,8 @@ public Builder setBlindSpotWarningState(Property<ActiveState> blindSpotWarningSt
358342
* @return The builder
359343
*/
360344
public Builder setBlindSpotWarningSystemCoverage(Property<BlindSpotWarningSystemCoverage> blindSpotWarningSystemCoverage) {
361-
this.blindSpotWarningSystemCoverage = blindSpotWarningSystemCoverage.setIdentifier(PROPERTY_BLIND_SPOT_WARNING_SYSTEM_COVERAGE);
362-
addProperty(this.blindSpotWarningSystemCoverage);
345+
Property property = blindSpotWarningSystemCoverage.setIdentifier(PROPERTY_BLIND_SPOT_WARNING_SYSTEM_COVERAGE);
346+
addProperty(property);
363347
return this;
364348
}
365349

@@ -368,8 +352,8 @@ public Builder setBlindSpotWarningSystemCoverage(Property<BlindSpotWarningSystem
368352
* @return The builder
369353
*/
370354
public Builder setRearCrossWarningSystem(Property<ActiveState> rearCrossWarningSystem) {
371-
this.rearCrossWarningSystem = rearCrossWarningSystem.setIdentifier(PROPERTY_REAR_CROSS_WARNING_SYSTEM);
372-
addProperty(this.rearCrossWarningSystem);
355+
Property property = rearCrossWarningSystem.setIdentifier(PROPERTY_REAR_CROSS_WARNING_SYSTEM);
356+
addProperty(property);
373357
return this;
374358
}
375359

@@ -378,8 +362,8 @@ public Builder setRearCrossWarningSystem(Property<ActiveState> rearCrossWarningS
378362
* @return The builder
379363
*/
380364
public Builder setAutomatedParkingBrake(Property<ActiveState> automatedParkingBrake) {
381-
this.automatedParkingBrake = automatedParkingBrake.setIdentifier(PROPERTY_AUTOMATED_PARKING_BRAKE);
382-
addProperty(this.automatedParkingBrake);
365+
Property property = automatedParkingBrake.setIdentifier(PROPERTY_AUTOMATED_PARKING_BRAKE);
366+
addProperty(property);
383367
return this;
384368
}
385369

@@ -388,8 +372,8 @@ public Builder setAutomatedParkingBrake(Property<ActiveState> automatedParkingBr
388372
* @return The builder
389373
*/
390374
public Builder setLaneKeepAssistSystem(Property<OnOffState> laneKeepAssistSystem) {
391-
this.laneKeepAssistSystem = laneKeepAssistSystem.setIdentifier(PROPERTY_LANE_KEEP_ASSIST_SYSTEM);
392-
addProperty(this.laneKeepAssistSystem);
375+
Property property = laneKeepAssistSystem.setIdentifier(PROPERTY_LANE_KEEP_ASSIST_SYSTEM);
376+
addProperty(property);
393377
return this;
394378
}
395379

@@ -400,7 +384,6 @@ public Builder setLaneKeepAssistSystem(Property<OnOffState> laneKeepAssistSystem
400384
* @return The builder
401385
*/
402386
public Builder setLaneKeepAssistsStates(Property<LaneKeepAssistState>[] laneKeepAssistsStates) {
403-
this.laneKeepAssistsStates.clear();
404387
for (int i = 0; i < laneKeepAssistsStates.length; i++) {
405388
addLaneKeepAssistsState(laneKeepAssistsStates[i]);
406389
}
@@ -417,7 +400,6 @@ public Builder setLaneKeepAssistsStates(Property<LaneKeepAssistState>[] laneKeep
417400
public Builder addLaneKeepAssistsState(Property<LaneKeepAssistState> laneKeepAssistsState) {
418401
laneKeepAssistsState.setIdentifier(PROPERTY_LANE_KEEP_ASSISTS_STATES);
419402
addProperty(laneKeepAssistsState);
420-
laneKeepAssistsStates.add(laneKeepAssistsState);
421403
return this;
422404
}
423405

@@ -428,7 +410,6 @@ public Builder addLaneKeepAssistsState(Property<LaneKeepAssistState> laneKeepAss
428410
* @return The builder
429411
*/
430412
public Builder setParkAssists(Property<ParkAssist>[] parkAssists) {
431-
this.parkAssists.clear();
432413
for (int i = 0; i < parkAssists.length; i++) {
433414
addParkAssist(parkAssists[i]);
434415
}
@@ -445,7 +426,6 @@ public Builder setParkAssists(Property<ParkAssist>[] parkAssists) {
445426
public Builder addParkAssist(Property<ParkAssist> parkAssist) {
446427
parkAssist.setIdentifier(PROPERTY_PARK_ASSISTS);
447428
addProperty(parkAssist);
448-
parkAssists.add(parkAssist);
449429
return this;
450430
}
451431

@@ -454,8 +434,18 @@ public Builder addParkAssist(Property<ParkAssist> parkAssist) {
454434
* @return The builder
455435
*/
456436
public Builder setBlindSpotWarningSystem(Property<OnOffState> blindSpotWarningSystem) {
457-
this.blindSpotWarningSystem = blindSpotWarningSystem.setIdentifier(PROPERTY_BLIND_SPOT_WARNING_SYSTEM);
458-
addProperty(this.blindSpotWarningSystem);
437+
Property property = blindSpotWarningSystem.setIdentifier(PROPERTY_BLIND_SPOT_WARNING_SYSTEM);
438+
addProperty(property);
439+
return this;
440+
}
441+
442+
/**
443+
* @param launchControl State of launch control activation.
444+
* @return The builder
445+
*/
446+
public Builder setLaunchControl(Property<ActiveState> launchControl) {
447+
Property property = launchControl.setIdentifier(PROPERTY_LAUNCH_CONTROL);
448+
addProperty(property);
459449
return this;
460450
}
461451
}

auto-api-java/src/main/java/com/highmobility/autoapi/Browser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ public LoadUrl(String url) {
5858
createBytes();
5959
}
6060

61-
LoadUrl(byte[] bytes) throws CommandParseException, PropertyParseException {
61+
LoadUrl(byte[] bytes) throws PropertyParseException {
6262
super(bytes);
6363
while (propertyIterator.hasNext()) {
64-
propertyIterator.parseNext(p -> {
64+
propertyIterator.parseNextSetter(p -> {
6565
if (p.getPropertyIdentifier() == PROPERTY_URL) return url.update(p);
6666

6767
return null;

auto-api-java/src/main/java/com/highmobility/autoapi/Capabilities.java

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,14 @@ public boolean getSupported(Integer identifier, byte propertyID) {
141141
return false;
142142
}
143143

144-
State(byte[] bytes) throws CommandParseException, PropertyParseException {
144+
State(byte[] bytes) {
145145
super(bytes);
146146

147147
final ArrayList<Property<SupportedCapability>> capabilitiesBuilder = new ArrayList<>();
148148
final ArrayList<Property<Webhook>> webhooksBuilder = new ArrayList<>();
149149

150150
while (propertyIterator.hasNext()) {
151-
propertyIterator.parseNext(p -> {
151+
propertyIterator.parseNextState(p -> {
152152
switch (p.getPropertyIdentifier()) {
153153
case PROPERTY_CAPABILITIES:
154154
Property<SupportedCapability> capability = new Property<>(SupportedCapability.class, p);
@@ -168,23 +168,15 @@ public boolean getSupported(Integer identifier, byte propertyID) {
168168
webhooks = webhooksBuilder;
169169
}
170170

171-
private State(Builder builder) {
172-
super(builder);
173-
174-
capabilities = builder.capabilities;
175-
webhooks = builder.webhooks;
176-
}
177-
178-
public static final class Builder extends SetCommand.Builder {
179-
private final List<Property<SupportedCapability>> capabilities = new ArrayList<>();
180-
private final List<Property<Webhook>> webhooks = new ArrayList<>();
181-
171+
public static final class Builder extends SetCommand.Builder<Builder> {
182172
public Builder() {
183173
super(IDENTIFIER);
184174
}
185175

186176
public State build() {
187-
return new State(this);
177+
SetCommand baseSetCommand = super.build();
178+
Command resolved = CommandResolver.resolve(baseSetCommand.getByteArray());
179+
return (State) resolved;
188180
}
189181

190182
/**
@@ -194,7 +186,6 @@ public State build() {
194186
* @return The builder
195187
*/
196188
public Builder setCapabilities(Property<SupportedCapability>[] capabilities) {
197-
this.capabilities.clear();
198189
for (int i = 0; i < capabilities.length; i++) {
199190
addCapability(capabilities[i]);
200191
}
@@ -211,7 +202,6 @@ public Builder setCapabilities(Property<SupportedCapability>[] capabilities) {
211202
public Builder addCapability(Property<SupportedCapability> capability) {
212203
capability.setIdentifier(PROPERTY_CAPABILITIES);
213204
addProperty(capability);
214-
capabilities.add(capability);
215205
return this;
216206
}
217207

@@ -222,7 +212,6 @@ public Builder addCapability(Property<SupportedCapability> capability) {
222212
* @return The builder
223213
*/
224214
public Builder setWebhooks(Property<Webhook>[] webhooks) {
225-
this.webhooks.clear();
226215
for (int i = 0; i < webhooks.length; i++) {
227216
addWebhook(webhooks[i]);
228217
}
@@ -238,7 +227,6 @@ public Builder setWebhooks(Property<Webhook>[] webhooks) {
238227
public Builder addWebhook(Property<Webhook> webhook) {
239228
webhook.setIdentifier(PROPERTY_WEBHOOKS);
240229
addProperty(webhook);
241-
webhooks.add(webhook);
242230
return this;
243231
}
244232
}

0 commit comments

Comments
 (0)