Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/display_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1366,13 +1366,13 @@ void updatemsdata(){
void handleDirectWriteCompressedData(uint8_t* data, uint16_t len) {
if (len > UINT32_MAX - directWriteCompressedReceived) {
cleanupDirectWriteState(true);
uint8_t errorResponse[] = {0xFF, 0xFF};
uint8_t errorResponse[] = {0xFF, 0x71};
sendResponse(errorResponse, sizeof(errorResponse));
return;
}
if (!zlib_stream_to_direct_write(data, len, false)) {
cleanupDirectWriteState(true);
uint8_t errorResponse[] = {0xFF, 0xFF};
uint8_t errorResponse[] = {0xFF, 0x71};
sendResponse(errorResponse, sizeof(errorResponse));
return;
}
Expand Down Expand Up @@ -1487,7 +1487,7 @@ if (partialCtx.active) cleanup_partial_write_state();
memcpy(&directWriteDecompressedTotal, data, 4);
if (directWriteDecompressedTotal != directWriteTotalBytes) {
cleanupDirectWriteState(false);
uint8_t errorResponse[] = {0xFF, 0xFF};
uint8_t errorResponse[] = {0xFF, 0x70};
sendResponse(errorResponse, sizeof(errorResponse));
return;
}
Expand Down Expand Up @@ -1518,7 +1518,7 @@ if (partialCtx.active) cleanup_partial_write_state();
uint32_t compressedDataLen = len - 4;
if (!zlib_stream_to_direct_write(data + 4, compressedDataLen, false)) {
cleanupDirectWriteState(false);
uint8_t errorResponse[] = {0xFF, 0xFF};
uint8_t errorResponse[] = {0xFF, 0x70};
sendResponse(errorResponse, sizeof(errorResponse));
return;
}
Expand Down Expand Up @@ -1582,7 +1582,7 @@ void handlePartialWriteStart(uint8_t* data, uint16_t len) {
uint32_t expectedLogicalSize = planeBytes * 2u;

if (expectedLogicalSize == 0) {
uint8_t errResponse[] = {0xFF, 0xFF};
uint8_t errResponse[] = {0xFF, 0x76};
sendResponse(errResponse, sizeof(errResponse));
return;
}
Expand Down Expand Up @@ -1694,7 +1694,7 @@ void handleDirectWriteEnd(uint8_t* data, uint16_t len) {
directWriteStartTime = 0;
if (directWriteCompressed && !zlib_stream_to_direct_write(nullptr, 0, true)) {
cleanupDirectWriteState(true);
uint8_t errorResponse[] = {0xFF, 0xFF};
uint8_t errorResponse[] = {0xFF, 0x72};
sendResponse(errorResponse, sizeof(errorResponse));
return;
}
Expand Down