diff --git a/Sources/src/Visnode/cameras/cameraManager.cpp b/Sources/src/Visnode/cameras/cameraManager.cpp index fc965f3..f66eb68 100644 --- a/Sources/src/Visnode/cameras/cameraManager.cpp +++ b/Sources/src/Visnode/cameras/cameraManager.cpp @@ -73,7 +73,7 @@ void cameraManager::runCapture(){ std::thread* t = new std::thread(cameraManager::runCaptureForCamera,c,i); i++; cout << "moving thread" << endl; - Threadweaver::stick_this_thread_to_core(t,i); + Threadweaver::stick_this_thread_to_core(t,i+1); Threadweaver::captureThreads.push_back(t); cout << "done" << endl; } diff --git a/Sources/src/Visnode/hw/serial.cpp b/Sources/src/Visnode/hw/serial.cpp index d97a65c..9478181 100644 --- a/Sources/src/Visnode/hw/serial.cpp +++ b/Sources/src/Visnode/hw/serial.cpp @@ -44,14 +44,17 @@ void SerialPortManager::init(){ printf("Error %i from tcsetattr: %s\n", errno, strerror(errno)); return; } - shouldRun = true; + shouldRun = false; cout << "starting hardware watcher thread" << endl; std::thread* t = new std::thread(SerialPortManager::runPort); cout << "done" << endl; + Threadweaver::stick_this_thread_to_core(t,3); Threadweaver::hardwareWatcherThread = t; + shouldRun = true; } void SerialPortManager::runPort(){ + while(!shouldRun){} char read_buf [256]; int n = 0; while(shouldRun){ diff --git a/Sources/src/Visnode/main.cpp b/Sources/src/Visnode/main.cpp index a465148..2d82b42 100644 --- a/Sources/src/Visnode/main.cpp +++ b/Sources/src/Visnode/main.cpp @@ -23,7 +23,7 @@ ui::UiController::exitCalled = false; ui::UiController::runIntro = false; std::thread* t = new std::thread(ui::UiDrawer::runDrawUi); -Threadweaver::stick_this_thread_to_core(t,0); +Threadweaver::stick_this_thread_to_core(t,1); Threadweaver::osUiDrawerThread = t; while(!ui::UiController::exitCalled){ diff --git a/Sources/src/Visnode/prog b/Sources/src/Visnode/prog index 58d01e7..e0c2d7a 100755 Binary files a/Sources/src/Visnode/prog and b/Sources/src/Visnode/prog differ