mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 22:17:01 +08:00
Added pthread cancelling when calling opticflow_module_stop()
Added pthread cancelling of opticflow thread and returns error on failure. closes #1578
This commit is contained in:
committed by
Felix Ruess
parent
1e35a83e43
commit
0b13661a13
@@ -213,7 +213,10 @@ void opticflow_module_stop(void)
|
|||||||
// Stop the capturing
|
// Stop the capturing
|
||||||
v4l2_stop_capture(opticflow_dev);
|
v4l2_stop_capture(opticflow_dev);
|
||||||
|
|
||||||
// TODO: fix thread stop
|
// Cancel the opticalflow calculation thread
|
||||||
|
if (pthread_cancel(opticflow_calc_thread) != 0) {
|
||||||
|
printf("Thread cancel did not work\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user