Просмотр исходного кода

binwise or 0x10/0x20 to Q/W response

Eric Betts 11 месяцев назад
Родитель
Сommit
a1a9124e46
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      virtual_portal.c

+ 2 - 2
virtual_portal.c

@@ -286,7 +286,7 @@ int virtual_portal_query(VirtualPortal* virtual_portal, uint8_t* message, uint8_
     const MfClassicBlock block = data->block[blockNum];
 
     response[0] = 'Q';
-    response[1] = 0x20 | arrayIndex;
+    response[1] = 0x10 | arrayIndex;
     response[2] = blockNum;
     memcpy(response + 3, block.data, BLOCK_SIZE);
     return 3 + BLOCK_SIZE;
@@ -322,7 +322,7 @@ int virtual_portal_write(VirtualPortal* virtual_portal, uint8_t* message, uint8_
     mf_classic_free(data);
 
     response[0] = 'W';
-    response[1] = index;
+    response[1] = 0x10 | arrayIndex;
     response[2] = blockNum;
     return 3;
 }