Files
lzwc-terminal-unitreeGo2/src/config.cpp
Sucan126 f30590033b refactor(config): 重构配置系统和MQTT相关功能
移除状态发布功能,简化配置系统
更新MQTT配置和主题设置
调整README文档以反映最新变更
2025-09-20 19:54:04 +08:00

31 lines
817 B
C++

#include "config.hpp"
namespace custom {
void CustomConfig::loadDefaults() {
// Network settings
network_interface = NETWORK_INTERFACE;
mqtt_broker = MQTT_BROKER;
mqtt_port = MQTT_PORT;
mqtt_username = MQTT_USERNAME;
mqtt_password = MQTT_PASSWORD;
// Topic settings
topic_prefix = TOPIC_PREFIX;
topic_cmd = TOPIC_CMD;
topic_state = TOPIC_STATE;
topic_heartbeat = TOPIC_HEARTBEAT;
topic_response = TOPIC_RESPONSE;
topic_error = TOPIC_ERROR;
// Robot control settings
control_frequency = CONTROL_FREQUENCY;
// Safety settings
command_timeout = COMMAND_TIMEOUT;
max_linear_velocity = MAX_LINEAR_VELOCITY;
max_angular_velocity = MAX_ANGULAR_VELOCITY;
emergency_stop_timeout = EMERGENCY_STOP_TIMEOUT;
}
} // namespace custom