mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 16:13:33 +08:00
delete drv_mixer.h
This commit is contained in:
@@ -1204,43 +1204,3 @@ int MixingOutput::controlCallback(uintptr_t handle, uint8_t control_group, uint8
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void MixingOutput::resetMixer()
|
||||
{
|
||||
if (_mixers != nullptr) {
|
||||
delete _mixers;
|
||||
_mixers = nullptr;
|
||||
_groups_required = 0;
|
||||
}
|
||||
|
||||
_interface.mixerChanged();
|
||||
}
|
||||
|
||||
int MixingOutput::loadMixer(const char *buf, unsigned len)
|
||||
{
|
||||
if (_mixers == nullptr) {
|
||||
_mixers = new MixerGroup();
|
||||
}
|
||||
|
||||
if (_mixers == nullptr) {
|
||||
_groups_required = 0;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
int ret = _mixers->load_from_buf(controlCallback, (uintptr_t)this, buf, len);
|
||||
|
||||
if (ret != 0) {
|
||||
PX4_ERR("mixer load failed with %d", ret);
|
||||
delete _mixers;
|
||||
_mixers = nullptr;
|
||||
_groups_required = 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
_mixers->groups_required(_groups_required);
|
||||
PX4_DEBUG("loaded mixers \n%s\n", buf);
|
||||
|
||||
updateParams();
|
||||
_interface.mixerChanged();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -165,17 +165,6 @@ public:
|
||||
|
||||
void setMaxTopicUpdateRate(unsigned max_topic_update_interval_us);
|
||||
|
||||
/**
|
||||
* Reset (unload) the complete mixer.
|
||||
*/
|
||||
void resetMixer();
|
||||
|
||||
/**
|
||||
* Load (append) a new mixer from a buffer.
|
||||
* @return 0 on success, <0 error otherwise
|
||||
*/
|
||||
int loadMixer(const char *buf, unsigned len);
|
||||
|
||||
const actuator_armed_s &armed() const { return _armed; }
|
||||
|
||||
bool initialized() const { return _use_dynamic_mixing || _mixers != nullptr; }
|
||||
|
||||
Reference in New Issue
Block a user