From 37fdee135374ed62101c4b15e61433d6ce7fa045 Mon Sep 17 00:00:00 2001 From: cc Date: Mon, 11 Mar 2024 10:38:02 +0800 Subject: [PATCH] demo1 --- src/js/INNcom.js | 6 +++++- src/views/X10.vue | 19 +++++++++++++++++++ x10.c | 5 +++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/js/INNcom.js b/src/js/INNcom.js index 22b3481..05e5319 100644 --- a/src/js/INNcom.js +++ b/src/js/INNcom.js @@ -45,8 +45,12 @@ export const DIGITAL_INPUT_FUNCTION = { export const DIGITAL_OUTPUT_FUNCTION = { Null: "空", - DigitalOutput: "普通输出", LightOutput: "灯光输出", + DND: "DND", + MUR: "MUR", + DOOR_BELL:"门铃", + OCCUPANCY: "占用状态", + DigitalOutput: "手动配置输出", }; export const VIRTUAL_OUTPUT_FUNCTION = { diff --git a/src/views/X10.vue b/src/views/X10.vue index 30fef13..f4472b5 100644 --- a/src/views/X10.vue +++ b/src/views/X10.vue @@ -365,6 +365,20 @@ const onSubmit = () => { let code73 = ''; Object.values(device.DIGITAL_OUTPUT).forEach((dix) => { switch (dix.Func) { + case 'OCCUPANCY': + code72 += `REG_HELPER_Output_PI5_Bit(${dix.Pin}, PI5IDX_OCCUPANCY, (PI5M_OCCUPANCY_STAFF|PI5M_OCCUPANCY_GUEST), CBL32_DO_DRIVER_CONF_DEFAULT);\n ` + break; + case 'MUR': + code72 += `REG_HELPER_Output_PI5_Bit(${dix.Pin}, PI5IDX_MISC_MSMD, PI5M_MUR, CBL32_DO_DRIVER_CONF_DEFAULT);\n ` + break; + case 'DOOR_BELL': + code72 += `REG_HELPER_Output_PI5_Bit(${dix.Pin}, PI5IDX_MISC_MSMD, CBL32_DO_FCT_GRP_SPECIAL_IDX_DOOR_BELL, CBL32_DO_DRIVER_CONF_DEFAULT);\n ` + break; + case 'DND': + code72 += `REG_HELPER_Output_PI5_Bit(${dix.Pin}, PI5IDX_MISC_MSMD, PI5M_DND, CBL32_DO_DRIVER_CONF_DEFAULT);\n ` + break; + + case 'DigitalOutput': code72 += `REG_HELPER_Output_PI5_Bit(${dix.Pin}, ${dix.PI5_Ofs}, ${dix.BitMask}, ${dix.ConfFlags});\n ` break; @@ -442,6 +456,11 @@ const onSubmit = () => { #define P5_ADDRESS \ ${ device.ADDR } +#define APP_ID_1 9 +#define APP_ID_2 9 +#define APP_ID_3 4 +#define APP_ID_4 4 + //********************************************************************************************************************** // Constants //********************************************************************************************************************** diff --git a/x10.c b/x10.c index 84aac93..57fe75f 100644 --- a/x10.c +++ b/x10.c @@ -20,6 +20,11 @@ #define P5_ADDRESS \ ${ device.ADDR } +#define APP_ID_1 9 +#define APP_ID_2 9 +#define APP_ID_3 4 +#define APP_ID_4 4 + //********************************************************************************************************************** // Constants //**********************************************************************************************************************