diff --git a/sw/airborne/modules/computer_vision/cv_blob_locator.c b/sw/airborne/modules/computer_vision/cv_blob_locator.c index 4b1ad49d45..03e65456d8 100644 --- a/sw/airborne/modules/computer_vision/cv_blob_locator.c +++ b/sw/airborne/modules/computer_vision/cv_blob_locator.c @@ -53,11 +53,11 @@ volatile bool_t marker_enabled = FALSE; volatile bool_t window_enabled = FALSE; // Computer vision thread -bool_t cv_marker_func(struct image_t *img); -bool_t cv_marker_func(struct image_t *img) { +struct image_t* cv_marker_func(struct image_t *img); +struct image_t* cv_marker_func(struct image_t *img) { if (!marker_enabled) - return FALSE; + return NULL; struct marker_deviation_t m = marker(img, marker_size); @@ -66,18 +66,18 @@ bool_t cv_marker_func(struct image_t *img) { temp += m.y; blob_locator = temp; - return FALSE; + return NULL; } #define Img(X,Y)(((uint8_t*)img->buf)[(Y)*img->w*2+(X)*2]) // Computer vision thread -bool_t cv_window_func(struct image_t *img); -bool_t cv_window_func(struct image_t *img) { +struct image_t* cv_window_func(struct image_t *img); +struct image_t* cv_window_func(struct image_t *img) { if (!window_enabled) - return FALSE; + return NULL; uint16_t coordinate[2] = {0,0}; @@ -114,15 +114,15 @@ bool_t cv_window_func(struct image_t *img) { } - return FALSE; + return NULL; } -bool_t cv_blob_locator_func(struct image_t *img); -bool_t cv_blob_locator_func(struct image_t *img) { +struct image_t* cv_blob_locator_func(struct image_t *img); +struct image_t* cv_blob_locator_func(struct image_t *img) { if (!blob_enabled) - return 0; + return NULL; // Color Filter @@ -209,7 +209,7 @@ bool_t cv_blob_locator_func(struct image_t *img) { image_free(&dst); - return 0; // No new image is available for follow up modules + return NULL; // No new image is available for follow up modules } #include "modules/computer_vision/cv_georeference.h" diff --git a/sw/airborne/modules/computer_vision/detect_window.c b/sw/airborne/modules/computer_vision/detect_window.c index 0101849d63..fb76dc83ce 100644 --- a/sw/airborne/modules/computer_vision/detect_window.c +++ b/sw/airborne/modules/computer_vision/detect_window.c @@ -31,12 +31,12 @@ #include "detect_window.h" #include -extern void detect_window_init(void) +void detect_window_init(void) { cv_add(detect_window); } -extern bool_t detect_window(struct image_t *img) +struct image_t* detect_window(struct image_t *img) { uint16_t coordinate[2]; @@ -53,7 +53,7 @@ extern bool_t detect_window(struct image_t *img) printf("Response = %d\n", response); image_free(&gray); - return 0; // No new image was created + return NULL; // No new image was created } diff --git a/sw/airborne/modules/computer_vision/detect_window.h b/sw/airborne/modules/computer_vision/detect_window.h index 47f6d03d14..5cfea9f661 100644 --- a/sw/airborne/modules/computer_vision/detect_window.h +++ b/sw/airborne/modules/computer_vision/detect_window.h @@ -35,7 +35,7 @@ #include "inttypes.h" extern void detect_window_init(void); -extern bool_t detect_window(struct image_t *img); +extern struct image_t* detect_window(struct image_t *img); uint16_t detect_window_sizes(uint8_t *in, uint32_t image_width, uint32_t image_height, uint16_t *coordinate, uint32_t *integral_image, uint8_t MODE); diff --git a/sw/airborne/modules/computer_vision/qrcode/qr_code.c b/sw/airborne/modules/computer_vision/qrcode/qr_code.c index 41917da9c3..9b19702291 100644 --- a/sw/airborne/modules/computer_vision/qrcode/qr_code.c +++ b/sw/airborne/modules/computer_vision/qrcode/qr_code.c @@ -99,5 +99,5 @@ struct image_t* qrscan(struct image_t *img) zbar_image_destroy(image); //zbar_image_scanner_destroy(scanner); - return 0; // QRCode is not returning a new image. + return NULL; // QRCode is not returning a new image. } diff --git a/sw/airborne/modules/computer_vision/viewvideo.c b/sw/airborne/modules/computer_vision/viewvideo.c index bf518e622c..4f5283f66e 100644 --- a/sw/airborne/modules/computer_vision/viewvideo.c +++ b/sw/airborne/modules/computer_vision/viewvideo.c @@ -189,7 +189,7 @@ struct image_t* viewvideo_function(struct image_t *img) // Free all buffers image_free(&img_jpeg); image_free(&img_small); - return 0; // No new images were created + return NULL; // No new images were created } /**