21 #define TEST_FILTER 5.0f 23 #define TEST_INITIAL_FF 0.0f 42 float control_P, control_I, control_D;
45 hal.
console->
printf(
"P %f I %f D %f imax %f\n", (
double)pid.
kP(), (double)pid.
kI(), (double)pid.
kD(), (double)pid.
imax());
53 error = radio_in - radio_trim;
55 control_P = pid.
get_p();
56 control_I = pid.
get_i();
57 control_D = pid.
get_d();
60 hal.
console->
printf(
"radio: %d\t err: %d\t pid:%4.2f (p:%4.2f i:%4.2f d:%4.2f)\n",
61 (
int)radio_in, (
int)error,
62 (
double)(control_P+control_I+control_D),
63 (
double)control_P, (
double)control_I, (
double)control_D);
Generic PID algorithm, with EEPROM-backed storage of constants.
AP_HAL::UARTDriver * console
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
virtual void delay(uint16_t ms)=0
virtual void printf(const char *,...) FMT_PRINTF(2
Helicopter Specific Rate PID algorithm, with EEPROM-backed storage of constants.
RC_Channel manager, with EEPROM-backed storage of constants.
static bool read_input(void)
void set_input_filter_all(float input)
static uint16_t get_radio_in(const uint8_t chan)
#define error(fmt, args ...)
Copter PID control class.
AP_HAL::Scheduler * scheduler