Merge remote-tracking branch 'origin/master'

This commit is contained in:
njdaoyehu 2024-11-21 17:45:20 +08:00
commit 457cb3aa2f
3 changed files with 29 additions and 2 deletions

View File

@ -74,7 +74,7 @@ class CameraSignals(QObject):
# pyqt的相机管理类
@device("camera", auto_start=True)
@device("camera", auto_start=False)
class Camera(EdgeComponent):
signals = CameraSignals()

View File

@ -175,7 +175,7 @@ class LidarSignals(QObject):
on_device_data = pyqtSignal(object)
@device("lidar", auto_start=True)
@device("lidar", auto_start=False)
class LidarDevice(EdgeComponent):
signals = LidarSignals()

27
start.sh Normal file
View File

@ -0,0 +1,27 @@
#!/bin/bash
# 1. 检查并杀掉 ss928_fb_tool 进程
process_name="ss928_fb_tool"
pid=$(pgrep "$process_name")
if [ -n "$pid" ]; then
echo "Killing existing process: $process_name (PID: $pid)"
kill -9 "$pid"
sleep 1
fi
# 启动 ss928_fb_tool 并等待 3 秒
echo "Starting $process_name..."
$process_name &
sleep 3
# 2. 切换到工作目录
work_dir="/root/app/detect-gui"
echo "Switching to work directory: $work_dir"
cd "$work_dir" || { echo "Failed to switch to directory: $work_dir"; exit 1; }
# 3. 定义 Python 解释器路径
python_path="/root/miniconda3/envs/pyqt5/bin/python"
# 4. 使用 Python 解释器运行 main.py
echo "Running main.py with Python interpreter: $python_path"
"$python_path" main.py