Refactor ICSChecksum and packetWrap into the Packetizer

This commit is contained in:
Paul Hollinsky
2018-09-25 17:50:58 -04:00
parent aa25ba1728
commit 28de70aa05
6 changed files with 32 additions and 26 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ bool MultiChannelCommunication::sendCommand(Command cmd, std::vector<uint8_t> ar
for(auto& b : arguments)
bytes.push_back(b);
bytes.insert(bytes.begin(), 0xB | ((uint8_t)bytes.size() << 4));
bytes = Communication::packetWrap(bytes);
bytes = packetizer->packetWrap(bytes);
bytes.insert(bytes.begin(), {(uint8_t)CommandType::HostPC_to_Vnet1, (uint8_t)bytes.size(), (uint8_t)(bytes.size() >> 8)});
return rawWrite(bytes);
}