Handle UnsupportedCommand
@@ -13,6 +13,7 @@ from adafruit_bitmap_font import bitmap_font
import adafruit_ble
from adafruit_ble.advertising.standard import SolicitServicesAdvertisement
from adafruit_ble_apple_media import AppleMediaService
+from adafruit_ble_apple_media import UnsupportedCommand
from adafruit_circuitplayground import cp
BACKGROUND_COLOR = 0x49523b # Gray
@@ -123,7 +124,7 @@ while True:
else:
ams.next_track()
time.sleep(0.1)
- except RuntimeError:
+ except (RuntimeError, UnsupportedCommand):
# Skip Bad Packets, unknown commands, etc.
pass
