Skip to content

Commit 809f48c

Browse files
authored
Merge pull request #488 from smartdevicelink/bugfix/release-1.5-prep
Version 1.5 Release Prep
2 parents a717391 + 7a7abde commit 809f48c

File tree

4 files changed

+64
-10
lines changed

4 files changed

+64
-10
lines changed

lib/js/src/manager/lifecycle/_LifecycleManager.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ class _LifecycleManager {
580580
}
581581
}
582582

583-
_LifecycleManager.MAX_RPC_VERSION = new Version(7, 1, 0);
583+
_LifecycleManager.MAX_RPC_VERSION = new Version(8, 0, 0);
584584
_LifecycleManager.REGISTER_APP_INTERFACE_CORRELATION_ID = 65529;
585585
_LifecycleManager.UNREGISTER_APP_INTERFACE_CORRELATION_ID = 65530;
586586

lib/js/src/rpc/structs/TireStatus.js

+61-7
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,13 @@ class TireStatus extends RpcStruct {
6666
* @returns {WarningLightStatus} - the KEY_PRESSURE_TELLTALE value
6767
*/
6868
getPressureTelltale () {
69-
return this.getObject(WarningLightStatus, TireStatus.KEY_PRESSURE_TELLTALE);
69+
let warningLightStatus = this.getObject(WarningLightStatus, TireStatus.KEY_PRESSURE_TELLTALE);
70+
if (warningLightStatus === null) {
71+
warningLightStatus = WarningLightStatus.WLS_NOT_USED;
72+
this.setParameter(TireStatus.KEY_PRESSURE_TELLTALE, warningLightStatus);
73+
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.');
74+
}
75+
return warningLightStatus;
7076
}
7177

7278
/**
@@ -86,7 +92,15 @@ class TireStatus extends RpcStruct {
8692
* @returns {SingleTireStatus} - the KEY_LEFT_FRONT value
8793
*/
8894
getLeftFront () {
89-
return this.getObject(SingleTireStatus, TireStatus.KEY_LEFT_FRONT);
95+
let tireStatus = this.getObject(SingleTireStatus, TireStatus.KEY_LEFT_FRONT);
96+
if (tireStatus === null) {
97+
tireStatus = new SingleTireStatus({
98+
status: 'UNKNOWN',
99+
});
100+
this.setParameter(TireStatus.KEY_LEFT_FRONT, tireStatus);
101+
console.warn('TireStatus\'s leftFront was null and will have its status set to UNKNOWN. In the future, this will change to be nullable.');
102+
}
103+
return tireStatus;
90104
}
91105

92106
/**
@@ -106,7 +120,15 @@ class TireStatus extends RpcStruct {
106120
* @returns {SingleTireStatus} - the KEY_RIGHT_FRONT value
107121
*/
108122
getRightFront () {
109-
return this.getObject(SingleTireStatus, TireStatus.KEY_RIGHT_FRONT);
123+
let tireStatus = this.getObject(SingleTireStatus, TireStatus.KEY_RIGHT_FRONT);
124+
if (tireStatus === null) {
125+
tireStatus = new SingleTireStatus({
126+
status: 'UNKNOWN',
127+
});
128+
this.setParameter(TireStatus.KEY_RIGHT_FRONT, tireStatus);
129+
console.warn('TireStatus\'s rightFront was null and will have its status set to UNKNOWN. In the future, this will change to be nullable.');
130+
}
131+
return tireStatus;
110132
}
111133

112134
/**
@@ -126,7 +148,15 @@ class TireStatus extends RpcStruct {
126148
* @returns {SingleTireStatus} - the KEY_LEFT_REAR value
127149
*/
128150
getLeftRear () {
129-
return this.getObject(SingleTireStatus, TireStatus.KEY_LEFT_REAR);
151+
let tireStatus = this.getObject(SingleTireStatus, TireStatus.KEY_LEFT_REAR);
152+
if (tireStatus === null) {
153+
tireStatus = new SingleTireStatus({
154+
status: 'UNKNOWN',
155+
});
156+
this.setParameter(TireStatus.KEY_LEFT_REAR, tireStatus);
157+
console.warn('TireStatus\'s leftRear was null and will have its status set to UNKNOWN. In the future, this will change to be nullable.');
158+
}
159+
return tireStatus;
130160
}
131161

132162
/**
@@ -146,7 +176,15 @@ class TireStatus extends RpcStruct {
146176
* @returns {SingleTireStatus} - the KEY_RIGHT_REAR value
147177
*/
148178
getRightRear () {
149-
return this.getObject(SingleTireStatus, TireStatus.KEY_RIGHT_REAR);
179+
let tireStatus = this.getObject(SingleTireStatus, TireStatus.KEY_RIGHT_REAR);
180+
if (tireStatus === null) {
181+
tireStatus = new SingleTireStatus({
182+
status: 'UNKNOWN',
183+
});
184+
this.setParameter(TireStatus.KEY_RIGHT_REAR, tireStatus);
185+
console.warn('TireStatus\'s rightRear was null and will have its status set to UNKNOWN. In the future, this will change to be nullable.');
186+
}
187+
return tireStatus;
150188
}
151189

152190
/**
@@ -166,7 +204,15 @@ class TireStatus extends RpcStruct {
166204
* @returns {SingleTireStatus} - the KEY_INNER_LEFT_REAR value
167205
*/
168206
getInnerLeftRear () {
169-
return this.getObject(SingleTireStatus, TireStatus.KEY_INNER_LEFT_REAR);
207+
let tireStatus = this.getObject(SingleTireStatus, TireStatus.KEY_INNER_LEFT_REAR);
208+
if (tireStatus === null) {
209+
tireStatus = new SingleTireStatus({
210+
status: 'UNKNOWN',
211+
});
212+
this.setParameter(TireStatus.KEY_INNER_LEFT_REAR, tireStatus);
213+
console.warn('TireStatus\'s innerLeftRear was null and will have its status set to UNKNOWN. In the future, this will change to be nullable.');
214+
}
215+
return tireStatus;
170216
}
171217

172218
/**
@@ -186,7 +232,15 @@ class TireStatus extends RpcStruct {
186232
* @returns {SingleTireStatus} - the KEY_INNER_RIGHT_REAR value
187233
*/
188234
getInnerRightRear () {
189-
return this.getObject(SingleTireStatus, TireStatus.KEY_INNER_RIGHT_REAR);
235+
let tireStatus = this.getObject(SingleTireStatus, TireStatus.KEY_INNER_RIGHT_REAR);
236+
if (tireStatus === null) {
237+
tireStatus = new SingleTireStatus({
238+
status: 'UNKNOWN',
239+
});
240+
this.setParameter(TireStatus.KEY_INNER_RIGHT_REAR, tireStatus);
241+
console.warn('TireStatus\'s innerRightRear was null and will have its status set to UNKNOWN. In the future, this will change to be nullable.');
242+
}
243+
return tireStatus;
190244
}
191245
}
192246

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sdl_javascript_suite",
3-
"version": "1.4.0",
3+
"version": "1.5.0",
44
"description": "The official JavaScript SDK for SmartDeviceLink.",
55
"main": "/lib/js/dist/SDL.js",
66
"engines": {

0 commit comments

Comments
 (0)