Skip to content

Commit

Permalink
update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Jun 9, 2023
1 parent 07fa31b commit 5e4f36c
Showing 1 changed file with 70 additions and 5 deletions.
75 changes: 70 additions & 5 deletions boards/rp2040deviceconfig.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,57 @@
],
"type": "object"
},
"MotionConfig": {
"additionalProperties": false,
"properties": {
"#": {
"description": "All fields starting with '#' arg ignored",
"type": "string"
},
"activeLow": {
"description": "When set, the sensor is considered 'active' when `pin` is low.",
"type": "boolean"
},
"angle": {
"default": 120,
"description": "Sensing angle in degrees.",
"type": "integer"
},
"minDistance": {
"default": 1200,
"description": "Maximum sensing distance in centimeters.",
"type": "integer"
},
"name": {
"description": "Instance/role name to be assigned to service.",
"examples": [
"buttonA",
"activityLed"
],
"type": "string"
},
"pin": {
"description": "The input pin.",
"type": "integer"
},
"service": {
"enum": [
"motion"
],
"type": "string"
},
"variant": {
"description": "Service variant (see service definition for possible values).",
"type": "integer"
}
},
"required": [
"name",
"pin",
"service"
],
"type": "object"
},
"PinLabels": {
"additionalProperties": false,
"description": "Typical pin labels, others are allowed.\nPin labels starting with '@' are hidden to the user.",
Expand Down Expand Up @@ -1341,6 +1392,9 @@
{
"$ref": "#/definitions/PowerConfig"
},
{
"$ref": "#/definitions/MotionConfig"
},
{
"$ref": "#/definitions/LightBulbConfig"
},
Expand Down Expand Up @@ -1706,6 +1760,13 @@
"$schema": {
"type": "string"
},
"$services": {
"description": "Services to expose via `startXYZ()` API. Each starts with { \"service\": \"...\" }",
"items": {
"$ref": "#/definitions/ServiceConfig"
},
"type": "array"
},
"@name": {
"description": "Name of the program, derived from package.json. Exposed as `program_name` register.",
"type": "string"
Expand All @@ -1729,6 +1790,10 @@
],
"type": "string"
},
"devNetwork": {
"description": "Don't start internal cloud adapter service (including the WiFi adapter) and instead use one running\non the computer connected via USB.",
"type": "boolean"
},
"i2c": {
"$ref": "#/definitions/I2CConfig"
},
Expand All @@ -1741,10 +1806,6 @@
"log": {
"$ref": "#/definitions/LogConfig"
},
"noScanI2C": {
"description": "When set to true, disables automatic I2C bus scanning at startup.\nSet if you want to use your own I2C drivers.",
"type": "boolean"
},
"pins": {
"$ref": "#/definitions/PinLabels"
},
Expand All @@ -1759,8 +1820,12 @@
"$ref": "#/definitions/Record<string,0|1>",
"description": "Initial values for pins."
},
"scanI2C": {
"description": "Enable legacy auto-scan for I2C devices.",
"type": "boolean"
},
"services": {
"description": "Services to mount. Each starts with { \"service\": \"...\" }",
"description": "Services to mount. Each starts with { \"service\": \"...\" }\nThis should not be present in .board.json files.",
"items": {
"$ref": "#/definitions/ServiceConfig"
},
Expand Down

0 comments on commit 5e4f36c

Please sign in to comment.