Issues

Issue #1 resolved

day display bug

clach04
repo owner created an issue

Wed 12th worked fine, Thu 13th appeared to not clear the previous text properly and it showed up as Thu 13tth (extra t).

Comments (2)

  1. clach04 reporter

    Quick demo bug script:

    #!/usr/bin/env python
    # -*- coding: us-ascii -*-
    # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
    #
    
    from pylcdsysinfo import LCDSysInfo, TextLines, BackgroundColours, TextColours, large_image_indexes
    
    line_num=2
    bg = BackgroundColours.BLACK
    fg = TextColours.GREEN
    
    d = LCDSysInfo()
    d.set_text_background_colour(bg)
    d.clear_lines(TextLines.ALL, bg)
    
    #clock_str = '%s %s' % (short_day_name_str, day_str)
    clock_str = 'Wed 12th'
    d.display_text_on_line(line_num, clock_str, False, None, fg)
    
    # Workaround, NOTE this causes a visible flash on the line :-(
    # d.clear_lines(TextLines.LINE_2, bg)
    
    clock_str = 'Thu 13th'  # tailing space makes no difference, device trims
    d.display_text_on_line(line_num, clock_str, False, None, fg)
    
  2. Log in to comment