Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/Tools/AP_Periph/actuator_telem.h
9688 views
1
#pragma once
2
3
#if AP_PERIPH_ACTUATOR_TELEM_ENABLED
4
5
#ifndef HAL_ACTUATOR_TELEM_CURR_MAX_CHANNELS
6
#define HAL_ACTUATOR_TELEM_CURR_MAX_CHANNELS 4
7
#endif
8
9
// Manager for all actuator channels
10
class ActuatorTelem {
11
public:
12
friend class AP_Periph_FW;
13
ActuatorTelem(void);
14
15
void init(void);
16
void send_telemetry(uint8_t channel_index, uint8_t actuator_id);
17
void update(void);
18
19
static const struct AP_Param::GroupInfo var_info[];
20
21
private:
22
AP_Int16 rate;
23
AP_Int8 num_chans;
24
AP_Int8 curr_pin1;
25
AP_Float curr_amp_offset;
26
AP_Float curr_amp_per_volt;
27
AP_Float curr_max;
28
uint32_t last_telem_update_ms;
29
AP_HAL::AnalogSource *analog_sources[HAL_ACTUATOR_TELEM_CURR_MAX_CHANNELS];
30
};
31
32
#endif // AP_PERIPH_ACTUATOR_TELEM_ENABLED
33
34