first commit

This commit is contained in:
cxh 2025-09-09 10:21:16 +08:00
parent e9b4fbb3d8
commit 0791ad07a0

View File

@ -49,15 +49,15 @@ static void on_mqtt_message_received(const std::string &topic, const std::string
LOG_INFO("[MQTT] Step 3: got status=" + std::to_string(status)); LOG_INFO("[MQTT] Step 3: got status=" + std::to_string(status));
// 处理 video_down // 处理 video_down
auto j = nlohmann::json::parse(message); // auto j = nlohmann::json::parse(message);
if (!j.contains("data") || !j["data"].contains("status")) // if (!j.contains("data") || !j["data"].contains("status"))
{ // {
LOG_WARN("[MQTT] video_down JSON missing data.status"); // LOG_WARN("[MQTT] video_down JSON missing data.status");
return; // return;
} // }
int status = j["data"]["status"].get<int>(); // int status = j["data"]["status"].get<int>();
if (status == 1) if (status == 1)
{ {