PX4 Firmware
PX4 Autopilot Software http://px4.io
uavcan_main.cpp File Reference

Implements basic functionality of UAVCAN node. More...

#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/tasks.h>
#include <cstdlib>
#include <cstring>
#include <fcntl.h>
#include <systemlib/err.h>
#include <parameters/param.h>
#include <version/version.h>
#include <arch/board/board.h>
#include <arch/chip/chip.h>
#include <uORB/topics/esc_status.h>
#include <drivers/drv_hrt.h>
#include <drivers/drv_mixer.h>
#include <drivers/drv_pwm_output.h>
#include "uavcan_module.hpp"
#include "uavcan_main.hpp"
#include <uavcan/util/templates.hpp>
#include <uavcan/protocol/param/ExecuteOpcode.hpp>
Include dependency graph for uavcan_main.cpp:

Go to the source code of this file.

Macros

#define OK   0
 

Functions

static void print_usage ()
 
__EXPORT int uavcan_main (int argc, char *argv[])
 

Detailed Description

Macro Definition Documentation

◆ OK

#define OK   0

Definition at line 71 of file uavcan_main.cpp.

Referenced by DfMPU6050Wrapper::_update_accel_calibration(), DfLsm9ds1Wrapper::_update_accel_calibration(), DfMpu9250Wrapper::_update_accel_calibration(), DfMPU6050Wrapper::_update_gyro_calibration(), DfLsm9ds1Wrapper::_update_gyro_calibration(), DfMpu9250Wrapper::_update_gyro_calibration(), DfAK8963Wrapper::_update_mag_calibration(), DfHmc5883Wrapper::_update_mag_calibration(), DfLsm9ds1Wrapper::_update_mag_calibration(), DfMpu9250Wrapper::_update_mag_calibration(), LSM303D::accel_set_onchip_lowpass_filter_bandwidth(), FXOS8701CQ::accel_set_range(), LSM303D::accel_set_range(), BMI088_accel::accel_set_sample_rate(), BMI160::accel_set_sample_rate(), FXOS8701CQ::accel_set_samplerate(), LSM303D::accel_set_samplerate(), BatteryStatus::adc_init(), Sensors::adc_init(), adc_main(), ICM20948_mag::ak09916_reset(), ICM20948_mag::ak09916_setup(), ICM20948_mag::ak09916_setup_master_i2c(), MPU9250_mag::ak8963_reset(), MPU9250_mag::ak8963_setup(), MPU9250_mag::ak8963_setup_master_i2c(), VtolType::apply_pwm_limits(), at24c_eraseall(), at24c_ioctl(), MavlinkShell::available(), BlockLocalPositionEstimator::baroCorrect(), BlockLocalPositionEstimator::baroInit(), BlockLocalPositionEstimator::baroMeasure(), blinkm_main(), bootloader_app_shared_read(), bst_main(), lis3mdl::calibrate(), HMC5883::calibrate(), LIS3MDL::calibrate(), hmc5883::calibrate(), IST8310::calibrate(), ist8310::calibrate(), PX4FMU::capture_ioctl(), DShotOutput::capture_ioctl(), QMC5883::check_conf(), HMC5883::check_conf(), IST8310::check_conf(), HMC5883::check_range(), IST8310::check_scale(), check_user_abort(), BMP280::collect(), MS5525::collect(), ETSAirspeed::collect(), SDP3X::collect(), MEASAirspeed::collect(), CM8JL65::collect(), LidarLiteI2C::collect(), MPL3115A2::collect(), SF1XX::collect(), SF0X::collect(), LSM303AGR::collect(), MS5611::collect(), LPS22HB::collect(), RM3100::collect(), LIS3MDL::collect(), INA226::collect(), QMC5883::collect(), LPS25H::collect(), HMC5883::collect(), BMM150::collect(), IST8310::collect(), BMP388::collect(), commander_low_prio_loop(), commander_main(), BMP388::compensate_data(), Mavlink::configure_stream(), px4::logger::Logger::create_log_dir(), RCInput::cycle(), Mavlink::destroy_all_instances(), PX4IO::detect(), LED::devIOCTL(), GPSSIM::devIOCTL(), do_esc_calibration(), PX4IO_Uploader::drain(), dsm_port_input(), Mavlink::enable_flow_control(), esc_calib_main(), MPU6000::factory_self_test(), MuorbTestExample::FileReadTest(), BlockLocalPositionEstimator::flowCorrect(), BlockLocalPositionEstimator::flowInit(), BlockLocalPositionEstimator::flowMeasure(), PX4FMU::fmu_new_mode(), format_fault_file_name(), format_fault_time(), genfault(), RGBLED_PWM::get(), RGBLED::get(), PX4IO_Uploader::get_info(), BlinkM::get_rgb(), BMP388::get_sensor_data(), PX4IO_Uploader::get_sync(), BlockLocalPositionEstimator::getDelayPeriods(), BlockLocalPositionEstimator::gpsCorrect(), BlockLocalPositionEstimator::gpsInit(), BlockLocalPositionEstimator::gpsMeasure(), BMI055_gyro::gyro_set_sample_rate(), BMI088_gyro::gyro_set_sample_rate(), BMI160::gyro_set_sample_rate(), hardfault_check_status(), hardfault_commit(), hardfault_dowrite(), hardfault_increment_reboot(), hardfault_rearm(), hardfault_write(), uORBTest::UnitTest::info(), IRLOCK::info(), PCA9685::info(), BMP280::init(), RGBLED_PWM::init(), FXAS21002C::init(), ADIS16477::init(), ToneAlarm::init(), RGBLED::init(), RGBLED_NPC5623C::init(), MPL3115A2::init(), TEST_PPM::init(), __EXPORT::SPI::init(), PX4FLOW::init(), SF0X::init(), TERARANGER::init(), AK09916::init(), SF1XX::init(), LPS22HB::init(), ADIS16497::init(), GPSSIM::init(), PMW3901::init(), PAW3902::init(), SRF02::init(), LSM303AGR::init(), VL53LXX::init(), MB12XX::init(), MS5611::init(), IRLOCK::init(), ADIS16448::init(), LIS3MDL::init(), Radar::init(), px4::bst::BST::init(), UavcanEsc::init(), HMC5883::init(), FXOS8701CQ::init(), PCA9685::init(), BlinkM::init(), RM3100::init(), BMA180::init(), BMI088_gyro::init(), MK::init(), DShotOutput::init(), BMI055_gyro::init(), QMC5883::init(), PX4FMU::init(), PX4IO::init(), BMI055_accel::init(), LSM303D::init(), VOXLPM::init(), INA226::init(), LPS25H::init(), BMI088_accel::init(), UavcanNode::init(), L3GD20::init(), PWMIN::init(), IST8310::init(), BMM150::init(), MPU9250::init(), BMI160::init(), MPU6000::init(), BMP388::init(), ICM20948::init(), BMM150::init_trim_registers(), PX4IO::io_get_raw_rc_input(), PX4IO::io_get_status(), PX4IO::io_publish_pwm_outputs(), PX4IO::io_publish_raw_rc(), PX4IO::io_reg_get(), PX4IO::io_reg_modify(), PX4IO::io_reg_set(), PX4IO::io_set_control_state(), PX4IO::io_set_rc_config(), Airspeed::ioctl(), PWMSim::ioctl(), LED::ioctl(), MPL3115A2::ioctl(), SF0X::ioctl(), LPS22HB::ioctl(), SF1XX::ioctl(), SRF02::ioctl(), UavcanEsc::ioctl(), LSM303AGR::ioctl(), MS5611::ioctl(), TAP_ESC::ioctl(), uORB::DeviceNode::ioctl(), HMC5883::ioctl(), PCA9685::ioctl(), BlinkM::ioctl(), RM3100::ioctl(), BMA180::ioctl(), IridiumSBD::ioctl(), UavcanNode::ioctl(), QMC5883::ioctl(), LPS25H::ioctl(), PX4IO::ioctl(), PWMIN::ioctl(), IST8310::ioctl(), BMM150::ioctl(), iridiumsbd_main(), irlock_main(), AK09916::is_ready(), BlockLocalPositionEstimator::landCorrect(), BlockLocalPositionEstimator::landingTargetCorrect(), BlockLocalPositionEstimator::landingTargetInit(), BlockLocalPositionEstimator::landingTargetMeasure(), BlockLocalPositionEstimator::landInit(), BlockLocalPositionEstimator::landMeasure(), BlockLocalPositionEstimator::lidarCorrect(), BlockLocalPositionEstimator::lidarInit(), BlockLocalPositionEstimator::lidarMeasure(), lis3mdl_main(), FXOS8701CQ::mag_set_range(), LSM303D::mag_set_range(), LSM303D::mag_set_samplerate(), BMP280::measure(), ETSAirspeed::measure(), MEASAirspeed::measure(), AK09916::measure(), LidarLiteI2C::measure(), ADIS16477::measure(), ICM20948_mag::measure(), MPU9250_mag::measure(), ADIS16448::measure(), SF1XX::measure(), PX4FLOW::measure(), SF0X::measure(), ADIS16497::measure(), VOXLPM::measure(), MS5611::measure(), LPS22HB::measure(), BMI055_gyro::measure(), BMI055_accel::measure(), BMI088_gyro::measure(), INA226::measure(), BMI088_accel::measure(), RM3100::measure(), LIS3MDL::measure(), LPS25H::measure(), HMC5883::measure(), BMM150::measure(), MPU9250::measure(), BMI160::measure(), IST8310::measure(), BMP388::measure(), MPU6000::measure(), ICM20948::measure(), Mavlink::message_buffer_init(), MK::mk_check_for_blctrl(), MK::mk_servo_set(), mkblctrl_main(), BlockLocalPositionEstimator::mocapCorrect(), BlockLocalPositionEstimator::mocapInit(), BlockLocalPositionEstimator::mocapMeasure(), DShotOutput::module_new_mode(), motor_ramp_thread_main(), mtd_main(), muorb_main(), uORB::Utils::node_mkpath(), uORB::Manager::node_open(), nshterm_main(), PWMIN::open(), uORB::Manager::orb_exists(), orb_group_count(), param_export_internal(), param_save_default(), Sensors::parameter_update_poll(), MulticopterPositionControl::parameters_update(), VtolAttitudeControl::parameters_update(), sensors::VotedSensorsUpdate::parametersUpdate(), pca9685_main(), PreFlightCheck::preflightCheck(), prepare(), LidarLiteI2C::print_registers(), LPS22HB_I2C::probe(), LPS25H_I2C::probe(), HMC5883_I2C::probe(), RGBLED::probe(), FXAS21002C::probe(), ICM20948_SPI::probe(), MPU9250_SPI::probe(), QMC5883_I2C::probe(), AK09916::probe(), PX4FLOW::probe(), PMW3901::probe(), IRLOCK::probe(), LSM303AGR::probe(), TERARANGER::probe(), ADIS16448::probe(), LidarLiteI2C::probe(), px4::bst::BST::probe(), BlinkM::probe(), FXOS8701CQ::probe(), BMA180::probe(), BMI088_gyro::probe(), LSM303D::probe(), BMI055_gyro::probe(), INA226::probe(), BMI055_accel::probe(), BMI088_accel::probe(), L3GD20::probe(), IST8310::probe(), BMM150::probe(), BMI160::probe(), MPU6000::probe(), PX4IO_Uploader::program(), Simulator::publish_distance_topic(), Simulator::publish_flow_topic(), Simulator::publish_odometry_topic(), mpu9x50::publish_reports(), pwm_configure_rates(), MK::pwm_ioctl(), PX4FMU::pwm_ioctl(), DShotOutput::pwm_ioctl(), pwm_main(), pwmin_reset(), pwmin_start(), pwmin_tim_isr(), px4io_main(), PX4IO_serial_interface(), px4muorb_add_subscriber(), ICM20948_SPI::read(), MPU9250_SPI::read(), MPL3115A2::read(), SF0X::read(), SF1XX::read(), MS5611::read(), SRF02::read(), HMC5883::read(), LIS3MDL::read(), RM3100::read(), QMC5883::read(), LPS25H::read(), INA226::read(), IST8310::read(), BMM150::read(), PCA9685::read8(), IRLOCK::read_device(), BlinkM::read_script_line(), PMW3901::readMotionCount(), PMW3901::readRegister(), PX4IO_Uploader::reboot(), PX4IO_Uploader::recv_byte_with_timeout(), PX4IO_Uploader::recv_bytes(), recv_data(), reflect_main(), cdev::CDev::register_class_devname(), AK09916::reset(), ADIS16477::reset(), ADIS16497::reset(), BMI055_gyro::reset(), BMI088_gyro::reset(), BMI055_accel::reset(), QMC5883::reset(), BMI088_accel::reset(), RM3100::reset(), LIS3MDL::reset(), IST8310::reset(), BMM150::reset(), MPU9250::reset(), BMI160::reset(), MPU6000::reset(), ICM20948::reset(), MPU9250::reset_mpu(), ICM20948::reset_mpu(), LidarLiteI2C::reset_sensor(), rgbled_main(), rgbled_ncp5623c_main(), rgbled_pwm_main(), MS5525::Run(), ETSAirspeed::Run(), MEASAirspeed::Run(), Commander::run(), UavcanNode::run(), SRF02::Run(), SF1XX::Run(), PX4FLOW::Run(), SF0X::Run(), LPS22HB::Run(), LidarLiteI2C::Run(), MS5611::Run(), LSM303AGR::Run(), INA226::Run(), RM3100::Run(), LPS25H::Run(), LIS3MDL::Run(), QMC5883::Run(), HMC5883::Run(), IST8310::Run(), ICM20948::select_register_bank(), PX4IO_Uploader::send(), RGBLED_PWM::send_led_rgb(), MavlinkParametersManager::send_param(), send_poll(), BMI055_accel::set_accel_range(), BMI088_accel::set_accel_range(), BMI160::set_accel_range(), MPU9250::set_accel_range(), MPU6000::set_accel_range(), ICM20948::set_accel_range(), __EXPORT::I2C::set_bus_clock(), Tunes::set_control(), BMM150::set_data_rate(), HMC5883::set_excitement(), LIS3MDL::set_excitement(), BMI055_gyro::set_gyro_range(), BMI088_gyro::set_gyro_range(), BMI160::set_gyro_range(), Mavlink::set_hil_enabled(), set_min_pwm(), DShotOutput::set_mode(), PX4FMU::set_mode(), MK::set_motor_count(), MK::set_motor_test(), BMP388::set_op_mode(), set_out(), MK::set_overrideSecurityChecks(), BMM150::set_power_mode(), BMM150::set_presetmode(), PX4FMU::set_pwm_rate(), FXAS21002C::set_range(), HMC5883::set_range(), LIS3MDL::set_range(), L3GD20::set_range(), FXAS21002C::set_samplerate(), L3GD20::set_samplerate(), IST8310::set_selftest(), BMP388::set_sensor_settings(), HMC5883::set_temperature_compensation(), PX4IO::set_update_rate(), BlinkM::setMode(), PCA9685::setPWM(), PCA9685::setPWMFreq(), AK09916::setup(), BMP388::soft_reset(), BlockLocalPositionEstimator::sonarCorrect(), BlockLocalPositionEstimator::sonarInit(), BlockLocalPositionEstimator::sonarMeasure(), VL53LXX::spadCalculations(), pmw3902::start(), fxas21002c::start(), tfmini::start(), bmi160::start(), pmw3901::start(), lsm303d::start(), lsm303agr::start(), fxos8701cq::start(), bmm150::start(), bmi088::start(), bmi055::start(), ak09916::start(), CameraFeedback::start(), UavcanEsc::start(), UavcanNode::start(), test_ppm::start(), gpssim::start(), px4flow::start(), sf0x::start(), bma180::start(), l3gd20::start(), lps22hb::start_bus(), voxlpm::start_bus(), hmc5883::start_bus(), icm20948::start_bus(), ms5611::start_bus(), rm3100::start_bus(), mpu6000::start_bus(), lis3mdl::start_bus(), ets_airspeed::start_bus(), meas_airspeed::start_bus(), ina226::start_bus(), srf02::start_bus(), sf1xx::start_bus(), mpl3115a2::start_bus(), lps25h::start_bus(), qmc5883::start_bus(), ist8310::start_bus(), RGBLED_PWM::status(), RGBLED::status(), IridiumSBD::stop(), Mavlink::stream_command(), IRLOCK::sync_device(), PX4IO::task_main(), Mavlink::task_main(), task_main(), RoverPositionControl::task_spawn(), uORBTest::UnitTest::test(), IRLOCK::test(), lis3mdl::test(), srf02::test(), sf1xx::test(), sf0x::test(), test_adc(), test_file(), test_jig_voltages(), test_mount(), uORBTest::UnitTest::test_note(), test_param(), test_perf(), test_ppm_loopback(), test_servo(), test_sleep(), test_uart_baudchange(), test_uart_break(), tone_alarm_main(), uorb_main(), uorb_tests_main(), battery_status::update_parameters(), RCUpdate::update_parameters(), PX4IO_Uploader::upload(), PX4IO_Uploader::verify_rev2(), PX4IO_Uploader::verify_rev3(), BlockLocalPositionEstimator::visionCorrect(), BlockLocalPositionEstimator::visionInit(), BlockLocalPositionEstimator::visionMeasure(), PX4IO::write(), PCA9685::write8(), write_dump_info(), write_dump_time(), write_registers(), write_stack(), write_stack_detail(), OSDatxxxx::writeRegister(), and PMW3901::writeRegister().

Function Documentation

◆ print_usage()

static void print_usage ( void  )
static

Definition at line 996 of file uavcan_main.cpp.

References uavcan_main().

Referenced by bl_update_main(), SafetyButton::custom_command(), Sih::custom_command(), land_detector::LandDetector::custom_command(), RCUpdate::RCUpdate::custom_command(), px4::logger::Logger::custom_command(), mtd_main(), and uavcan_main().

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

◆ uavcan_main()

int uavcan_main ( int  argc,
char *  argv[] 
)

Definition at line 1006 of file uavcan_main.cpp.

References UavcanNode::CheckFW, command, errx, UavcanNode::fw_server(), UavcanNode::get_node(), UavcanNode::get_param(), UavcanNode::hardpoint_controller_set(), UavcanServers::instance(), UavcanNode::instance(), UavcanNode::list_params(), param_find(), param_get(), UavcanNode::print_info(), print_usage(), UavcanNode::reset_node(), UavcanNode::save_params(), UavcanNode::set_param(), UavcanNode::shrink(), UavcanNode::Start, UavcanNode::start(), and UavcanNode::Stop.

Referenced by print_usage().

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