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