refactor(firmware): simplify configuration and diagnostics

This commit is contained in:
Onur Özkan committed 2026-08-23 00:40:36 +03:00
1 parent ba9c97ed3b
commit fdf82a5114
96 files changed
+1612 -2772

No files matched your search

@@ -1540,15 +1540,15 @@ mod tests {
let descriptor = response(MavMessage::KAPTAN_CONFIG_DESCRIPTOR(
KAPTAN_CONFIG_DESCRIPTOR_DATA {
minimum_bits: 5,
maximum_bits: 6,
default_bits: 6,
minimum_bits: 3,
maximum_bits: 4,
default_bits: 3,
request_id: 2,
descriptor_index: 0,
field_id: 108,
enum_option_count: 2,
display_key: "future.logging.severity".into(),
unit: "MAV_SEVERITY".into(),
display_key: "future.logging.level_filter".into(),
unit: "log_level".into(),
value_kind: KaptanConfigValueKind::KAPTAN_CONFIG_VALUE_KIND_U32,
flags: DESCRIPTOR_HAS_MINIMUM | DESCRIPTOR_HAS_MAXIMUM,
},
@@ -1568,12 +1568,12 @@ mod tests {
let first_option = response(MavMessage::KAPTAN_CONFIG_ENUM_OPTION(
KAPTAN_CONFIG_ENUM_OPTION_DATA {
value: 5,
value: 3,
request_id: first.request_id,
descriptor_index: 0,
field_id: 108,
option_index: 0,
label: "Notice".into(),
label: "Info".into(),
},
));
let (event, second_request) = client.observe(&first_option, &mut sequence);
@@ -1591,12 +1591,12 @@ mod tests {
let second_option = response(MavMessage::KAPTAN_CONFIG_ENUM_OPTION(
KAPTAN_CONFIG_ENUM_OPTION_DATA {
value: 6,
value: 4,
request_id: second.request_id,
descriptor_index: 0,
field_id: 108,
option_index: 1,
label: "Info".into(),
label: "Debug".into(),
},
));
let (event, value_request) = client.observe(&second_option, &mut sequence);
@@ -1613,7 +1613,7 @@ mod tests {
_ => panic!("enum discovery must advance to VALUE_REQUEST"),
};
let value = response(MavMessage::KAPTAN_CONFIG_VALUE(KAPTAN_CONFIG_VALUE_DATA {
value_bits: 6,
value_bits: 3,
request_id: value_request_id,
session_id: 0,
revision: 0,
@@ -1626,9 +1626,9 @@ mod tests {
panic!("complete enum discovery must publish the configuration");
};
assert_eq!(configuration.fields[0].options.len(), 2);
assert_eq!(configuration.fields[0].options[0].label, "Notice");
assert_eq!(configuration.fields[0].options[0].value, Scalar::U32(5));
assert_eq!(configuration.fields[0].options[1].label, "Info");
assert_eq!(configuration.fields[0].options[0].label, "Info");
assert_eq!(configuration.fields[0].options[0].value, Scalar::U32(3));
assert_eq!(configuration.fields[0].options[1].label, "Debug");
}
#[test]