mirror of https://github.com/ArduPilot/ardupilot
SITL: SIM_RichenPower: remove reference to stderr
This commit is contained in:
parent
c9df857f16
commit
aa4f375015
|
@ -27,6 +27,8 @@
|
|||
|
||||
using namespace SITL;
|
||||
|
||||
extern const AP_HAL::HAL& hal;
|
||||
|
||||
// table of user settable parameters
|
||||
const AP_Param::GroupInfo RichenPower::var_info[] = {
|
||||
|
||||
|
@ -61,6 +63,11 @@ RichenPower::RichenPower() : SerialDevice::SerialDevice()
|
|||
u.packet.footermagic2 = 0xAA;
|
||||
}
|
||||
|
||||
void RichenPower::set_run_state(State newstate) {
|
||||
hal.console->printf("Moving to state %u from %u\n", (unsigned)newstate, (unsigned)_state);
|
||||
_state = newstate;
|
||||
}
|
||||
|
||||
void RichenPower::update(const struct sitl_input &input)
|
||||
{
|
||||
if (!_enabled.get()) {
|
||||
|
|
|
@ -46,8 +46,6 @@ arm throttle (denied because generator not running)
|
|||
|
||||
#include "SIM_SerialDevice.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
namespace SITL {
|
||||
|
||||
class RichenPower : public SerialDevice {
|
||||
|
@ -87,10 +85,7 @@ private:
|
|||
STOPPING = 24, // idle cool-down period
|
||||
};
|
||||
State _state = State::STOP;
|
||||
void set_run_state(State newstate) {
|
||||
::fprintf(stderr, "Moving to state %u from %u\n", (unsigned)newstate, (unsigned)_state);
|
||||
_state = newstate;
|
||||
}
|
||||
void set_run_state(State newstate);
|
||||
|
||||
AP_Int8 _enabled; // enable richenpower sim
|
||||
AP_Int8 _ctrl_pin;
|
||||
|
|
Loading…
Reference in New Issue