diff --git a/firmware/tools/generate_world_map.bin.py b/firmware/tools/generate_world_map.bin.py index 38f575e2..a8ac68d7 100755 --- a/firmware/tools/generate_world_map.bin.py +++ b/firmware/tools/generate_world_map.bin.py @@ -29,10 +29,10 @@ outfile = open('../../sdcard/ADSB/world_map.bin', 'wb') Image.MAX_IMAGE_PIXELS = None im = Image.open("../../sdcard/ADSB/world_map.jpg") pix = im.load() - -outfile.write(struct.pack('H', im.size[0])) -outfile.write(struct.pack('H', im.size[1])) - +# Write as unsigned short (2 bytes) as little endian +outfile.write(struct.pack('> 5) << 5 # pixel_lcd |= (pix[x, y][1] >> 5) << 2 # pixel_lcd |= (pix[x, y][2] >> 6) - line += struct.pack('H', pixel_lcd) + line += struct.pack('