2019-05-26 22:46:41 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AP_Common/AP_Common.h>
|
|
|
|
|
|
|
|
// Global parameter class.
|
|
|
|
//
|
|
|
|
class Parameters {
|
|
|
|
public:
|
|
|
|
static const uint16_t k_format_version = 2;
|
|
|
|
|
|
|
|
enum {
|
|
|
|
// Layout version number, always key zero.
|
|
|
|
//
|
|
|
|
k_param_format_version = 0,
|
|
|
|
k_param_gps,
|
|
|
|
k_param_compass,
|
|
|
|
k_param_can_node,
|
|
|
|
k_param_can_baudrate,
|
|
|
|
k_param_baro,
|
2019-08-31 04:20:53 -03:00
|
|
|
k_param_buzz_volume,
|
2019-10-10 00:18:59 -03:00
|
|
|
k_param_led_brightness,
|
2019-10-03 08:02:56 -03:00
|
|
|
k_param_airspeed,
|
2019-10-19 01:36:14 -03:00
|
|
|
k_param_rangefinder,
|
2019-10-23 04:57:27 -03:00
|
|
|
k_param_flash_bootloader,
|
2019-10-27 21:31:29 -03:00
|
|
|
k_param_rangefinder_baud,
|
2019-11-26 20:06:34 -04:00
|
|
|
k_param_adsb_baudrate,
|
2019-12-19 02:21:25 -04:00
|
|
|
k_param_hardpoint_id,
|
2019-12-19 03:46:03 -04:00
|
|
|
k_param_hardpoint_rate,
|
2019-12-25 04:58:51 -04:00
|
|
|
k_param_baro_enable,
|
2020-02-14 01:18:20 -04:00
|
|
|
k_param_esc_number,
|
2020-11-21 01:29:10 -04:00
|
|
|
k_param_battery,
|
2020-11-29 19:14:56 -04:00
|
|
|
k_param_debug,
|
2020-12-17 01:46:31 -04:00
|
|
|
k_param_serial_number,
|
2020-12-17 22:12:25 -04:00
|
|
|
k_param_adsb_port,
|
2020-12-12 05:08:45 -04:00
|
|
|
k_param_servo_channels,
|
2020-12-22 19:29:59 -04:00
|
|
|
k_param_rangefinder_port,
|
|
|
|
k_param_gps_port,
|
2020-12-26 19:35:15 -04:00
|
|
|
k_param_msp_port,
|
2020-12-29 01:06:44 -04:00
|
|
|
k_param_notify,
|
2021-03-13 18:56:43 -04:00
|
|
|
k_param_esc_pwm_type,
|
2019-05-26 22:46:41 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
AP_Int16 format_version;
|
|
|
|
AP_Int16 can_node;
|
|
|
|
AP_Int32 can_baudrate;
|
2020-12-29 01:06:44 -04:00
|
|
|
#ifdef HAL_PERIPH_ENABLE_BUZZER_WITHOUT_NOTIFY
|
2019-08-31 04:20:53 -03:00
|
|
|
AP_Int8 buzz_volume;
|
|
|
|
#endif
|
2020-12-29 01:06:44 -04:00
|
|
|
#ifdef AP_PERIPH_HAVE_LED_WITHOUT_NOTIFY
|
2019-10-10 00:18:59 -03:00
|
|
|
AP_Int8 led_brightness;
|
|
|
|
#endif
|
2019-12-25 04:58:51 -04:00
|
|
|
#ifdef HAL_PERIPH_ENABLE_BARO
|
|
|
|
AP_Int8 baro_enable;
|
|
|
|
#endif
|
2019-10-23 04:57:27 -03:00
|
|
|
#if !defined(HAL_NO_FLASH_SUPPORT) && !defined(HAL_NO_ROMFS_SUPPORT)
|
|
|
|
AP_Int8 flash_bootloader;
|
|
|
|
#endif
|
|
|
|
|
2019-10-27 21:31:29 -03:00
|
|
|
#ifdef HAL_PERIPH_ENABLE_RANGEFINDER
|
|
|
|
AP_Int32 rangefinder_baud;
|
2020-12-22 19:29:59 -04:00
|
|
|
AP_Int8 rangefinder_port;
|
2019-10-27 21:31:29 -03:00
|
|
|
#endif
|
2019-11-26 20:06:34 -04:00
|
|
|
|
|
|
|
#ifdef HAL_PERIPH_ENABLE_ADSB
|
|
|
|
AP_Int32 adsb_baudrate;
|
2020-12-17 22:12:25 -04:00
|
|
|
AP_Int8 adsb_port;
|
2019-11-26 20:06:34 -04:00
|
|
|
#endif
|
|
|
|
|
2019-12-19 02:21:25 -04:00
|
|
|
#ifdef HAL_PERIPH_ENABLE_PWM_HARDPOINT
|
|
|
|
AP_Int16 hardpoint_id;
|
2019-12-19 03:46:03 -04:00
|
|
|
AP_Int8 hardpoint_rate;
|
2019-12-19 02:21:25 -04:00
|
|
|
#endif
|
2020-02-14 01:18:20 -04:00
|
|
|
|
|
|
|
#ifdef HAL_PERIPH_ENABLE_HWESC
|
|
|
|
AP_Int8 esc_number;
|
|
|
|
#endif
|
2020-11-29 19:14:56 -04:00
|
|
|
|
2020-12-22 19:29:59 -04:00
|
|
|
#ifdef HAL_PERIPH_ENABLE_GPS
|
|
|
|
AP_Int8 gps_port;
|
|
|
|
#endif
|
|
|
|
|
2020-12-26 19:35:15 -04:00
|
|
|
#ifdef HAL_PERIPH_ENABLE_MSP
|
|
|
|
AP_Int8 msp_port;
|
|
|
|
#endif
|
2021-03-13 18:56:43 -04:00
|
|
|
|
|
|
|
#ifdef HAL_PERIPH_ENABLE_RC_OUT
|
|
|
|
AP_Int8 esc_pwm_type;
|
|
|
|
#endif
|
|
|
|
|
2020-11-29 19:14:56 -04:00
|
|
|
AP_Int8 debug;
|
|
|
|
|
2020-12-17 01:46:31 -04:00
|
|
|
AP_Int32 serial_number;
|
|
|
|
|
2019-05-26 22:46:41 -03:00
|
|
|
Parameters() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
extern const AP_Param::Info var_info[];
|