From f60da2a6430d82576d017633eb21e51652391d96 Mon Sep 17 00:00:00 2001 From: jaseg Date: Fri, 20 Dec 2024 20:22:47 +0100 Subject: Add support for Autel Robotics Evo II Dual 640T V3 files --- src/infiray_irg.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/infiray_irg.py b/src/infiray_irg.py index dfe0d0c..291dfe3 100644 --- a/src/infiray_irg.py +++ b/src/infiray_irg.py @@ -26,7 +26,7 @@ def load(data): raise ValueError(f'Header magic not found. Got header: {header[0]:02x} {header[1]:02x}') _unk0, coarse_section_length, y_res, x_res,\ - _zero0, _unk1, _zero1, fine_offset, _unk2, jpeg_length,\ + flag0, _unk1, _zero1, fine_offset, _unk2, jpeg_length,\ y_res_2, x_res_2, _unk3, = struct.unpack(' 0: + # I have seen a file from an Autel Robotics Evo II Dual 640T V3 that looks like a C201 file, but lacks the + # visible data. + vis_jpg = Image.open(io.BytesIO(consume(jpeg_length))) elif model == 'other': if header[-2:] != bytes([0xab,0xba]): @@ -76,7 +82,6 @@ def load(data): fine_img = fine_img / 10 - fine_temp_offset # In my example file, data now contains the JSON '{"roi":[]}' and no JPG. We ignore that. - vis_jpg = None return coarse_img, fine_img, vis_jpg -- cgit