220 lines
6.9 KiB
YAML
220 lines
6.9 KiB
YAML
# structure
|
|
# below config we define the structure to be displayed
|
|
# basically there are 2 object types:
|
|
# children - a list of cfg objects that define the inputs to be shown
|
|
# if the parent is selected
|
|
# parameters:
|
|
# key: unique key - defines the name(part) in the cfg
|
|
# if not set a potential "value" is taken
|
|
# null (empty) is a valid key
|
|
# label: title to be shown, if unset key will be used
|
|
# resorce: a resource that is used by the value children
|
|
# simple string use as is
|
|
# string + ':' - add value to the resource
|
|
# type: if empty or 'frame' only the children are considered
|
|
# children: only for type empty or 'frame' - list of child objects
|
|
# target: how the selected child value should be stored:
|
|
# environment - set the environment to the child value
|
|
# define - add -D<childValue> to the flags
|
|
# define:name - add -D<name>=<childValue> to the flags
|
|
# values - a list of value objects for a particular config
|
|
# if the object is just a string it is converted to an object
|
|
# with value being set to the string
|
|
# parameters:
|
|
# key: unique key, defines the name(part) and the value store in cfg
|
|
# for the parent
|
|
# if not set, value is used
|
|
# null (empty) is a valid key
|
|
# value: the value (mandatory)
|
|
# if null the value will be set to undefined and ignored
|
|
# label: text to be shown
|
|
# if not set value will be used
|
|
# description,url
|
|
# resource: for parent-target environment:
|
|
# an object with allowed resource counts
|
|
# for other values: the resource to be counted
|
|
#
|
|
#
|
|
types:
|
|
- &m5base
|
|
type: select
|
|
target: define
|
|
label: 'M5 Atom light Base'
|
|
key: m5lightbase
|
|
values:
|
|
- label: "CAN KIT"
|
|
value: M5_CAN_KIT
|
|
description: "M5 Stack CAN Kit"
|
|
url: "https://docs.m5stack.com/en/atom/atom_can"
|
|
resource: can
|
|
- value: M5_SERIAL_KIT_232
|
|
description: "M5 Stack RS232 Base"
|
|
label: "Atomic RS232 Base"
|
|
url: "https://docs.m5stack.com/en/atom/Atomic%20RS232%20Base"
|
|
resource: serial
|
|
- value: M5_SERIAL_KIT_485
|
|
description: "M5 Stack RS485 Base"
|
|
label: "Atomic RS485 Base"
|
|
url: "https://docs.m5stack.com/en/atom/Atomic%20RS485%20Base"
|
|
resource: serial
|
|
- value: M5_GPS_KIT
|
|
description: "M5 Stack Gps Kit"
|
|
label: "Gps Base"
|
|
url: "https://docs.m5stack.com/en/atom/atomicgps"
|
|
resource: serial
|
|
|
|
- &m5groovei2c
|
|
type: multi
|
|
key: m5groovei2c
|
|
label: "M5 I2C Groove Units"
|
|
values:
|
|
- &m5groovecan
|
|
type: select
|
|
key: m5groovecan
|
|
target: define
|
|
label: "M5 Groove CAN Units"
|
|
values:
|
|
- label: "CAN Unit"
|
|
url: "https://docs.m5stack.com/en/unit/can"
|
|
description: "M5 Can unit"
|
|
value: M5_CANUNIT
|
|
resource: can
|
|
- &m5grooveserial
|
|
type: select
|
|
label: "M5 Groove Serial Unit"
|
|
target: define
|
|
key: m5grooveserial
|
|
values:
|
|
- label: "RS485"
|
|
key: unit485
|
|
value: SERIAL_GROOVE_485
|
|
description: "M5 RS485 unit"
|
|
url: "https://docs.m5stack.com/en/unit/rs485"
|
|
resource: serial
|
|
- label: "Tail485"
|
|
value: SERIAL_GROOVE_485
|
|
key: tail485
|
|
description: "M5 Tail 485"
|
|
url: "https://docs.m5stack.com/en/atom/tail485"
|
|
resource: serial
|
|
- label: "Gps Unit"
|
|
value: M5_GPS_UNIT
|
|
description: "M5 Gps Unit"
|
|
url: "https://docs.m5stack.com/en/unit/gps"
|
|
resource: serial
|
|
|
|
- &m5groove
|
|
type: select
|
|
key: m5groove
|
|
label: 'M5 groove type'
|
|
values:
|
|
- key: 'CAN'
|
|
children:
|
|
- *m5groovecan
|
|
- key: 'I2C'
|
|
children:
|
|
- *m5groovei2c
|
|
- key: 'Serial'
|
|
children:
|
|
- *m5grooveserial
|
|
- &gpiopin
|
|
type: dropdown
|
|
resource: "gpio:"
|
|
values:
|
|
- {label: unset,value:}
|
|
- 0
|
|
- 1
|
|
- 2
|
|
|
|
- &serial1
|
|
type: checkbox
|
|
label: 'Serial 1'
|
|
key: serial1
|
|
values:
|
|
- key: true
|
|
children:
|
|
- 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"
|
|
mandatory: true
|
|
- <<: *gpiopin
|
|
key: TX
|
|
target: "define:GWSERIAL_TX"
|
|
mandatory: true
|
|
- key: bi
|
|
value: 2
|
|
label: "BiDir"
|
|
description: "Input and Output"
|
|
children:
|
|
- <<: *gpiopin
|
|
key: RX
|
|
target: "define:GWSERIAL_RX"
|
|
mandatory: true
|
|
- <<: *gpiopin
|
|
key: TX
|
|
target: "define:GWSERIAL_TX"
|
|
mandatory: true
|
|
- key: rx
|
|
value: 3
|
|
label: "RX"
|
|
description: "Input only"
|
|
children:
|
|
- <<: *gpiopin
|
|
key: RX
|
|
target: "define:GWSERIAL_RX"
|
|
mandatory: true
|
|
- key: tx
|
|
value: 1
|
|
label: "TX"
|
|
description: "output only"
|
|
children:
|
|
- <<: *gpiopin
|
|
key: TX
|
|
target: "define:GWSERIAL_TX"
|
|
mandatory: true
|
|
resources:
|
|
default: &esp32default
|
|
serial: 2
|
|
can: 1
|
|
i2c: 1
|
|
gpio: 1
|
|
|
|
config:
|
|
children:
|
|
- type: select
|
|
target: environment
|
|
label: 'Board'
|
|
key: board
|
|
values:
|
|
- value: m5stack-atom-generic
|
|
label: m5stack-atom
|
|
description: "M5 Stack Atom light"
|
|
url: "http://docs.m5stack.com/en/core/atom_lite"
|
|
resource: *esp32default
|
|
children:
|
|
- *m5base
|
|
- *m5groove
|
|
- value: m5stack-atoms3-generic
|
|
label: m5stack-atoms3
|
|
description: "M5 Stack AtomS3 light"
|
|
url: "http://docs.m5stack.com/en/core/AtomS3%20Lite"
|
|
resource: *esp32default
|
|
children:
|
|
- *m5base
|
|
- *m5groove
|
|
- value: nodemcu-generic
|
|
label: nodemcu
|
|
description: "Node mcu"
|
|
resource: *esp32default
|
|
children:
|
|
- *serial1 |