mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
Changed getopt with px4_getopt which was causing motor_test to always go to the usage function
This commit is contained in:
committed by
Lorenz Meier
parent
03c3ea0040
commit
304afa5629
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user