Bugfix: Hard Fault hmc5883 with not params

Fault results from if (!strcmp(verb, "start")) {``` with null verb
This commit is contained in:
David Sidrane 2016-10-21 15:40:00 -10:00 committed by Lorenz Meier
parent bdfb2bbb8d
commit a2ad92b2d7

View File

@ -1779,6 +1779,11 @@ hmc5883_main(int argc, char *argv[])
bool calibrate = false;
bool temp_compensation = false;
if (argc < 2) {
hmc5883::usage();
exit(0);
}
while ((ch = getopt(argc, argv, "XISR:CT")) != EOF) {
switch (ch) {
case 'R':