Dozingfiretruck 9 месяцев назад
Родитель
Сommit
d05fc1946e
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      components/bluetooth/src/luat_lib_ble.c

+ 4 - 4
components/bluetooth/src/luat_lib_ble.c

@@ -110,14 +110,14 @@ int l_ble_callback(lua_State *L, void *ptr)
         lua_settable(L, -3);
 
         lua_pushliteral(L, "uuid_service");
-        lua_pushlstring(L, (const char *)uuid_service.uuid, uuid_service.uuid_type);
+        lua_pushlstring(L, (const char *)read_req->uuid_service.uuid, read_req->uuid_service.uuid_type);
         lua_settable(L, -3);
         lua_pushliteral(L, "uuid_characteristic");
-        lua_pushlstring(L, (const char *)uuid_characteristic.uuid, uuid_characteristic.uuid_type);
+        lua_pushlstring(L, (const char *)read_req->uuid_characteristic.uuid, read_req->uuid_characteristic.uuid_type);
         lua_settable(L, -3);
-        if (uuid_descriptor.uuid[0] != 0 || uuid_descriptor.uuid[1] != 0){
+        if (read_req->uuid_descriptor.uuid[0] != 0 || read_req->uuid_descriptor.uuid[1] != 0){
             lua_pushliteral(L, "uuid_descriptor");
-            lua_pushlstring(L, (const char *)uuid_descriptor.uuid, uuid_descriptor.uuid_type);
+            lua_pushlstring(L, (const char *)read_req->uuid_descriptor.uuid, read_req->uuid_descriptor.uuid_type);
             lua_settable(L, -3);
         }
         if (evt == LUAT_BLE_EVENT_READ_VALUE){