Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: adafruit/Adafruit_CircuitPython_Display_Notification
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.9.16
Choose a base ref
...
head repository: adafruit/Adafruit_CircuitPython_Display_Notification
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.0.0
Choose a head ref
  • 3 commits
  • 2 files changed
  • 2 contributors

Commits on Nov 3, 2023

  1. Copy the full SHA
    278ee07 View commit details
  2. Run black to try to pass CI

    prcutler committed Nov 3, 2023
    Copy the full SHA
    bda8808 View commit details
  3. Merge pull request #16 from prcutler/root-group-fix

    Update root_group for CP 9 compatibility
    dhalbert authored Nov 3, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3de4dea View commit details
Showing with 6 additions and 7 deletions.
  1. +5 −6 examples/display_notification_eink_gizmo.py
  2. +1 −1 examples/display_notification_simpletest.py
11 changes: 5 additions & 6 deletions examples/display_notification_eink_gizmo.py
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ def find_connection():
display = eink_gizmo.EInk_Gizmo()

radio_widget = AdvertisingWidget(radio.name, display.width, display.height)
display.show(radio_widget)
display.root_group = radio_widget

# True when the screen reflects our current state.
screen_updated = False
@@ -77,16 +77,15 @@ def find_connection():
print(new_notification)
latest_notification = new_notification
screen_updated = False
display.show(
apple.create_notification_widget(
latest_notification, display.width, display.height
)
display.root_group = apple.create_notification_widget(
latest_notification, display.width, display.height
)

elif latest_notification and latest_notification.removed:
# Stop showing the latest and show that there are no new notifications.
latest_notification = None
screen_updated = False
display.show(NotificationFree(display.width, display.height))
display.root_group = NotificationFree(display.width, display.height)

# Do not refresh the screen more often than every 180 seconds for eInk displays! Rapid
# refreshes will damage the panel.
2 changes: 1 addition & 1 deletion examples/display_notification_simpletest.py
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ def find_connection():

display = tft_gizmo.TFT_Gizmo()
group = displayio.Group(scale=SCALE)
display.show(group)
display.root_group = group

width = display.width // SCALE
height = display.height // SCALE