35 #ifndef RPM_FILTER_TAU
36 #define RPM_FILTER_TAU RPM_SENSOR_PERIODIC_PERIOD
39 #ifndef RPM_SENSOR_ACTUATOR_IDX
40 #error "You need to define an actuator for which the RPM is read, please define RPM_SENSOR_ACTUATOR_IDX"
44 #if PERIODIC_TELEMETRY
59 #if PERIODIC_TELEMETRY
68 feedback.
idx = RPM_SENSOR_ACTUATOR_IDX;
80 rpm_meas = ((
uint32_t)1000000 * 60) / period_us;
Main include for ABI (AirBorneInterface).
#define ACT_FEEDBACK_RPM_SENSOR_ID
struct Electrical electrical
Interface for electrical status: supply voltage, current, battery status, etc.
float current
current in A
Simple first order low pass filter with bilinear transform.
static float update_first_order_low_pass(struct FirstOrderLowPass *filter, float value)
Update first order low pass filter state with a new value.
static void init_first_order_low_pass(struct FirstOrderLowPass *filter, float tau, float sample_time, float value)
Init first order low pass filter.
First order low pass filter structure.
struct act_feedback_t::act_feedback_set_t set
Bitset registering what is set as feedback.
uint8_t idx
General index of the actuators (generated in airframe.h)
static struct FirstOrderLowPass rpm_lp
static void rpm_sensor_send_motor(struct transport_tx *trans, struct link_device *dev)
void rpm_sensor_periodic(void)
uint16_t rpm_sensor_get_rpm(void)
void rpm_sensor_init(void)
#define RPM_PULSE_PER_RND
static const struct usb_device_descriptor dev
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
Periodic telemetry system header (includes downlink utility and generated code).
#define DefaultPeriodic
Set default periodic telemetry.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.