diff options
| author | sommersoft <sommersoft@users.noreply.github.com> | 2019-07-27 10:46:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-27 10:46:53 -0500 |
| commit | cebdadd0f6122826337c962b3d443bd41d1de69d (patch) | |
| tree | e2aeb661c3760f7aaf152bc1bbd95fd120161ab8 /tools | |
| parent | c335f170d7d561d07ca7412da60c260e13c5e746 (diff) | |
| parent | d99d3bd471920cdd9b2683b7dbd538551f7aee43 (diff) | |
Merge branch 'master' into dynamic_support_matrix
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/build_board_info.py | 3 | ||||
| -rw-r--r-- | tools/gen_display_resources.py | 24 |
2 files changed, 16 insertions, 11 deletions
diff --git a/tools/build_board_info.py b/tools/build_board_info.py index 307d90d7a..8731a6feb 100644 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -39,7 +39,8 @@ extension_by_board = { "makerdiary_nrf52840_mdk": HEX, "makerdiary_nrf52840_mdk_usb_dongle": HEX, "pca10056": BIN_UF2, - "pca10059": BIN_UF2 + "pca10059": BIN_UF2, + "electronut_labs_blip": HEX } aliases_by_board = { diff --git a/tools/gen_display_resources.py b/tools/gen_display_resources.py index 7b28c3105..a731cbd9c 100644 --- a/tools/gen_display_resources.py +++ b/tools/gen_display_resources.py @@ -29,7 +29,6 @@ class BitmapStub: self.rows[y] = bytes(row) f = bitmap_font.load_font(args.font, BitmapStub) -real_bb = [0, 0] # Load extra characters from the sample file. sample_characters = set() @@ -61,13 +60,11 @@ for c in all_characters: print("Font missing character:", c, ord(c)) filtered_characters = filtered_characters.replace(c, "") continue - x, y, dx, dy = g["bounds"] if g["shift"][1] != 0: raise RuntimeError("y shift") - real_bb[0] = max(real_bb[0], x - dx) - real_bb[1] = max(real_bb[1], y - dy) -tile_x, tile_y = real_bb +x, y, dx, dy = f.get_bounding_box() +tile_x, tile_y = x - dx, y - dy total_bits = tile_x * len(all_characters) total_bits += 32 - total_bits % 32 bytes_per_row = total_bits // 8 @@ -101,14 +98,21 @@ c_file.write("""\ """) c_file.write("""\ -uint32_t terminal_transparency[1] = {0x00000000}; - -// These colors are RGB 565 with the bytes swapped. -uint32_t terminal_colors[1] = {0xffff0000}; +_displayio_color_t terminal_colors[2] = { + { + .rgb888 = 0x000000, + .rgb565 = 0x0000, + .luma = 0x00 + }, + { + .rgb888 = 0xffffff, + .rgb565 = 0xffff, + .luma = 0xff + }, +}; displayio_palette_t supervisor_terminal_color = { .base = {.type = &displayio_palette_type }, - .opaque = terminal_transparency, .colors = terminal_colors, .color_count = 2, .needs_refresh = false |
