@ray-js/lamp-schedule-core 1.0.0-beta-3 → 1.0.0-beta-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dpParser/rtcTimer.js +5 -4
- package/package.json +1 -1
package/lib/dpParser/rtcTimer.js
CHANGED
|
@@ -225,9 +225,10 @@ export class RtcTimerFormatter {
|
|
|
225
225
|
*/
|
|
226
226
|
if (_dps[EDpCodes.switch_led] === false) {
|
|
227
227
|
dpDataStr = '00';
|
|
228
|
-
} else if (Object.keys(_dps).includes(EDpCodes.colour_data) && Object.keys(_dps).includes(EDpCodes.
|
|
228
|
+
} else if (Object.keys(_dps).includes(EDpCodes.colour_data) && Object.keys(_dps).includes(EDpCodes.bright_value)) {
|
|
229
|
+
var _dps$EDpCodes$temp_va;
|
|
229
230
|
const bright_value = _dps[EDpCodes.bright_value];
|
|
230
|
-
const temp_value = _dps[EDpCodes.temp_value];
|
|
231
|
+
const temp_value = (_dps$EDpCodes$temp_va = _dps[EDpCodes.temp_value]) !== null && _dps$EDpCodes$temp_va !== void 0 ? _dps$EDpCodes$temp_va : 1000;
|
|
231
232
|
const {
|
|
232
233
|
hue,
|
|
233
234
|
saturation,
|
|
@@ -250,9 +251,9 @@ export class RtcTimerFormatter {
|
|
|
250
251
|
const valueStr = this.to16(value, 2);
|
|
251
252
|
dpDataStr = `03${hueStr}${saturationStr}${valueStr}`;
|
|
252
253
|
} else if (Object.keys(_dps).includes(EDpCodes.bright_value)) {
|
|
253
|
-
var _dps$EDpCodes$bright_, _dps$EDpCodes$
|
|
254
|
+
var _dps$EDpCodes$bright_, _dps$EDpCodes$temp_va2;
|
|
254
255
|
const bright_value = (_dps$EDpCodes$bright_ = _dps[EDpCodes.bright_value]) !== null && _dps$EDpCodes$bright_ !== void 0 ? _dps$EDpCodes$bright_ : 100;
|
|
255
|
-
const temp_value = (_dps$EDpCodes$
|
|
256
|
+
const temp_value = (_dps$EDpCodes$temp_va2 = _dps[EDpCodes.temp_value]) !== null && _dps$EDpCodes$temp_va2 !== void 0 ? _dps$EDpCodes$temp_va2 : 0;
|
|
256
257
|
const brightStr = this.to16(bright_value, 2);
|
|
257
258
|
const temperatureStr = this.to16(temp_value, 2);
|
|
258
259
|
dpDataStr = `02${brightStr}${temperatureStr}`;
|