# HG changeset patch # User jfp <jf.pieronne@laposte.net> # Date 1715847204 -7200 # Thu May 16 10:13:24 2024 +0200 # Node ID b13b326baa08848566cf06aa02806bd8a321f537 # Parent 5d7d55d0d9c3e4f7f8cdd5799031e1c126017f89 Fix alignment diff --git a/python/local/ovms_module/ovms/fatdef/__init__.py b/python/local/ovms_module/ovms/fatdef/__init__.py --- a/python/local/ovms_module/ovms/fatdef/__init__.py +++ b/python/local/ovms_module/ovms/fatdef/__init__.py @@ -95,17 +95,20 @@ class FAT(Structure): + _pack_ = 1 _fields_ = [ - ("fat_b_rtype", c_ushort), # record type - ("fat_v_fortrancc", c_int, 1), # fat$v_fortrancc - ("fat_v_impliedcc", c_int, 1), # implied carriage control - ("fat_v_fat$v_printcc", c_int, 1), # print file carriage control - ("fat_v_nospan", c_int, 1), # print file carriage control - ("fat_v_msbrcw", c_int, 1), # Format of RCW (0=LSB, 1=MSB) - ("fat_v_fill_1", c_int, 3), # MBZ (or should be zero) + ("fat_b_rtype", c_ubyte), # record type + ("fat_v_fortrancc", c_ubyte, 1), # fat$v_fortrancc + ("fat_v_impliedcc", c_ubyte, 1), # implied carriage control + ("fat_v_printcc", c_ubyte, 1), # print file carriage control + ("fat_v_nospan", c_ubyte, 1), # print file carriage control + ("fat_v_msbrcw", c_ubyte, 1), # Format of RCW (0=LSB, 1=MSB) + ("fat_v_fill_1", c_ubyte, 3), # MBZ (or should be zero) ("fat_w_rsize", c_ushort), # MBZ (or should be zero) - ("fat_l_hiblk", c_ulong), # highest allocated VBN - ("fat_l_efblk", c_ulong), # end of file VBN + ("fat_l_hiblkh", c_ushort), # highest allocated VBN high order word + ("fat_l_hiblkl", c_ushort), # highest allocated VBN low order word + ("fat_l_efblkh", c_ushort), # end of file VBN high order word + ("fat_l_efblkl", c_ushort), # end of file VBN low order word ("fat_w_ffbyte", c_ushort), # first free byte in EFBLK ("fat_b_bktsize", c_ubyte), # bucket size in blocks ( @@ -117,15 +120,15 @@ ("fat_w_gbc", c_ushort), # global buffer count (original word) ( "fat_v_gbc_percent", - c_int, + c_ubyte, 1, ), # Interpret value in GBC32 as percent instead of count ( "fat_v_gbc_default", - c_int, + c_ubyte, 1, ), # RMS should set default for GBC at runtime and ignore - ("fat___fill_4", c_int, 6), # Reserved for future use + ("fat___fill_4", c_ubyte, 6), # Reserved for future use ( "fat___fill_2", c_ubyte,