Fix 7 segment order.

Segments for bits 4 and 5 were swapped with respect to the standard order.
This commit is contained in:
Juergen Stuber 2018-12-02 15:54:22 +01:00
parent 85ff8c6c62
commit 3158928015
2 changed files with 4 additions and 4 deletions

View File

@ -154,10 +154,10 @@ impl Board {
self.draw_horizontal_segment(pos + v2d(1, 2 * delta), hsize);
}
if (segments & (1 << 4)) != 0 {
self.draw_vertical_segment(pos + v2d(0, 1), vsize);
self.draw_vertical_segment(pos + v2d(0, delta + 1), vsize);
}
if (segments & (1 << 5)) != 0 {
self.draw_vertical_segment(pos + v2d(0, delta + 1), vsize);
self.draw_vertical_segment(pos + v2d(0, 1), vsize);
}
if (segments & (1 << 6)) != 0 {
self.draw_horizontal_segment(pos + v2d(1, delta), hsize);

View File

@ -156,10 +156,10 @@ impl Board {
self.draw_horizontal_segment(pos + v2d(1, 2 * delta), hsize);
}
if (segments & (1 << 4)) != 0 {
self.draw_vertical_segment(pos + v2d(0, 1), vsize);
self.draw_vertical_segment(pos + v2d(0, delta + 1), vsize);
}
if (segments & (1 << 5)) != 0 {
self.draw_vertical_segment(pos + v2d(0, delta + 1), vsize);
self.draw_vertical_segment(pos + v2d(0, 1), vsize);
}
if (segments & (1 << 6)) != 0 {
self.draw_horizontal_segment(pos + v2d(1, delta), hsize);