Files
ESPC3-wireless/app/config/app_config/SBDEMO.h
LokLiang e9b5e42ef2 重构项目配置并添加对 SBDEMO 的支持
更新多个 ESP32 芯片(C2、C3、S3)
的版本配置为 SBDEMO
产品添加新的配置文件实现板卡和应用程序配置模块添加 CRC 实用函数修改系统日志以支持动态日志控制更新 Kconfig 和 sdkconfig 的默认设置以适应新产品
2025-02-21 10:38:22 +08:00

59 lines
2.8 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#if (CONFIG_PRODUCT_ID_SBDEMO)
#define _DEFAULT_DEVICE_NAME_BLE "demo V1"
#define _DEFAULT_DEVICE_NAME_WIFI "demo V1-WIFI"
#define _DEFAULT_DRONE_DATA "MODE1_1.0"
static cfg_app_t const s_cfg_app_default = {
.version = APP_CONFIG_DATA_VER, // 配置版本,修改源码中此版本的值后, nvs 已同步的数据被恢复到默认值
#if (CONFIG_BUILD_BLE)
.rf_mode = DATA_BRIDGE_RF_MODE_BLE, // 当前的无线数据模式,由按键控制更改
#elif (CONFIG_BUILD_WIFI)
.rf_mode = DATA_BRIDGE_RF_MODE_WIFI_AP, // 设置数据桥接模式:仅使用 UART <==> WIFI(AP)
#else
.rf_mode = DATA_BRIDGE_RF_MODE_OFF, // 设置数据桥接模式:关闭所有数据接口
#endif
.psPassword = "", // 透传密码
.device_name_ble = _DEFAULT_DEVICE_NAME_BLE, // BLE 设备名
.drone_data = _DEFAULT_DRONE_DATA, // 由 APP 通过命令设置,表示记录配置
/* 由 APP 通过命令设置, WIFI 部分的透传设置 */
.wifi_setting = {
.ardupilot_passthrough_tcp_port = 4278,
.ardupilot_passthrough_udp_port = 14550,
.ardupilot_passthrough_udp_transfer_in_raw_mode = 1, // UDP 连接下, 0: 解析飞控数据帧转发, 1: 直接转发原文(默认)
.wifi_max_connection_num = 1, // WIFI 最多的连接数。范围 MIN_WIFI_STA_NUM..MAX_WIFI_STA_NUM
.uartBaudRate = 115200, // 串口透传波特率
},
.wifi_ap_ipv4 = {192, 168, 1, 1}, // WIFI AP 模式下的 IP 地址
.app_config_wifi_para.wifi_ap_ssid = _DEFAULT_DEVICE_NAME_WIFI, // WIFI AP 模式下的 SSID
.app_config_wifi_para.wifi_ap_password = "", // WIFI AP 模式下的 密码
.app_config_wifi_para.wifi_sta_ssid = "eFLY", // WIFI STA 模式下的 SSID
.app_config_wifi_para.wifi_sta_password = "88888888", // WIFI STA 模式下的 密码
.udp_port_passthrough_broadcast = 14550, // udp 透传端口(广播端口) TODO
.udp_port_command = 14551, // udp 命令端口(本地端口)
.tcp_port_command = 4279, // tcp 命令端口(本地端口)
.tcp_port_telnet = 23, // tcp telnet 端口(默认23)
.tcp_port_dfu = 4280, // tcp DFU 升级服务端口(本地端口)
.tcp_port_msc = 4281, // tcp 黑匣子服务端口(本地端口)
/* 功能模块开关 */
.capacity = {
.pwrup_light = 0, // 短亮黄灯表示启动(方便观察是否有重启)
.ble = 1, // 使用 BLE
.ap = 0, // 使用 WIFI AP 模式
.sta = 0, // 使用 WIFI STA 模式
},
.armed2close_rf_sw = 1, // 解锁后自动关闭射频功能的开关0:关, 1:开
.product_id = PRODUCT_ID, // 产品 ID
};
#endif