Correct the ups_alarm field spelling

The upstream River 3 schema spells field 355 `ups_alram`. Use `ups_alarm` in the decoder, the generated schema, and the field reference. The schema generator now applies a rename map, so a regenerated schema keeps the corrected name.
This commit is contained in:
tim
2026-10-10 09:03:32 +02:00
parent 5fa6000c70
commit 452a3bc207
5 changed files with 14 additions and 4 deletions
+8
View File
@@ -189,6 +189,14 @@ def test_generator_keeps_reachable_types_and_ignores_unrelated_nested_types(gene
assert 'Unrelated' not in messages
def test_generator_corrects_upstream_field_spelling(generator):
messages, _ = generator.parse_schema(
'message DisplayPropertyUpload { optional bool ups_alram = 355; } message RuntimePropertyUpload {}'
)
assert messages['DisplayPropertyUpload'][355] == ('ups_alarm', 'bool', False)
assert MESSAGES['DisplayPropertyUpload'][355] == ('ups_alarm', 'bool', False)
@pytest.mark.parametrize('body', [
'optional Missing value = 1;',
'optional uint32 a = 1; optional uint32 b = 1;',