Read Midra crop controls when validating input switches
Gitea/canvas-pilot/pipeline/head This commit looks good
Details
Gitea/canvas-pilot/pipeline/head This commit looks good
Details
This commit is contained in:
parent
28f5709b94
commit
ef8fcf90e8
|
|
@ -602,7 +602,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "canvas-pilot"
|
||||
version = "0.10.0-rc.3"
|
||||
version = "0.10.0-rc.4"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"craft-dwg",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ default-members = ["crates/canvas-pilot"]
|
|||
resolver = "3"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.10.0-rc.3"
|
||||
version = "0.10.0-rc.4"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
repository = "https://proxy.dandaedre.com/gitea/idle-org/canvas-pilot"
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ impl Plan {
|
|||
if snapshot.profile == device::Profile::Midra4k {
|
||||
for edge in ["left", "right", "top", "bottom"] {
|
||||
if settings
|
||||
.pointer(&format!("/settings/cropping/status/pp/{edge}"))
|
||||
.pointer(&format!("/settings/cropping/control/pp/{edge}"))
|
||||
.and_then(Value::as_f64)
|
||||
.ok_or("Input crop status unavailable; refresh before switching input.")?
|
||||
!= 0.
|
||||
|
|
@ -718,7 +718,7 @@ mod tests {
|
|||
"status":{"pp":{"isAvailable":true,"plug":"HDMI"}},
|
||||
"plugList":{"items":{"HDMI":{
|
||||
"status":{"signal":{"pp":{"isValid":true,"imageWidth":1920,"imageHeight":1080}}},
|
||||
"settings":{"cropping":{"status":{"pp":{"left":0,"right":0,"top":0,"bottom":0}}},
|
||||
"settings":{"cropping":{"control":{"pp":{"left":0,"right":0,"top":0,"bottom":0}}},
|
||||
"aspect":{"pp":{"signal":"NATIVE","transformTo":"SIGNAL"}}}
|
||||
}}}
|
||||
}}});
|
||||
|
|
@ -769,8 +769,26 @@ mod tests {
|
|||
)
|
||||
.is_err()
|
||||
);
|
||||
// Midra has no cropping/status branch. Missing or malformed control data
|
||||
// must still fail closed instead of being treated as an uncropped input.
|
||||
for value in [Value::Null, json!("unknown")] {
|
||||
let mut incomplete = state.clone();
|
||||
incomplete.raw["device"]["inputList"]["items"]["INPUT_5"]["plugList"]["items"]["HDMI"]
|
||||
["settings"]["cropping"]["control"]["pp"]["left"] = value;
|
||||
let error = Plan::prepare_with_inputs(
|
||||
&incomplete,
|
||||
&editor,
|
||||
0,
|
||||
&mappings,
|
||||
Target::Preview,
|
||||
Sizing::OutputBox,
|
||||
&[(2, 5)].into(),
|
||||
)
|
||||
.unwrap_err();
|
||||
assert!(error.contains("Input crop status unavailable"));
|
||||
}
|
||||
state.raw["device"]["inputList"]["items"]["INPUT_5"]["plugList"]["items"]["HDMI"]["settings"]
|
||||
["cropping"]["status"]["pp"]["left"] = json!(12);
|
||||
["cropping"]["control"]["pp"]["left"] = json!(12);
|
||||
assert!(
|
||||
Plan::prepare_with_inputs(
|
||||
&state,
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
### v0.10.0-rc.4
|
||||
|
||||
- Fix Midra layer input switching reading the wrong input crop path. Validate
|
||||
Midra crop controls rather than Aquilon crop status; missing or malformed data
|
||||
still blocks switching, as do active crop and aspect correction.
|
||||
|
||||
### v0.10.0-rc.3
|
||||
|
||||
- Use stable selectable rows and a subtle background hover in device input
|
||||
|
|
|
|||
Loading…
Reference in New Issue