Commit Graph

13 Commits

Author SHA1 Message Date
Kevin O'Connor 51051478af st7920: Wrap code to 80 columns
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-27 13:31:31 -05:00
Kevin O'Connor e504147285 font8x14: Store font as strings instead of as bytearray
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-27 13:26:59 -05:00
Kevin O'Connor a00d7b418f display: Add a get_dimensions() method to lcd chip classes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-11-21 20:45:53 -05:00
Kevin O'Connor 97927172f1 st7920: Use display xor capability when animating glyphs
Use the xor capability of the display to animate the glyphs, which
reduces the number of glyphs needed from 4 to 2.  This should make it
easier to add future animations if desired.

Suggested by @marcio-ao.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-04 13:49:00 -04:00
Kevin O'Connor 1379a59085 st7920: No need to clear glyph framebuffer before programming glyphs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 742d6481a9 st7920: Simplify framebuffer access
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 05ba62600c st7920: Support writing degrees symbol
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 30a49d3186 display: Use write_glyph() when writing special characters
Always use the write_glyph() method when writing special characters
during status screen updates.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor c8d9d575a1 display: Support writing single character glyphs using write_glyph()
Add write_glyph() support to hd44780.py.  Update uc1701.py and
st7920.py to support writing single character glyphs via
write_glyph().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 2a5778be3a display: Move icon drawing from display.py to lcd_chip code
Move the st7920 icon rendering optimizations from display.py to
st7920.py.  This simplifies the code for other displays.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 30013a1fb8 mcu: Rename add_config_object() to register_config_callback()
Change the name of the config registration method and pass an explicit
reference to the callback to the new method.  This makes the
relationship between mcu registration and build_config() more clear in
the calling code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-03 11:48:22 -04:00
Kevin O'Connor 273a98d39a pins: Explicitly pass can_invert and can_pullup to lookup_pin()
Don't pass pin_type to lookup_pin() - instead, if a pin can be
inverted or can have a pullup, then the caller must explicitly specify
that when calling lookup_pin().  This simplifies the code for the
cases where it is not valid to invert or pullup.

Explicitly pass the pin_type to setup_pin() and have ppins.setup_pin()
apply default pullup and invert flags.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 09:44:45 -04:00
Kevin O'Connor e907253dba display: Move st7920 code to its own module
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-27 13:18:03 -04:00