switched to multiprocessing instead of threading

This commit is contained in:
Félix Boisselier
2024-06-03 17:49:28 +02:00
parent 9ce82e3dc0
commit d22b3fcbef
6 changed files with 59 additions and 52 deletions

View File

@@ -2,11 +2,11 @@
from ..helpers.console_output import ConsoleOutput
from ..shaketune_thread import ShakeTuneThread
from ..shaketune_process import ShakeTuneProcess
from .accelerometer import Accelerometer
def axes_map_calibration(gcmd, config, st_thread: ShakeTuneThread) -> None:
def axes_map_calibration(gcmd, config, st_process: ShakeTuneProcess) -> None:
z_height = gcmd.get_float('Z_HEIGHT', default=20.0)
speed = gcmd.get_float('SPEED', default=80.0, minval=20.0)
accel = gcmd.get_int('ACCEL', default=1500, minval=100)
@@ -70,6 +70,6 @@ def axes_map_calibration(gcmd, config, st_thread: ShakeTuneThread) -> None:
# Run post-processing
ConsoleOutput.print('Analysis of the movements...')
creator = st_thread.get_graph_creator()
creator = st_process.get_graph_creator()
creator.configure(accel)
st_thread.run()
st_process.run()