Skip to content

Commit

Permalink
Added basic schema's
Browse files Browse the repository at this point in the history
Signed-off-by: thenetworkgrinch <thenetworkgrinch@users.noreply.github.com>
  • Loading branch information
thenetworkgrinch committed Jan 8, 2025
1 parent 3599c91 commit 196e630
Show file tree
Hide file tree
Showing 5 changed files with 306 additions and 1 deletion.
33 changes: 33 additions & 0 deletions docs/schemas/controllerproperties_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://broncbotz3481.github.io/YAGSL-Example/schemas/controllerproperties_schema.json",
"description": "",
"type": "object",
"properties": {
"angleJoystickRadiusDeadband": {
"type": "number"
},
"heading": {
"type": "object",
"properties": {
"p": {
"type": "number"
},
"i": {
"type": "number"
},
"d": {
"type": "number"
}
},
"required": [
"p",
"i",
"d"
]
}
},
"required": [
"angleJoystickRadiusDeadband",
"heading"
]
}
114 changes: 114 additions & 0 deletions docs/schemas/module_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"$schema": "https://broncbotz3481.github.io/YAGSL-Example/schemas/module_schema.json",
"description": "",
"type": "object",
"properties": {
"drive": {
"type": "object",
"properties": {
"type": {
"type": "string",
"minLength": 1
},
"id": {
"type": "number"
},
"canbus": {
"type": "object",
"properties": {},
"required": []
}
},
"required": [
"type",
"id",
"canbus"
]
},
"angle": {
"type": "object",
"properties": {
"type": {
"type": "string",
"minLength": 1
},
"id": {
"type": "number"
},
"canbus": {
"type": "object",
"properties": {},
"required": []
}
},
"required": [
"type",
"id",
"canbus"
]
},
"encoder": {
"type": "object",
"properties": {
"type": {
"type": "string",
"minLength": 1
},
"id": {
"type": "number"
},
"canbus": {
"type": "object",
"properties": {},
"required": []
}
},
"required": [
"type",
"id",
"canbus"
]
},
"inverted": {
"type": "object",
"properties": {
"drive": {
"type": "boolean"
},
"angle": {
"type": "boolean"
}
},
"required": [
"drive",
"angle"
]
},
"absoluteEncoderOffset": {
"type": "number"
},
"location": {
"type": "object",
"properties": {
"front": {
"type": "number"
},
"left": {
"type": "number"
}
},
"required": [
"front",
"left"
]
}
},
"required": [
"drive",
"angle",
"encoder",
"inverted",
"absoluteEncoderOffset",
"location"
]
}
93 changes: 93 additions & 0 deletions docs/schemas/physicalproperties_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"$schema": "https://broncbotz3481.github.io/YAGSL-Example/schemas/physicalproperties_schema.json",
"description": "",
"type": "object",
"properties": {
"conversionFactors": {
"type": "object",
"properties": {
"angle": {
"type": "object",
"properties": {
"gearRatio": {
"type": "number"
},
"factor": {
"type": "number"
}
},
"required": [
"gearRatio",
"factor"
]
},
"drive": {
"type": "object",
"properties": {
"gearRatio": {
"type": "number"
},
"diameter": {
"type": "number"
},
"factor": {
"type": "number"
}
},
"required": [
"gearRatio",
"diameter",
"factor"
]
}
},
"required": [
"angle",
"drive"
]
},
"currentLimit": {
"type": "object",
"properties": {
"drive": {
"type": "number"
},
"angle": {
"type": "number"
}
},
"required": [
"drive",
"angle"
]
},
"rampRate": {
"type": "object",
"properties": {
"drive": {
"type": "number"
},
"angle": {
"type": "number"
}
},
"required": [
"drive",
"angle"
]
},
"wheelGripCoefficientOfFriction": {
"type": "number"
},
"optimalVoltage": {
"type": "number"
}
},
"required": [
"conversionFactors",
"currentLimit",
"rampRate",
"wheelGripCoefficientOfFriction",
"optimalVoltage"
]
}
65 changes: 65 additions & 0 deletions docs/schemas/pidfproperties_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"$schema": "https://broncbotz3481.github.io/YAGSL-Example/schemas/pidfproperties_schema.json",
"description": "",
"type": "object",
"properties": {
"drive": {
"type": "object",
"properties": {
"p": {
"type": "number"
},
"i": {
"type": "number"
},
"d": {
"type": "number"
},
"f": {
"type": "number"
},
"iz": {
"type": "number"
}
},
"required": [
"p",
"i",
"d",
"f",
"iz"
]
},
"angle": {
"type": "object",
"properties": {
"p": {
"type": "number"
},
"i": {
"type": "number"
},
"d": {
"type": "number"
},
"f": {
"type": "number"
},
"iz": {
"type": "number"
}
},
"required": [
"p",
"i",
"d",
"f",
"iz"
]
}
},
"required": [
"drive",
"angle"
]
}
2 changes: 1 addition & 1 deletion docs/schemas/swervedrive_schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "https://broncbotz3481.github.io/YAGSL-Example/schemas/swervedrive_schema.json",
"description": "",
"type": "object",
"properties": {
Expand Down

0 comments on commit 196e630

Please sign in to comment.