forked from xiaozhi/xiaozhi-esp32
v1.6.6: Set MCP as default IoT Protocol (#690)
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#include "application.h"
|
||||
#include "button.h"
|
||||
#include "config.h"
|
||||
#include "mcp_server.h"
|
||||
#include "lamp_controller.h"
|
||||
#include "iot/thing_manager.h"
|
||||
#include "led/single_led.h"
|
||||
#include "display/oled_display.h"
|
||||
@@ -133,9 +135,13 @@ private:
|
||||
|
||||
// 物联网初始化,添加对 AI 可见设备
|
||||
void InitializeIot() {
|
||||
#if CONFIG_IOT_PROTOCOL_XIAOZHI
|
||||
auto& thing_manager = iot::ThingManager::GetInstance();
|
||||
thing_manager.AddThing(iot::CreateThing("Speaker"));
|
||||
thing_manager.AddThing(iot::CreateThing("Lamp"));
|
||||
#elif CONFIG_IOT_PROTOCOL_MCP
|
||||
static LampController lamp(LAMP_GPIO);
|
||||
#endif
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user