Corrected import error & freezelayer error

This commit is contained in:
Maximilien Rigaut 2021-11-04 02:19:43 +01:00
parent edf93e60f6
commit 54312e99ea
2 changed files with 9 additions and 10 deletions

View File

@ -594,9 +594,9 @@ class analogController(object):
"""Freeze layer <layer> on <screen> """Freeze layer <layer> on <screen>
<layer>,<screen>,<action>GCfrl: Freeze screen <layer>,<screen>,<action>GCfrl: Freeze screen
""" """
if not action==None: if action==None:
action=not self.st_freeze_layer[layer] action=not self.st_freeze_layer[layer]
print(action)
self.genericSEND("FREEZELAYER","{layer},{screen},{action:b}GCfrl".format(layer=layer,screen=screen,action=action)) self.genericSEND("FREEZELAYER","{layer},{screen},{action:b}GCfrl".format(layer=layer,screen=screen,action=action))
self.st_freeze_layer[layer]=not self.st_freeze_layer[layer] self.st_freeze_layer[layer]=not self.st_freeze_layer[layer]
@ -617,7 +617,7 @@ class analogController(object):
self.updateFinished(screen) self.updateFinished(screen)
def connectionSequence(self): def connectionSequence(self):
"Execute the full connection sequence" """Execute the full connection sequence"""
self.start_listening() self.start_listening()
self.connect() self.connect()
self.getDevice() self.getDevice()
@ -686,7 +686,7 @@ class analogController(object):
pass pass
def sendDirect(self,direct): def sendDirect(self,direct):
"Directly sent to the socket" """Directly sent to the socket"""
try: try:
iprint(">>> Sending direct: {}".format(direct)) iprint(">>> Sending direct: {}".format(direct))
self.sck.sendall(direct) self.sck.sendall(direct)
@ -694,7 +694,7 @@ class analogController(object):
eprint("Error sending data: ",direct) eprint("Error sending data: ",direct)
def sendData(self,data): def sendData(self,data):
"Send data through the socket" """Send data through the socket"""
try: try:
iprint(">>> Sending data: {}".format(data.replace("\n",""))) iprint(">>> Sending data: {}".format(data.replace("\n","")))
self.sck.sendall((data).encode()) self.sck.sendall((data).encode())
@ -703,12 +703,12 @@ class analogController(object):
sys.exit() sys.exit()
def limbowait(self): def limbowait(self):
"Testing state, only usefull when not on a remote gui/midiRebind" """Testing state, only usefull when not on a remote gui/midiRebind"""
while not self.fatal: while not self.fatal:
time.sleep(_TIMEOUT_HUGE) time.sleep(_TIMEOUT_HUGE)
def pingLoop(self): def pingLoop(self):
"Another limbo wait, this time with pings" """Another limbo wait, this time with pings"""
while not self.fatal: while not self.fatal:
self._keepAlive(val=0b1000) self._keepAlive(val=0b1000)
time.sleep(_TIMEOUT_HUGE) time.sleep(_TIMEOUT_HUGE)

View File

@ -1,6 +1,5 @@
import multiprocessing
import socketserver
import re import re
import socketserver
import sys import sys
import threading import threading
import time import time