-
Notifications
You must be signed in to change notification settings - Fork 51
Fix compile time and runtime issues with testapp #174
Conversation
Fixes the issue #173 and #172 |
sleep(intervel + 1); | ||
log_info("Enter the interval in which images to be taken"); | ||
int interval; | ||
scanf("%d", &interval); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using scanf
is vulnerable and discouraged in C++. If user provides non-digit input, then app behavior is undefined. So, I suggest to use std::cin
. I suggest to apply throughout the test application.
test/test_mavlink_protocol.cpp
Outdated
@@ -40,6 +40,8 @@ | |||
|
|||
using namespace std; | |||
|
|||
void discovercam(void *cntx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about making it a public static method of Drone
?
@@ -1,5 +1,5 @@ | |||
/* | |||
* This file is part of the Camera Streaming Daemon project | |||
* This file is part of the Dronecode Camera Manager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to add a brief description of what the app does. Sample here.
@lbegani should this still go in? |
test/test_mavlink_protocol.cpp
Outdated
@@ -18,7 +18,7 @@ | |||
|
|||
/** | |||
|
|||
@brief This is a test application to test mavlink messages in the Camera Streaming Daemon. | |||
@brief This is a test application to test mavlink imessages in the Dronecode Camera Manager. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imessages ?
For now, we can close this by merging it. Improvements can go in later. |
To me it looks like @shakthi-prashanth-m 's comments should be addressed though. I might add them before merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
No description provided.