Skip to content

Commit

Permalink
Added a default port to start the tfmini driver without requiring arg…
Browse files Browse the repository at this point in the history
…uments.
  • Loading branch information
mcsauder committed Jun 13, 2019
1 parent cd8e982 commit df26ee0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/drivers/distance_sensor/tfmini/tfmini.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@

#include "tfmini_parser.h"

#define TFMINI_DEFAULT_PORT "/dev/ttyS3"

/* Configuration Constants */

class TFMINI : public cdev::CDev, public px4::ScheduledWorkItem
Expand Down Expand Up @@ -804,7 +806,7 @@ extern "C" __EXPORT int tfmini_main(int argc, char *argv[])
{
int ch;
uint8_t rotation = distance_sensor_s::ROTATION_DOWNWARD_FACING;
const char *device_path = "";
const char *device_path = TFMINI_DEFAULT_PORT;
int myoptind = 1;
const char *myoptarg = nullptr;

Expand Down

0 comments on commit df26ee0

Please sign in to comment.