@@ -111,6 +111,8 @@ def __init__(self, flip, path, num_pixels, pixel_order, pixel_pin, gamma):
111111 board .DISPLAY .rotation = 180
112112 self .button_left , self .button_right = (self .button_right ,
113113 self .button_left )
114+ else :
115+ board .DISPLAY .rotation = 0
114116 # Turn off onboard NeoPixel and LED strip
115117 onboard_pixel_pin = digitalio .DigitalInOut (board .NEOPIXEL )
116118 onboard_pixel_pin .direction = digitalio .Direction .OUTPUT
@@ -220,7 +222,6 @@ def paint(self):
220222 board .DISPLAY .brightness = 0 # Screen backlight OFF
221223 painting = False
222224 duration = 5.0 - self .speed * 4.5 # 0.5 to 5 seconds
223- err = 0 # Clear the 'error term' used for diffusion dithering
224225
225226 gc .collect () # Helps make playback a little smoother
226227
@@ -232,6 +233,7 @@ def paint(self):
232233 self .clear_strip () # Turn LEDs OFF
233234 else :
234235 start_time = monotonic ()
236+ err = 0 # Clear 'error term' used for dithering
235237 painting = not painting # Toggle paint mode on/off
236238 elif RichButton .HOLD in action_set :
237239 return # Exit painting, enter config mode
@@ -301,7 +303,7 @@ def paint(self):
301303 # (dithered, clipped and quantized). This will get used on
302304 # the next pass through the loop. Don't keep 100% of the
303305 # value, or image 'shimmers' too much...dial back slightly.
304- err = (want - got ) * 0.8
306+ err = (want - got ) * 0.9
305307
306308 # Issue the resulting uint8 'got' data to the LED strip.
307309 self .write_func (self .neopixel_pin , got )
0 commit comments