diff --git a/webinstall/build.yaml b/webinstall/build.yaml index dc7d86e..566e314 100644 --- a/webinstall/build.yaml +++ b/webinstall/build.yaml @@ -131,16 +131,51 @@ types: label: 'Serial 1' key: serial1 values: - - type: frame - key: true + - key: true children: - - <<: *gpiopin - key: RX - target: "define:GWSERIAL_RX" - - <<: *gpiopin - key: TX - target: "define:GWSERIAL_TX" - + - type: select + key: type + target: "define:GWSERIAL_TYPE" + label: "Serial Type" + values: + - key: uni + value: 1 + label: "UNI" + description: "Select direction at Config UI" + children: + - <<: *gpiopin + key: RX + target: "define:GWSERIAL_RX" + - <<: *gpiopin + key: TX + target: "define:GWSERIAL_TX" + - key: bi + value: 2 + label: "BiDir" + description: "Input and Output" + children: + - <<: *gpiopin + key: RX + target: "define:GWSERIAL_RX" + - <<: *gpiopin + key: TX + target: "define:GWSERIAL_TX" + - key: rx + value: 3 + label: "RX" + description: "Input only" + children: + - <<: *gpiopin + key: RX + target: "define:GWSERIAL_RX" + - key: tx + value: 1 + label: "TX" + description: "output only" + children: + - <<: *gpiopin + key: TX + target: "define:GWSERIAL_TX" resources: default: &esp32default serial: 2 diff --git a/webinstall/cibuild.css b/webinstall/cibuild.css index 5411a19..c3ca0e1 100644 --- a/webinstall/cibuild.css +++ b/webinstall/cibuild.css @@ -141,8 +141,8 @@ margin-top: 0.3em; } -.configui .tcheckbox .inputFrame, -.configui .tdropdown .inputFrame { +.configui .tcheckbox>.inputFrame, +.configui .tdropdown>.inputFrame { display: flex; flex-direction: row; align-items: center; diff --git a/webinstall/cibuild.js b/webinstall/cibuild.js index 10a36d3..38589f2 100644 --- a/webinstall/cibuild.js +++ b/webinstall/cibuild.js @@ -303,6 +303,13 @@ class PipelineInfo{ initialConfig=config; } let expandedValues=expandList(config.values,config); + expandedValues.forEach((v)=>{ + if (v.type !== undefined && v.type !== "frame"){ + let err="value element with wrong type "+v.type+" at "+name; + alert(err); + throw new Error(err); + } + }) if (config.type === 'select') { for (let idx=0;idx