diff --git a/schemas/bambulab/v1/report.schema.json b/schemas/bambulab/v1/report.schema.json index d357f83..365cfc4 100644 --- a/schemas/bambulab/v1/report.schema.json +++ b/schemas/bambulab/v1/report.schema.json @@ -26,6 +26,7 @@ "print": { "oneOf": [ { "$ref": "report/print/ams_change_filament.schema.json" }, + { "$ref": "report/print/calibration.schema.json" }, { "$ref": "report/print/ams_control.schema.json" }, { "$ref": "report/print/ams_filament_setting.schema.json" }, { "$ref": "report/print/ams_get_rfid.schema.json" }, diff --git a/schemas/bambulab/v1/report/print/calibration.schema.json b/schemas/bambulab/v1/report/print/calibration.schema.json new file mode 100644 index 0000000..fac6c53 --- /dev/null +++ b/schemas/bambulab/v1/report/print/calibration.schema.json @@ -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/v1/report/print/calibration.schema.json", + "title": "CalibrationReport", + "description": "The direct reply to request/print/calibration.schema.json - both BambuMQTT versions respond this way (v2 has its own identical report/print/calibration.schema.json). The printer still also sends ordinary `push_status` updates reflecting calibration progress alongside this report, e.g. `{ \"mc_print_stage\": 2, \"gcode_state\": \"RUNNING\", \"gcode_file_prepare_percent\": 100, \"subtask_name\": \"auto_cali_for_user_param.gcode\", \"gcode_file\": \"auto_cali_for_user_param.gcode\", \"print_type\": \"system\" }` - the same way any other print job in progress does, not a substitute for this report.", + "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"] + } + ] +} diff --git a/schemas/bambulab/v1/request/print/calibration.schema.json b/schemas/bambulab/v1/request/print/calibration.schema.json index 3d2e15d..d24930d 100644 --- a/schemas/bambulab/v1/request/print/calibration.schema.json +++ b/schemas/bambulab/v1/request/print/calibration.schema.json @@ -2,7 +2,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/print/calibration.schema.json", "title": "CalibrationRequest", - "description": "Printer responds with `push_status` instead of `calibration` with following fields set: `{ \"mc_print_stage\": 2, \"gcode_state\": \"RUNNING\", \"gcode_file_prepare_percent\": 100, \"subtask_name\": \"auto_cali_for_user_param.gcode\", \"gcode_file\": \"auto_cali_for_user_param.gcode\", \"print_type\": \"system\" }`", + "description": "The printer responds with a dedicated `calibration` report (see request/print/calibration.schema.json's report/ counterpart) - not, as previously documented here, `push_status` in place of one. It still also sends ordinary `push_status` updates reflecting calibration progress alongside that report, e.g. `{ \"mc_print_stage\": 2, \"gcode_state\": \"RUNNING\", \"gcode_file_prepare_percent\": 100, \"subtask_name\": \"auto_cali_for_user_param.gcode\", \"gcode_file\": \"auto_cali_for_user_param.gcode\", \"print_type\": \"system\" }` - the same way any other print job in progress does, not a `calibration`-specific substitute for one.", "allOf": [ { "$ref": "../../../common/envelope.schema.json" }, { diff --git a/schemas/bambulab/v2/report/print/calibration.schema.json b/schemas/bambulab/v2/report/print/calibration.schema.json index 93a1a5e..3bec019 100644 --- a/schemas/bambulab/v2/report/print/calibration.schema.json +++ b/schemas/bambulab/v2/report/print/calibration.schema.json @@ -2,7 +2,7 @@ "$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\"}`", + "description": "The direct reply to request/print/calibration.schema.json - both BambuMQTT versions respond this way (v1 has its own identical report/print/calibration.schema.json; earlier versions of this description incorrectly claimed v1 differed here). The printer still also sends ordinary `push_status` updates reflecting calibration progress alongside this report, e.g. `{\"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\"}` - the same way any other print job in progress does, not a substitute for this report.", "allOf": [ { "$ref": "../../../common/envelope.schema.json" }, {