PX4 Firmware
PX4 Autopilot Software http://px4.io
sf0x Namespace Reference

Local functions in support of the shell command. More...

Functions

int start (const char *port, uint8_t rotation)
 Start the driver. More...
 
int stop ()
 Stop the driver. More...
 
int test ()
 Perform some basic functional tests on the driver; make sure we can collect data from the sensor in polled and automatic modes. More...
 
int reset ()
 Reset the driver. More...
 
int info ()
 Print a little info about the driver. More...
 

Variables

SF0Xg_dev
 

Detailed Description

Local functions in support of the shell command.

Function Documentation

◆ info()

int sf0x::info ( )

Print a little info about the driver.

Definition at line 843 of file sf0x.cpp.

References SF0X::print_info().

Referenced by sf0x_main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

int sf0x::reset ( )

Reset the driver.

Definition at line 817 of file sf0x.cpp.

References fd, SF0X::ioctl(), cdev::CDev::open(), RANGE_FINDER0_DEVICE_PATH, SENSOR_POLLRATE_DEFAULT, SENSORIOCRESET, and SENSORIOCSPOLLRATE.

Referenced by sf0x_main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start()

int sf0x::start ( const char *  port,
uint8_t  rotation 
)

Start the driver.

Definition at line 685 of file sf0x.cpp.

References fd, g_dev, SF0X::init(), SF0X::ioctl(), OK, cdev::CDev::open(), RANGE_FINDER0_DEVICE_PATH, SENSOR_POLLRATE_DEFAULT, SENSORIOCSPOLLRATE, and SF0X::SF0X().

Referenced by sf0x_main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop()

int sf0x::stop ( )

Stop the driver.

Stop the driver.

Definition at line 732 of file sf0x.cpp.

References g_dev.

Referenced by sf0x_main().

Here is the caller graph for this function:

◆ test()

int sf0x::test ( )

Perform some basic functional tests on the driver; make sure we can collect data from the sensor in polled and automatic modes.

Definition at line 751 of file sf0x.cpp.

References fd, SF0X::ioctl(), OK, cdev::CDev::open(), cdev::CDev::poll(), RANGE_FINDER0_DEVICE_PATH, SF0X::read(), SENSOR_POLLRATE_DEFAULT, and SENSORIOCSPOLLRATE.

Referenced by sf0x_main().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_dev

SF0X* sf0x::g_dev

Definition at line 673 of file sf0x.cpp.

Referenced by start(), and stop().