- 积分
- 295
- 金钱
- 248
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
中级会员
 
- 积分
- 295
- 金钱
- 248
- HASS币
- 0
|
发表于 2020-7-3 14:40:23
|
显示全部楼层
大神 能帮忙解释下这段怎么来的么
if ([1, 2].includes(msg.data.presentValue)) {
const mapping = {41: 'left', 42: 'center', 43: 'right'};
const times = {1: 'single', 2: 'double', 3: 'triple', 0: 'hold', 255: 'release'};
const button = mapping[msg.endpoint.ID];
return {click: `${button}_${times[msg.data.presentValue]}`};
我这边是零火版的需要怎么改 型号:QBKG26LM |
|