Skip to content

Commit 5ab8971

Browse files
committed
Update example files
1 parent b03f8cb commit 5ab8971

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/displayio_effects_gauge.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import board
1313
import displayio
1414
from displayio_gauge import Gauge
15-
from displayio_effects import fluctuation_effect
15+
from displayio_effects import WidgetType, fluctuation_effect
1616

1717
display = board.DISPLAY
1818

@@ -27,7 +27,7 @@
2727
main_group.append(bg_sprite)
2828
display.show(main_group)
2929

30-
fluctuation_effect.hook_fluctuation_effect(Gauge, "level")
30+
fluctuation_effect.hook_fluctuation_effect(Gauge, WidgetType.GAUGE)
3131

3232
my_gauge = Gauge(
3333
x=90,

examples/displayio_effects_simpletest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import displayio
1212
import terminalio
1313
from displayio_dial import Dial
14-
from displayio_effects import fluctuation_effect
14+
from displayio_effects import WidgetType, fluctuation_effect
1515

1616
# Fonts used for the Dial tick labels
1717
tick_font = terminalio.FONT
@@ -26,7 +26,7 @@
2626
maximum_value = 100
2727

2828
# Hook in the throttle effect for the Dial widget
29-
fluctuation_effect.hook_fluctuation_effect(Dial, "value")
29+
fluctuation_effect.hook_fluctuation_effect(Dial, WidgetType.DIAL)
3030

3131
# Create a Dial widget
3232
my_dial = Dial(

0 commit comments

Comments
 (0)