统一硬件配置文件的设计是一种非常好的设计模式,可以将硬件和软件的工作进行解耦。
cli命令中feature是对BetaFlight飞控软件功能使能开关。至于功能的含义,这里就不展开,随着对系统的深入理解,慢慢就会一点点了解起来的。
比如:TELEMETRY表示电传功能
cliFeature
├──> "feature" [print all enabled features]
├──> "feature list" [print all available features]
└──> "feature "
└──> [Find feature]
├──> featureConfigClear(feature)
└──> featureConfigSet(feature)
以下是目前BetaFlight飞控系统所支持的features:
// sync this with features_e
static const char * const featureNames[] = {
"RX_PPM", "", "INFLIGHT_ACC_CAL", "RX_SERIAL", "MOTOR_STOP",
"SERVO_TILT", "SOFTSERIAL", "GPS", "",
"RANGEFINDER", "TELEMETRY", "", "3D", "RX_PARALLEL_PWM",
"RX_MSP", "RSSI_ADC", "LED_STRIP", "DISPLAY", "OSD",
"", "CHANNEL_FORWARDING", "TRANSPONDER", "AIRMODE",
"", "", "RX_SPI", "", "ESC_SENSOR", "ANTI_GRAVITY", "", NULL
};
# feature
feature RX_SERIAL
feature TELEMETRY
feature OSD
# help feature
feature - configure features
list
<->[name]
# feature
Enabled: RX_SERIAL TELEMETRY LED_STRIP OSD AIRMODE ANTI_GRAVITY
# feature list
Available: RX_PPM INFLIGHT_ACC_CAL RX_SERIAL MOTOR_STOP SERVO_TILT SOFTSERIAL GPS RANGEFINDER TELEMETRY 3D RX_PARALLEL_PWM RX_MSP RSSI_ADC LED_STRIP DISPLAY OSD CHANNEL_FORWARDING TRANSPONDER AIRMODE RX_SPI ESC_SENSOR ANTI_GRAVITY
# feature OSD
Enabled OSD
# feature -OSD
Disabled OSD
【1】BetaFlight开源代码框架简介
【2】BetaFlight统一硬件资源简单配置修改
【3】BetaFlight统一硬件配置文件研读