feat: Added new schemas
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/print/calibration.schema.json",
|
||||
"title": "CalibrationReport",
|
||||
"description": "In contrast to Bambu MQTT v1, printer responds with `calibration` command, however it will still send `push_status` with following fields set: `{\"subtask_name\":\"auto_cali_for_user_param.gcode\",\"file\":\"/usr/etc/print/O1C2/auto_cali_for_user_param.gcode\",\"gcode_file\":\"/usr/etc/print/O1C2/auto_cali_for_user_param.gcode\",\"gcode_file_prepare_percent\":\"100\",\"gcode_state\":\"FAILED\",\"mc_print_stage\":\"1\"}`",
|
||||
"allOf": [
|
||||
{ "$ref": "../../../common/envelope.schema.json" },
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"command": { "const": "calibration" },
|
||||
"option": {
|
||||
"description": "Following bitmask is required for the `option` field: `if (lidarCalibration) bitmask |= 1; if (bedLevelling) bitmask |= 1 << 1; if (vibrationCompensation) bitmask |= 1 << 2; if (motorCancellation) bitmask |= 1 << 3;`",
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 15
|
||||
}
|
||||
},
|
||||
"required": ["option"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/print/gcode_file.schema.json",
|
||||
"title": "GcodeFileRequest",
|
||||
"allOf": [
|
||||
{ "$ref": "../../../common/envelope.schema.json" },
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"command": { "const": "gcode_file" },
|
||||
"param": { "description": "Full path to GCODE file in printer's FS", "type": "string" }
|
||||
},
|
||||
"required": ["param"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/print/gcode_line.schema.json",
|
||||
"title": "GcodeLineReport",
|
||||
"allOf": [
|
||||
{ "$ref": "../../../common/envelope.schema.json" },
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"command": { "const": "gcode_line" },
|
||||
"param": { "description": "use \n for multiple lines", "type": "string" }
|
||||
},
|
||||
"required": ["param"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -60,7 +60,7 @@
|
||||
"fail_reason": { "type": "string" },
|
||||
"file": { "type": "string" },
|
||||
"gcode_file": { "type": "string" },
|
||||
"gcode_state": { "type": "string", "enum": [ "idle", "IDLE", "finish", "FINISH" ] },
|
||||
"gcode_state": { "type": "string", "enum": [ "idle", "IDLE", "finish", "FINISH", "running", "RUNNING" ] },
|
||||
"gcode_file_prepare_percent": { "type": "string" },
|
||||
"force_upgrade": { "type": "boolean" },
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/print/print_speed.schema.json",
|
||||
"title": "PrintSpeedReport",
|
||||
"allOf": [
|
||||
{ "$ref": "../../../common/envelope.schema.json" },
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"command": { "const": "print_speed" },
|
||||
"param": {
|
||||
"description": "1 - silent (50%), 2 - standard (100%), 3 - sport (124%), 4 - ludicrous (166%)",
|
||||
"type": "string",
|
||||
"enum": ["1", "2", "3", "4"]
|
||||
}
|
||||
},
|
||||
"required": ["param"]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user