ardupilot/libraries/AP_SBusOut/AP_SBusOut.h
Andrew Tridgell dec3a27d91 AP_SBusOut: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00

36 lines
636 B
C++

/*
* AP_SBusOut.h
*
* Created on: Aug 19, 2017
* Author: Mark Whitehorn
*/
#pragma once
#include <AP_HAL/AP_HAL.h>
#include <AP_SerialManager/AP_SerialManager.h>
#include <AP_Param/AP_Param.h>
class AP_SBusOut {
public:
AP_SBusOut();
/* Do not allow copies */
AP_SBusOut(const AP_SBusOut &other) = delete;
AP_SBusOut &operator=(const AP_SBusOut&) = delete;
static const struct AP_Param::GroupInfo var_info[];
void update();
private:
AP_HAL::UARTDriver *sbus1_uart;
void init(void);
uint16_t sbus_frame_interval; // microseconds
AP_Int16 sbus_rate;
bool initialised;
};