fixed refactor, added player reset

This commit is contained in:
langolierz
2019-06-09 10:20:45 +00:00
parent 7d4ecc3c93
commit a258beaa10
17 changed files with 18 additions and 9 deletions

View File

@@ -382,8 +382,10 @@ class Actions(object):
self.check_if_should_start_openframeworks()
elif state == 'omxplayer':
self.exit_openframeworks()
self.video_driver.reset_all_players()
self.reset_players()
def reset_players(self):
self.video_driver.reset_all_players()
def change_composite_setting(self, setting_value):
mode = self.data.settings['video']['COMPOSITE_TYPE']['value']

View File

@@ -115,11 +115,13 @@ class BrowserMenu(Menu):
class SettingsMenu(Menu):
FOLDER_ORDER = ['recur', 'video', 'incur', 'captur', 'conjur', 'detour', 'other' ]
SAMPLER_ORDER = ['LOAD_NEXT', 'RAND_START_MODE', 'FIXED_LENGTH_MODE', 'FIXED_LENGTH' ]
FOLDER_ORDER = ['video', 'recur', 'incur', 'captur', 'conjur', 'detour', 'other' ]
RECUR_ORDER = ['LOAD_NEXT', 'RAND_START_MODE', 'FIXED_LENGTH_MODE', 'FIXED_LENGTH' ]
VIDEO_ORDER = ['OUTPUT', 'SCREEN_MODE']
MIDI_ORDER = ['INPUT', 'STATUS']
CAPTURE_ORDER = ['DEVICE']
INCUR_ORDER = ['MIDI_INPUT', 'MIDI_STATUS', 'CYCLE_MIDI_PORT']
CAPTUR_ORDER = ['DEVICE']
CONJUR_ORDER = ['VIDEO_BACKEND']
DETOUR_ORDER = []
OTHER_ORDER = []
def __init__(self, data, message_handler, menu_height):

View File

@@ -75,7 +75,7 @@
"no"
],
"value": "no"
},
}
},
"incur": {
"MIDI_CHANNEL": {
@@ -126,7 +126,7 @@
"disabled"
],
"value": "disabled"
},
}
},
"other": {
"UPDATE_CODE": {
@@ -211,6 +211,11 @@
],
"value": "off"
},
"RESET_PLAYERS": {
"action": "reset_players",
"options": [],
"value": null
},
"LOOP_TYPE": {
"action": "update_video_settings",
"options": [

View File

@@ -16,7 +16,7 @@ class AnalogInput(object):
def check_if_listening_enabled(self):
if self.data.settings['incur']ANALOG_INPUT']['value'] == 'enabled':
if self.data.settings['incur']['ANALOG_INPUT']['value'] == 'enabled':
if not self.analog_input:
try:
## note - using software spi for now although on the same pins as the hardware spi described below because hardware spi wasnt working with lcd display
@@ -36,7 +36,7 @@ class AnalogInput(object):
self.root.after(1000, self.check_if_listening_enabled)
def poll_analog_inputs(self):
if self.data.settings['incur']ANALOG_INPUT']['value'] == 'enabled':
if self.data.settings['incur']['ANALOG_INPUT']['value'] == 'enabled':
for i in range(0,8):
if str(i) in self.analog_mappings: