Skip to content
Snippets Groups Projects
Commit 304afa56 authored by Simone Guscetti's avatar Simone Guscetti Committed by Lorenz Meier
Browse files

Changed getopt with px4_getopt which was causing motor_test to always go to the usage function

parent 03c3ea00
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,7 @@
*/
#include <px4_config.h>
#include <px4_getopt.h>
#include <stdio.h>
#include <stdlib.h>
......@@ -103,7 +104,10 @@ int motor_test_main(int argc, char *argv[])
float value = 0.0f;
int ch;
while ((ch = getopt(argc, argv, "m:p:")) != EOF) {
int myoptind = 1;
const char *myoptarg = NULL;
while ((ch = px4_getopt(argc, argv, "m:p:", &myoptind, &myoptarg)) != EOF) {
switch (ch) {
case 'm':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment