ROVER - added tasks (hono interaction and cpu logger) to the main application
Signed-off-by: Mustafa Ozcelikors <mozcelikors@gmail.com>
diff --git a/rover/src/RaspberryTest.cpp b/rover/src/RaspberryTest.cpp
index eb046f3..ce81e15 100644
--- a/rover/src/RaspberryTest.cpp
+++ b/rover/src/RaspberryTest.cpp
@@ -39,6 +39,8 @@
#include "tasks/adaptive_cruise_control_task.h"
#include "tasks/record_sensor_data.h"
#include "tasks/parking_task.h"
+#include "tasks/hono_interaction_task.h"
+#include "tasks/cpu_logger_task.h"
#include "interfaces.h"
#include "pthread_monitoring/collect_thread_name.h"
@@ -200,6 +202,8 @@
pthread_t adaptive_cruise_control_thread;
pthread_t record_sensor_data_thread;
pthread_t parking_thread;
+ pthread_t hono_interaction_thread;
+ pthread_t cpu_logger_thread;
//Thread creation
@@ -323,6 +327,24 @@
pthread_setname_np(parking_thread, "parking"); //If name is too long, this function silently fails.
}
+ if(pthread_create(&hono_interaction_thread, NULL, Hono_Interaction_Task, NULL)) {
+ fprintf(stderr, "Error creating thread\n");
+ return 1;
+ }
+ else
+ {
+ pthread_setname_np(hono_interaction_thread, "hono"); //If name is too long, this function silently fails.
+ }
+
+ if(pthread_create(&cpu_logger_thread, NULL, Cpu_Logger_Task, NULL)) {
+ fprintf(stderr, "Error creating thread\n");
+ return 1;
+ }
+ else
+ {
+ pthread_setname_np(cpu_logger_thread, "cpulog"); //If name is too long, this function silently fails.
+ }
+
//Core pinning/mapping
placeAThreadToCore (main_thread, 1);
placeAThreadToCore (ultrasonic_sr04_front_thread, 2);