add sleep if open impedence

This commit is contained in:
2026-06-12 13:56:48 +08:00
parent b26ae2ce3c
commit 62e7cab5be
3 changed files with 13 additions and 6 deletions

View File

@@ -206,6 +206,9 @@ class Decoder_main(threading.Thread):
self.zmqServer.state_mode = 'rest'
try:
if self.zmqServer.open_Impedance:
time.sleep(0.005)
continue
if self.decoder_class == 'ssvep' or self.decoder_class == 'pvs':
self.decoder_SSVEP()
elif self.decoder_class == 'ssmvep':
@@ -215,7 +218,7 @@ class Decoder_main(threading.Thread):
else:
if self.zmqServer.paradigmBuffer.GetDataLenCount() < 25:
time.sleep(0.005)
continue;
continue
self.zmqServer.paradigmBuffer.getData(25)
except Exception as e:
algo_log(f"Decoder Loop Error: {e}")