This commit is contained in:
rusefi 2017-07-24 22:26:41 -04:00
parent d690c37079
commit 03280ed116
2 changed files with 16 additions and 4 deletions

View File

@ -229,12 +229,16 @@ int getTunerStudioPageSize(int pageIndex) {
return 0;
}
static void sendOkResponse(ts_channel_s *tsChannel, ts_response_format_e mode) {
sr5SendResponse(tsChannel, mode, NULL, 0);
}
void handlePageSelectCommand(ts_channel_s *tsChannel, ts_response_format_e mode, uint16_t pageId) {
tsState.pageCommandCounter++;
currentPageId = pageId;
scheduleMsg(&tsLogger, "PAGE %d", currentPageId);
sr5SendResponse(tsChannel, mode, NULL, 0);
sendOkResponse(tsChannel, mode);
}
static void onlineTuneBytes(int currentPageId, uint32_t offset, int count) {
@ -286,7 +290,7 @@ void handleWriteChunkCommand(ts_channel_s *tsChannel, ts_response_format_e mode,
memcpy(addr, content, count);
onlineTuneBytes(currentPageId, offset, count);
sr5SendResponse(tsChannel, mode, NULL, 0);
sendOkResponse(tsChannel, mode);
}
void handleCrc32Check(ts_channel_s *tsChannel, ts_response_format_e mode, uint16_t pageId, uint16_t offset,
@ -821,9 +825,17 @@ int tunerStudioHandleCrcCommand(ts_channel_s *tsChannel, char *data, int incomin
uint16_t subsystem = SWAP_UINT16(*(short*)&data[0]);
uint16_t index = SWAP_UINT16(*(short*)&data[2]);
if (engineConfiguration->debugMode == DBG_BENCH_TEST) {
tsOutputChannels.debugIntField1++;
tsOutputChannels.debugIntField2 = subsystem;
tsOutputChannels.debugIntField3 = index;
}
#if EFI_PROD_CODE || defined(__DOXYGEN__)
runIoTest(subsystem, index);
#endif
#endif /* EFI_PROD_CODE */
sendOkResponse(tsChannel, TS_CRC);
} else {
tunerStudioError("ERROR: ignoring unexpected command");
return false;

View File

@ -692,7 +692,7 @@ typedef enum {
DBG_TRIGGER_SYNC = 16,
DBG_ELECTRONIC_THROTTLE = 17,
DBG_EXECUTOR = 18,
DM_19 = 19,
DBG_BENCH_TEST = 19,
DM_20 = 20,
DM_21 = 21,
DM_22 = 22,