mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect-gui.git
synced 2025-06-24 13:14:11 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
457cb3aa2f
@ -74,7 +74,7 @@ class CameraSignals(QObject):
|
||||
|
||||
|
||||
# pyqt的相机管理类
|
||||
@device("camera", auto_start=True)
|
||||
@device("camera", auto_start=False)
|
||||
class Camera(EdgeComponent):
|
||||
signals = CameraSignals()
|
||||
|
||||
|
@ -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
27
start.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user