Skip to content

Commit

Permalink
Merge pull request #488 from smartdevicelink/bugfix/release-1.5-prep
Browse files Browse the repository at this point in the history
Version 1.5 Release Prep
  • Loading branch information
renonick87 authored Oct 7, 2021
2 parents a717391 + 7a7abde commit 809f48c
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/js/src/manager/lifecycle/_LifecycleManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ class _LifecycleManager {
}
}

_LifecycleManager.MAX_RPC_VERSION = new Version(7, 1, 0);
_LifecycleManager.MAX_RPC_VERSION = new Version(8, 0, 0);
_LifecycleManager.REGISTER_APP_INTERFACE_CORRELATION_ID = 65529;
_LifecycleManager.UNREGISTER_APP_INTERFACE_CORRELATION_ID = 65530;

Expand Down
68 changes: 61 additions & 7 deletions lib/js/src/rpc/structs/TireStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ class TireStatus extends RpcStruct {
* @returns {WarningLightStatus} - the KEY_PRESSURE_TELLTALE value
*/
getPressureTelltale () {
return this.getObject(WarningLightStatus, TireStatus.KEY_PRESSURE_TELLTALE);
let warningLightStatus = this.getObject(WarningLightStatus, TireStatus.KEY_PRESSURE_TELLTALE);
if (warningLightStatus === null) {
warningLightStatus = WarningLightStatus.WLS_NOT_USED;
this.setParameter(TireStatus.KEY_PRESSURE_TELLTALE, warningLightStatus);
console.warn('TireStatus\'s pressureTelltale was null and will be set to WarningLightStatus.WLS_NOT_USED. In the future, this will change to be nullable.');
}
return warningLightStatus;
}

/**
Expand All @@ -86,7 +92,15 @@ class TireStatus extends RpcStruct {
* @returns {SingleTireStatus} - the KEY_LEFT_FRONT value
*/
getLeftFront () {
return this.getObject(SingleTireStatus, TireStatus.KEY_LEFT_FRONT);
let tireStatus = this.getObject(SingleTireStatus, TireStatus.KEY_LEFT_FRONT);
if (tireStatus === null) {
tireStatus = new SingleTireStatus({
status: 'UNKNOWN',
});
this.setParameter(TireStatus.KEY_LEFT_FRONT, tireStatus);
console.warn('TireStatus\'s leftFront was null and will have its status set to UNKNOWN. In the future, this will change to be nullable.');
}
return tireStatus;
}

/**
Expand All @@ -106,7 +120,15 @@ class TireStatus extends RpcStruct {
* @returns {SingleTireStatus} - the KEY_RIGHT_FRONT value
*/
getRightFront () {
return this.getObject(SingleTireStatus, TireStatus.KEY_RIGHT_FRONT);
let tireStatus = this.getObject(SingleTireStatus, TireStatus.KEY_RIGHT_FRONT);
if (tireStatus === null) {
tireStatus = new SingleTireStatus({
status: 'UNKNOWN',
});
this.setParameter(TireStatus.KEY_RIGHT_FRONT, tireStatus);
console.warn('TireStatus\'s rightFront was null and will have its status set to UNKNOWN. In the future, this will change to be nullable.');
}
return tireStatus;
}

/**
Expand All @@ -126,7 +148,15 @@ class TireStatus extends RpcStruct {
* @returns {SingleTireStatus} - the KEY_LEFT_REAR value
*/
getLeftRear () {
return this.getObject(SingleTireStatus, TireStatus.KEY_LEFT_REAR);
let tireStatus = this.getObject(SingleTireStatus, TireStatus.KEY_LEFT_REAR);
if (tireStatus === null) {
tireStatus = new SingleTireStatus({
status: 'UNKNOWN',
});
this.setParameter(TireStatus.KEY_LEFT_REAR, tireStatus);
console.warn('TireStatus\'s leftRear was null and will have its status set to UNKNOWN. In the future, this will change to be nullable.');
}
return tireStatus;
}

/**
Expand All @@ -146,7 +176,15 @@ class TireStatus extends RpcStruct {
* @returns {SingleTireStatus} - the KEY_RIGHT_REAR value
*/
getRightRear () {
return this.getObject(SingleTireStatus, TireStatus.KEY_RIGHT_REAR);
let tireStatus = this.getObject(SingleTireStatus, TireStatus.KEY_RIGHT_REAR);
if (tireStatus === null) {
tireStatus = new SingleTireStatus({
status: 'UNKNOWN',
});
this.setParameter(TireStatus.KEY_RIGHT_REAR, tireStatus);
console.warn('TireStatus\'s rightRear was null and will have its status set to UNKNOWN. In the future, this will change to be nullable.');
}
return tireStatus;
}

/**
Expand All @@ -166,7 +204,15 @@ class TireStatus extends RpcStruct {
* @returns {SingleTireStatus} - the KEY_INNER_LEFT_REAR value
*/
getInnerLeftRear () {
return this.getObject(SingleTireStatus, TireStatus.KEY_INNER_LEFT_REAR);
let tireStatus = this.getObject(SingleTireStatus, TireStatus.KEY_INNER_LEFT_REAR);
if (tireStatus === null) {
tireStatus = new SingleTireStatus({
status: 'UNKNOWN',
});
this.setParameter(TireStatus.KEY_INNER_LEFT_REAR, tireStatus);
console.warn('TireStatus\'s innerLeftRear was null and will have its status set to UNKNOWN. In the future, this will change to be nullable.');
}
return tireStatus;
}

/**
Expand All @@ -186,7 +232,15 @@ class TireStatus extends RpcStruct {
* @returns {SingleTireStatus} - the KEY_INNER_RIGHT_REAR value
*/
getInnerRightRear () {
return this.getObject(SingleTireStatus, TireStatus.KEY_INNER_RIGHT_REAR);
let tireStatus = this.getObject(SingleTireStatus, TireStatus.KEY_INNER_RIGHT_REAR);
if (tireStatus === null) {
tireStatus = new SingleTireStatus({
status: 'UNKNOWN',
});
this.setParameter(TireStatus.KEY_INNER_RIGHT_REAR, tireStatus);
console.warn('TireStatus\'s innerRightRear was null and will have its status set to UNKNOWN. In the future, this will change to be nullable.');
}
return tireStatus;
}
}

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sdl_javascript_suite",
"version": "1.4.0",
"version": "1.5.0",
"description": "The official JavaScript SDK for SmartDeviceLink.",
"main": "/lib/js/dist/SDL.js",
"engines": {
Expand Down

0 comments on commit 809f48c

Please sign in to comment.