From f266d3b3db5d7470a103d86dd92cb8752b30cbf9 Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 2 Nov 2023 20:48:16 +0100 Subject: [PATCH] add iic sensors to cibuild --- webinstall/build.yaml | 77 +++++++++++++++++++++++++++++++++++++++++-- webinstall/cibuild.js | 3 ++ 2 files changed, 78 insertions(+), 2 deletions(-) diff --git a/webinstall/build.yaml b/webinstall/build.yaml index c970bd8..f0575f9 100644 --- a/webinstall/build.yaml +++ b/webinstall/build.yaml @@ -343,8 +343,80 @@ types: max: 255 + - &iicsensors + type: checkbox + label: I2C + key: i2c + description: 'I2C Bus #1' + values: + - key: true + children: + - <<: *gpiopin + label: SDA + key: sda + mandatory: true + target: "define:GWIIC_SDA" + - <<: *gpiopin + label: SCL + key: scl + mandatory: true + target: "define:GWIIC_SCL" + - type: checkbox + label: SHT3X + description: "SHT30 temperature and humidity sensor" + key: sht3x + values: + - key: true + children: + - type: select + label: address + key: address + target: "define:GWSHT3X" + mandatory: true + default: 68 + values: + - label: "default(0x44 - L)" + value: 68 + - label: "opt(0x45 - H)" + value: 69 + - type: checkbox + label: QMP6988 + description: "QMP6988 pressure sensor" + key: qmp6988 + values: + - key: true + children: + - type: select + label: address + key: address + target: "define:GWQMP6988" + mandatory: true + default: 86 + values: + - label: "default(0x56 - H)" + value: 86 + - label: "opt(0x70 - L)" + value: 112 + + - type: checkbox + label: BME280 + description: "BME280 temperature/humidity/pressure sensor" + key: bme280 + values: + - key: true + children: + - type: select + label: address + key: address + target: "define:GWBME280" + mandatory: true + default: 118 + values: + - label: "default(0x76 - L)" + value: 118 + - label: "opt(0x77 - nc)" + value: 119 - resources: default: &esp32default @@ -395,4 +467,5 @@ config: - *serial2 - *can - *resetButton - - *led \ No newline at end of file + - *led + - *iicsensors \ No newline at end of file diff --git a/webinstall/cibuild.js b/webinstall/cibuild.js index 9c7d7cb..94a8fcc 100644 --- a/webinstall/cibuild.js +++ b/webinstall/cibuild.js @@ -357,6 +357,9 @@ class PipelineInfo{ */ const buildSelector=(parent,cfgBase,name,current,callback)=>{ let config=expandObject(cfgBase); + if (current === undefined && config.default !== undefined){ + current=config.default; + } let rep=new RegExp("[^"+SEPARATOR+"]*","g"); let level=name.replace(rep,''); let frame=addEl('div','selector level'+level.length+' t'+config.type,parent);