mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-10 10:20:02 +01:00
added screen mirroring toggle
This commit is contained in:
@@ -163,6 +163,14 @@ class Actions(object):
|
||||
else:
|
||||
self.capture.start_recording()
|
||||
|
||||
def toggle_screen_mirror(self):
|
||||
if self.data.update_screen:
|
||||
self.data.update_screen = False
|
||||
subprocess.call(['sudo', 'systemctl', 'start', 'raspi2fb@1'])
|
||||
else:
|
||||
self.data.update_screen = True
|
||||
subprocess.call(['sudo', 'systemctl', 'stop', 'raspi2fb@1'])
|
||||
|
||||
def set_the_camera_colour_u_with_cc(self, amount):
|
||||
u_value = self._convert_midi_cc_value(amount, 0, 255)
|
||||
self.capture.set_colour(u_value, None)
|
||||
|
||||
@@ -31,6 +31,7 @@ class Data(object):
|
||||
self.control_mode = 'PLAYER'
|
||||
self.bank_number = 0
|
||||
self.midi_status = 'disconnected'
|
||||
self.update_screen = True
|
||||
|
||||
### persisted data:
|
||||
self.bank_data = self._read_json(self.BANK_DATA_JSON)
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
},
|
||||
{
|
||||
"end": -1,
|
||||
"length": -1,
|
||||
"location": "",
|
||||
"name": "",
|
||||
"length": 5838.04,
|
||||
"location": "/media/pi/5EB5-664C/MST3K_0310_Fugitive_Alien_xvid.avi",
|
||||
"name": "MST3K_0310_Fugitive_Alien_xvid.avi",
|
||||
"rate": 1,
|
||||
"start": -1
|
||||
},
|
||||
|
||||
@@ -47,10 +47,10 @@
|
||||
"DEFAULT": ["load_slot_4_into_next_player","increase_speed"]
|
||||
},
|
||||
"o": {
|
||||
"DEFAULT": ["load_slot_5_into_next_player","print_speed"]
|
||||
"DEFAULT": ["load_slot_5_into_next_player","toggle_screen_mirror"]
|
||||
},
|
||||
"p": {
|
||||
"DEFAULT": ["load_slot_6_into_next_player"]
|
||||
"DEFAULT": ["load_slot_6_into_next_player", "print_speed"]
|
||||
},
|
||||
"q": {
|
||||
"DEFAULT": ["load_slot_7_into_next_player"]
|
||||
|
||||
@@ -1 +1 @@
|
||||
"0-0"
|
||||
"0-2"
|
||||
@@ -217,6 +217,7 @@ class Display(object):
|
||||
self.tk.after(500, self._update_screen_every_second)
|
||||
|
||||
def refresh_display(self):
|
||||
if self.data.update_screen:
|
||||
self.display_text.configure(state='normal')
|
||||
self.display_text.delete(1.0, END)
|
||||
self._load_display()
|
||||
|
||||
Reference in New Issue
Block a user