groupgets / purethermal1-firmware

Reference firmware for PureThermal 1 FLIR Lepton Dev Kit
MIT License
125 stars 62 forks source link

Fix Y16 format type descriptor's count of frame descriptors. #22

Closed ghellwig closed 5 years ago

ghellwig commented 5 years ago

The Y16 format descriptor has a value of 1 for the number of frame descriptors, while there are actually 2 (with and without telemetry data included). Correspondingly, the output of usbtreeview below shows an error because two frame descriptors are detected which is a mismatch ( 2 != 1).

        ------- VS Uncompressed Format Type Descriptor --------
bLength                  : 0x1B (27 bytes)
bDescriptorType          : 0x24 (Video Streaming Interface)
bDescriptorSubtype       : 0x04 (Uncompressed Format Type)
bFormatIndex             : 0x02
bNumFrameDescriptors     : 0x01
guidFormat               : {20363159-0000-0010-8000-00AA00389B71} (unknown)
bBitsPerPixel            : 0x10
bDefaultFrameIndex       : 0x01
bAspectRatioX            : 0x00
bAspectRatioY            : 0x00
bmInterlaceFlags         : 0x00
 D0 IL stream or variable: 0 (no)
 D1 Fields per frame     : 0 (2 fields)
 D2 Field 1 first        : 0 (no)
 D3 Reserved             : 0
 D4..5 Field pattern     : 0 (Field 1 only)
 D6..7 Display Mode      : 0 (Bob only)
bCopyProtect             : 0x00 (No restrictions)
*!*ERROR:  Found 2 frame descriptors (should be 1)

        -------- VS Uncompressed Frame Type Descriptor --------
---> This is the Default (optimum) Frame index
bLength                  : 0x1E (30 bytes)
bDescriptorType          : 0x24 (Video Streaming Interface)
bDescriptorSubtype       : 0x05 (Uncompressed Frame Type)
bFrameIndex              : 0x01
bmCapabilities           : 0x02
wWidth                   : 0x00A0 (160)
wHeight                  : 0x0078 (120)
dwMinBitRate             : 0x002A3000 (345.5 KB/s)
dwMaxBitRate             : 0x002A3000 (345.5 KB/s)
dwMaxVideoFrameBufferSize: 0x00009600
dwDefaultFrameInterval   : 0x0010F447 (111 ms -> 9.00 fps)
bFrameIntervalType       : 0x01
adwFrameInterval[1]      : 0x0010F447 (111 ms -> 9.00 fps)

        -------- VS Uncompressed Frame Type Descriptor --------
bLength                  : 0x1E (30 bytes)
bDescriptorType          : 0x24 (Video Streaming Interface)
bDescriptorSubtype       : 0x05 (Uncompressed Frame Type)
bFrameIndex              : 0x02
bmCapabilities           : 0x02
wWidth                   : 0x00A0 (160)
wHeight                  : 0x007A (122)
dwMinBitRate             : 0x002AE400 (351.2 KB/s)
dwMaxBitRate             : 0x002AE400 (351.2 KB/s)
dwMaxVideoFrameBufferSize: 0x00009880
dwDefaultFrameInterval   : 0x0010F447 (111 ms -> 9.00 fps)
bFrameIntervalType       : 0x01
adwFrameInterval[1]      : 0x0010F447 (111 ms -> 9.00 fps)
ghellwig commented 5 years ago

@Sheyne in the mean time I managed to find my mistake in the handling of the extension units and now I can send Lepton commands @kekiefer the above linked PR fixes the problem with the telemetry data

kekiefer commented 5 years ago

Thanks @ghellwig!

ghellwig commented 5 years ago

@kekiefer quick question: Do you intend to make a new release with this fix included? It doesn't matter that much since I can flash it myself, but it would be nice, if newly ordered devices would ship with this fix.

kekiefer commented 5 years ago

Yes, I'll make a 1.2.2 release in the next week or so, this is looking like the only change that will be in it.

There's probably a lot of back stock in our warehouse that's not going to be updated, and even more in places like digikey. However, if your company is planning on making orders directly to GroupGets, include a note to flash the updated firmware and it'll get put on there before shipping.

ghellwig commented 5 years ago

Yes, I'll make a 1.2.2 release in the next week or so, this is looking like the only change that will be in it.

There's probably a lot of back stock in our warehouse that's not going to be updated, and even more in places like digikey. However, if your company is planning on making orders directly to GroupGets, include a note to flash the updated firmware and it'll get put on there before shipping.

Ok, thanks. I'll forward this to our purchasing department when we order new devices.