diff --git a/src/camera.cpp b/src/camera.cpp index 6dafa75..bfd7c0d 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -321,7 +321,7 @@ DetectLoop::DetectLoop(shared_t *sharedRes, QThread *thr, QObject *parent) : Loo void DetectLoop::init() { - thread()->usleep(200); + thread()->sleep(1); resetTimers(); Loop::init(); } diff --git a/src/common.cpp b/src/common.cpp index 2c0d258..859f32d 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -235,7 +235,7 @@ void MultiInstance::procChanged(QProcess::ProcessState newState) int MultiInstance::start(const QStringList &args) { auto ret = ENOENT; - auto path = getParam("-d", args); + auto path = QDir().cleanPath(getParam("-d", args)); auto files = lsFilesInDir(path); if (!QDir(path).exists()) @@ -248,13 +248,15 @@ int MultiInstance::start(const QStringList &args) } else { + ret = 0; + for (auto &&conf : files) { auto proc = new QProcess(this); QStringList subArgs; - subArgs << "-c" << conf; + subArgs << "-c" << path + "/" + conf; connect(proc, &QProcess::readyReadStandardOutput, this, &MultiInstance::instStdout); connect(proc, &QProcess::readyReadStandardError, this, &MultiInstance::instStderr); diff --git a/src/common.h b/src/common.h index a4ed010..726ea67 100644 --- a/src/common.h +++ b/src/common.h @@ -26,11 +26,12 @@ #include #include +#include using namespace cv; using namespace std; -#define APP_VER "3.0.t2" +#define APP_VER "3.0.t3" #define APP_NAME "Motion Watch" #define APP_BIN "mow" #define REC_LOG_NAME "rec_log_lines.html" diff --git a/src/main.cpp b/src/main.cpp index 78779ee..81b1ba4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,6 +20,8 @@ int main(int argc, char** argv) QCoreApplication::setApplicationName(APP_NAME); QCoreApplication::setApplicationVersion(APP_VER); + cv::utils::logging::setLogLevel(cv::utils::logging::LogLevel::LOG_LEVEL_DEBUG); + auto args = QCoreApplication::arguments(); auto ret = 0;