Skip to content

Commit

Permalink
pybricks.common.LightMatrix.char: Improve single digits.
Browse files Browse the repository at this point in the history
  • Loading branch information
afarago authored and laurensvalk committed Jul 23, 2024
1 parent 42f10e1 commit 45e7944
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 34 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,20 @@
correction of the `hub.imu.heading()` value ([support#1678]).
- Added `update_heading_correction` to interactively set the heading
correction value ([support#1678]).
- Reduced hub poweroff time from 3 to 2 second to make it easier to turn off
the hub ([pybricks-micropython#250]).

### Changed

- When upgrading the firmware to a new version, the user program will now
be erased. This avoids issues with incompatible program files ([support#1622]).
- The `angular_velocity_threshold`, and `acceleration_threshold` settings
in `hub.imu.settings` are now persistent between reboots.
- Reduced hub poweroff time from 3 to 2 second to make it easier to turn off
the hub ([pybricks-micropython#250]).
- Improved font for the digits ``0--9`` when displaying them
with `hub.display.char(str(x))` ([pybricks-micropython#253]).

[pybricks-micropython#250]: https://github.com/pybricks/pybricks-micropython/pull/250
[pybricks-micropython#253]: https://github.com/pybricks/pybricks-micropython/pull/253
[support#1615]: https://github.com/pybricks/support/issues/1615
[support#1622]: https://github.com/pybricks/support/issues/1622
[support#1678]: https://github.com/pybricks/support/issues/1678
Expand Down
64 changes: 32 additions & 32 deletions pybricks/common/pb_type_lightmatrix_fonts.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ const uint8_t pb_font_5x5[95][5] = {
0b10000, // 🟨⬛⬛⬛⬛
},
{ // 0
0b01100, // ⬛🟨🟨
0b10010, // 🟨⬛⬛🟨⬛
0b10010, // 🟨⬛⬛🟨⬛
0b10010, // 🟨⬛⬛🟨⬛
0b01100, // ⬛🟨🟨
0b01110, // ⬛🟨🟨🟨
0b01010, // ⬛🟨⬛🟨⬛
0b01010, // ⬛🟨⬛🟨⬛
0b01010, // ⬛🟨⬛🟨⬛
0b01110, // ⬛🟨🟨🟨
},
{ // 1
0b00100, // ⬛⬛🟨⬛⬛
Expand All @@ -210,60 +210,60 @@ const uint8_t pb_font_5x5[95][5] = {
0b01110, // ⬛🟨🟨🟨⬛
},
{ // 2
0b11100, // 🟨🟨🟨
0b01110, // 🟨🟨🟨⬛
0b00010, // ⬛⬛⬛🟨⬛
0b01100, // ⬛🟨🟨
0b10000, // 🟨⬛⬛⬛⬛
0b11110, // 🟨🟨🟨🟨⬛
0b01110, // ⬛🟨🟨🟨
0b01000, // ⬛🟨⬛⬛⬛
0b01110, // 🟨🟨🟨⬛
},
{ // 3
0b11110, // 🟨🟨🟨🟨⬛
0b01110, // 🟨🟨🟨⬛
0b00010, // ⬛⬛⬛🟨⬛
0b00100, // ⬛⬛🟨⬛
0b10010, // 🟨⬛⬛🟨⬛
0b01100, // ⬛🟨🟨
0b01110, // ⬛🟨🟨🟨
0b00010, // ⬛⬛🟨⬛
0b01110, // ⬛🟨🟨🟨
},
{ // 4
0b00110, // ⬛⬛🟨🟨⬛
0b01010, // ⬛🟨⬛🟨⬛
0b10010, // 🟨⬛⬛🟨⬛
0b11111, // 🟨🟨🟨🟨🟨
0b01010, // ⬛🟨⬛🟨⬛
0b01110, // ⬛🟨🟨🟨⬛
0b00010, // ⬛⬛⬛🟨⬛
0b00010, // ⬛⬛⬛🟨⬛
},
{ // 5
0b11111, // 🟨🟨🟨🟨🟨
0b10000, // 🟨⬛⬛⬛⬛
0b11110, // 🟨🟨🟨🟨⬛
0b00001, // ⬛⬛⬛⬛🟨
0b11110, // 🟨🟨🟨🟨⬛
0b01110, // 🟨🟨🟨
0b01000, // ⬛🟨⬛⬛⬛
0b01110, // 🟨🟨🟨⬛
0b00010, // ⬛⬛⬛🟨⬛
0b01110, // 🟨🟨🟨⬛
},
{ // 6
0b00010, // ⬛⬛⬛🟨⬛
0b00100, // ⬛⬛🟨⬛⬛
0b01110, // ⬛🟨🟨🟨⬛
0b10001, // 🟨⬛⬛⬛🟨
0b01000, // ⬛🟨⬛⬛⬛
0b01110, // ⬛🟨🟨🟨⬛
0b01010, // ⬛🟨⬛🟨⬛
0b01110, // ⬛🟨🟨🟨⬛
},
{ // 7
0b11111, // 🟨🟨🟨🟨🟨
0b01110, // 🟨🟨🟨
0b00010, // ⬛⬛⬛🟨⬛
0b00100, // ⬛⬛🟨⬛⬛
0b01000, // ⬛🟨⬛⬛⬛
0b10000, // 🟨⬛⬛⬛⬛
0b00100, // ⬛⬛🟨⬛⬛
0b00100, // ⬛⬛🟨⬛⬛
},
{ // 8
0b01110, // ⬛🟨🟨🟨⬛
0b10001, // 🟨⬛⬛⬛🟨
0b01010, // ⬛🟨⬛🟨⬛
0b01110, // ⬛🟨🟨🟨⬛
0b10001, // 🟨⬛⬛⬛🟨
0b01010, // ⬛🟨⬛🟨⬛
0b01110, // ⬛🟨🟨🟨⬛
},
{ // 9
0b01110, // ⬛🟨🟨🟨⬛
0b10001, // 🟨⬛⬛⬛🟨
0b01010, // ⬛🟨⬛🟨⬛
0b01110, // ⬛🟨🟨🟨⬛
0b00010, // ⬛⬛⬛🟨⬛
0b01110, // ⬛🟨🟨🟨⬛
0b00100, // ⬛⬛🟨⬛⬛
0b01000, // ⬛🟨⬛⬛⬛
},
{ // :
0b00000, // ⬛⬛⬛⬛⬛
Expand Down

0 comments on commit 45e7944

Please sign in to comment.