diff --git a/src/drivers/px4fmu/fmu.cpp b/src/drivers/px4fmu/fmu.cpp index 7620d82eae..1de83689a4 100644 --- a/src/drivers/px4fmu/fmu.cpp +++ b/src/drivers/px4fmu/fmu.cpp @@ -405,15 +405,15 @@ PX4FMU::init() return ret; } - if (_mode != MODE_NONE) { - /* try to claim the generic PWM output device node as well - it's OK if we fail at this */ - _class_instance = register_class_devname(PWM_OUTPUT_BASE_DEVICE_PATH); + // XXX best would be to register / de-register the device depending on modes - if (_class_instance == CLASS_DEVICE_PRIMARY) { - /* lets not be too verbose */ - } else if (_class_instance < 0) { - warnx("FAILED registering class device"); - } + /* try to claim the generic PWM output device node as well - it's OK if we fail at this */ + _class_instance = register_class_devname(PWM_OUTPUT_BASE_DEVICE_PATH); + + if (_class_instance == CLASS_DEVICE_PRIMARY) { + /* lets not be too verbose */ + } else if (_class_instance < 0) { + warnx("FAILED registering class device"); } _safety_disabled = circuit_breaker_enabled("CBRK_IO_SAFETY", CBRK_IO_SAFETY_KEY);