Some missing files & fixes
This commit is contained in:
parent
6243480f6e
commit
7a1ed75998
|
@ -6,6 +6,42 @@
|
||||||
"unordered_map": "cpp",
|
"unordered_map": "cpp",
|
||||||
"unordered_set": "cpp",
|
"unordered_set": "cpp",
|
||||||
"vector": "cpp",
|
"vector": "cpp",
|
||||||
"system_error": "cpp"
|
"system_error": "cpp",
|
||||||
|
"cstdint": "cpp",
|
||||||
|
"cmath": "cpp",
|
||||||
|
"array": "cpp",
|
||||||
|
"cctype": "cpp",
|
||||||
|
"clocale": "cpp",
|
||||||
|
"cstdarg": "cpp",
|
||||||
|
"cstddef": "cpp",
|
||||||
|
"cstdio": "cpp",
|
||||||
|
"cstdlib": "cpp",
|
||||||
|
"cstring": "cpp",
|
||||||
|
"ctime": "cpp",
|
||||||
|
"cwchar": "cpp",
|
||||||
|
"cwctype": "cpp",
|
||||||
|
"exception": "cpp",
|
||||||
|
"algorithm": "cpp",
|
||||||
|
"functional": "cpp",
|
||||||
|
"string_view": "cpp",
|
||||||
|
"tuple": "cpp",
|
||||||
|
"type_traits": "cpp",
|
||||||
|
"fstream": "cpp",
|
||||||
|
"initializer_list": "cpp",
|
||||||
|
"iomanip": "cpp",
|
||||||
|
"iosfwd": "cpp",
|
||||||
|
"iostream": "cpp",
|
||||||
|
"istream": "cpp",
|
||||||
|
"limits": "cpp",
|
||||||
|
"memory": "cpp",
|
||||||
|
"new": "cpp",
|
||||||
|
"ostream": "cpp",
|
||||||
|
"numeric": "cpp",
|
||||||
|
"sstream": "cpp",
|
||||||
|
"stdexcept": "cpp",
|
||||||
|
"streambuf": "cpp",
|
||||||
|
"cinttypes": "cpp",
|
||||||
|
"utility": "cpp",
|
||||||
|
"typeinfo": "cpp"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,7 +15,7 @@ Reader
|
||||||
Button Board:
|
Button Board:
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
- rot in | white 13
|
- rot in | white 13
|
||||||
- btn2 led | grey 12
|
- btn2 led | grey 12
|
||||||
- btn2 in | purple 14
|
- btn2 in | purple 14
|
||||||
- rotB | blue 27
|
- rotB | blue 27
|
||||||
|
|
|
@ -69,7 +69,8 @@ def on_firmware_msg(protocol: MusicMouseProtocol, message):
|
||||||
eff.swipe.bell_curve_width_in_leds = 6
|
eff.swipe.bell_curve_width_in_leds = 6
|
||||||
|
|
||||||
protocol.led_ring_effect(eff)
|
protocol.led_ring_effect(eff)
|
||||||
protocol.mouse_led_effect(EffectStaticConfig(ColorRGBW(0, 0, 1, 0)))
|
protocol.mouse_led_effect(
|
||||||
|
EffectStaticConfig(ColorRGBW(18 / 255 / 2, 156 / 255 / 2, 140 / 255 / 2, 0)))
|
||||||
print(figure)
|
print(figure)
|
||||||
if figure in playlists:
|
if figure in playlists:
|
||||||
audio_player.set_playlist(playlists[figure])
|
audio_player.set_playlist(playlists[figure])
|
||||||
|
|
|
@ -75,7 +75,11 @@ class AudioPlayer:
|
||||||
self.media_player = self.media_list_player.get_media_player()
|
self.media_player = self.media_list_player.get_media_player()
|
||||||
|
|
||||||
evm = self.media_player.event_manager()
|
evm = self.media_player.event_manager()
|
||||||
evm.event_attach(vlc.EventType.MediaPlayerEndReached, self._callback)
|
evm.event_attach(vlc.EventType.MediaPlayerStopped, self._callback)
|
||||||
|
evm.event_attach(vlc.EventType.MediaListEndReached, self._callback)
|
||||||
|
|
||||||
|
evm2 = self.media_list_player.event_manager()
|
||||||
|
evm2.event_attach(vlc.EventType.MediaListEndReached, self._callback)
|
||||||
|
|
||||||
self.on_playlist_end_callback = None
|
self.on_playlist_end_callback = None
|
||||||
|
|
||||||
|
@ -107,12 +111,13 @@ class AudioPlayer:
|
||||||
self.media_list_player.pause()
|
self.media_list_player.pause()
|
||||||
|
|
||||||
def _callback(self, event, *args, **kwargs):
|
def _callback(self, event, *args, **kwargs):
|
||||||
if event.type == vlc.EventType.MediaPlayerEndReached:
|
|
||||||
|
if True: # event.type == vlc.EventType.MediaPlayerEndReached:
|
||||||
print("End reached")
|
print("End reached")
|
||||||
if self.on_playlist_end_callback:
|
if self.on_playlist_end_callback:
|
||||||
self.on_playlist_end_callback()
|
self.on_playlist_end_callback()
|
||||||
#print("Callback from VLC", event, args, kwargs)
|
print("Callback from VLC", event, args, kwargs)
|
||||||
#print(event.meta_type, event.obj, event.type)
|
print(event.meta_type, event.obj, event.type)
|
||||||
|
|
||||||
def change_volume(self, amount=1):
|
def change_volume(self, amount=1):
|
||||||
vol = self.media_player.audio_get_volume() + amount
|
vol = self.media_player.audio_get_volume() + amount
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
;PlatformIO Project Configuration File
|
; PlatformIO Project Configuration File
|
||||||
;
|
;
|
||||||
; Build options: build flags, source filter
|
; Build options: build flags, source filter
|
||||||
; Upload options: custom upload port, speed and extra flags
|
; Upload options: custom upload port, speed and extra flags
|
||||||
|
@ -12,26 +12,23 @@
|
||||||
data_dir = data
|
data_dir = data
|
||||||
default_envs = esp32
|
default_envs = esp32
|
||||||
|
|
||||||
|
|
||||||
[env:esp32]
|
[env:esp32]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
#platform_packages =
|
|
||||||
# framework-arduinoespressif32@https://github.com/espressif/arduino-esp32
|
|
||||||
board = esp-wrover-kit
|
board = esp-wrover-kit
|
||||||
board_upload.flash_size = "4MB"
|
board_upload.flash_size = "4MB"
|
||||||
#platform = espressif8266
|
build_flags = -DPLATFORM_ESP32
|
||||||
#board = esp_wroom_02
|
|
||||||
#build_flags = -Wl,-Teagle.flash.2m1m.ld
|
|
||||||
build_flags = -DPLATFORM_ESP32
|
|
||||||
framework = arduino
|
framework = arduino
|
||||||
monitor_port = /dev/ttyUSB0
|
monitor_port = /dev/ttyUSB0
|
||||||
upload_port = /dev/ttyUSB0
|
upload_port = /dev/ttyUSB0
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
src_filter = +<*> -<host_test.cpp>
|
src_filter = +<*> -<host_test.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
miguelbalboa/MFRC522
|
miguelbalboa/MFRC522
|
||||||
|
bxparks/AceButton@^1.9.1
|
||||||
|
|
||||||
[env:native]
|
[env:native]
|
||||||
platform=native
|
platform = native
|
||||||
src_filter = +<*> -<main.cpp>
|
src_filter = +<*> -<main.cpp>
|
||||||
build_flags=-Ilib/ledtl -g -DPLATFORM_NATIVE
|
build_flags = -Ilib/ledtl -g -DPLATFORM_NATIVE
|
||||||
|
lib_deps =
|
||||||
|
bxparks/AceButton@^1.9.1
|
||||||
|
|
Loading…
Reference in New Issue