diff --git a/firmware/bootloader/src/dfu.cpp b/firmware/bootloader/src/dfu.cpp index 9f54b4e3d6..31b75a17c8 100644 --- a/firmware/bootloader/src/dfu.cpp +++ b/firmware/bootloader/src/dfu.cpp @@ -25,11 +25,11 @@ static uint32_t getMcuRevision() { } static bool getByte(uint8_t *b) { - return sr5ReadDataTimeout(&blTsChannel, b, 1, sr5Timeout) == 1; + return blTsChannel.readTimeout(b, 1, sr5Timeout) == 1; } static void sendByte(uint8_t b) { - sr5WriteData(&blTsChannel, &b, 1); + blTsChannel.write(&b, 1); } static uint8_t dfuCalcChecksum(const uint8_t *buf, uint8_t size) { @@ -54,7 +54,7 @@ static bool isInVirtualPageBuffer(uint32_t addr) { // Returns true if all 5 bytes are received and checksum is correct, and false otherwise. static bool readAddress(uint32_t *addr) { uint8_t buf[5]; // 4 bytes+checksum - if (sr5ReadDataTimeout(&blTsChannel, buf, 5, sr5Timeout) != 5) + if (blTsChannel.readTimeout(buf, 5, sr5Timeout) != 5) return false; if (dfuCalcChecksum(buf, 4) != buf[4]) return false; @@ -171,7 +171,7 @@ static void dfuHandleRead(void) { intFlashRead(addr, (char *)buffer, numBytes); // transmit data - sr5WriteData(&blTsChannel, (uint8_t *)buffer, numBytes); + blTsChannel.write(buffer, numBytes); } static void dfuHandleWrite(void) { @@ -188,7 +188,7 @@ static void dfuHandleWrite(void) { int numBytes = buffer[0] + 1; int numBytesAndChecksum = numBytes + 1; // +1 byte of checkSum // receive data - if (sr5ReadDataTimeout(&blTsChannel, buffer + 1, numBytesAndChecksum, sr5Timeout) != numBytesAndChecksum) + if (blTsChannel.readTimeout(buffer + 1, numBytesAndChecksum, sr5Timeout) != numBytesAndChecksum) return; // don't write corrupted data! if (dfuCalcChecksum(buffer, numBytesAndChecksum) != buffer[numBytesAndChecksum]) { @@ -220,7 +220,7 @@ static void dfuHandleErase(void) { numSectorData = (numSectors + 1) * 2 + 1; uint8_t *sectorList = buffer + 2; // read sector data & checksum - if (sr5ReadDataTimeout(&blTsChannel, sectorList, numSectorData, sr5Timeout) != numSectorData) + if (blTsChannel.readTimeout(sectorList, numSectorData, sr5Timeout) != numSectorData) return; // verify checksum if (dfuCalcChecksum(buffer, 2 + numSectorData - 1) != buffer[2 + numSectorData - 1]) { diff --git a/firmware/config/boards/hellen/cypress/config/controllers/algo/engine_configuration_generated_structures.h b/firmware/config/boards/hellen/cypress/config/controllers/algo/engine_configuration_generated_structures.h index e1d6c8415c..1c1cddf06a 100644 --- a/firmware/config/boards/hellen/cypress/config/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/config/boards/hellen/cypress/config/controllers/algo/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on hellen_cypress_gen_config.bat integration/rusefi_config.txt Thu Feb 18 23:19:48 UTC 2021 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on hellen_cypress_gen_config.bat integration/rusefi_config.txt Fri Feb 19 13:00:17 UTC 2021 // by class com.rusefi.output.CHeaderConsumer // begin #pragma once @@ -3864,4 +3864,4 @@ struct persistent_config_s { typedef struct persistent_config_s persistent_config_s; // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on hellen_cypress_gen_config.bat integration/rusefi_config.txt Thu Feb 18 23:19:48 UTC 2021 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on hellen_cypress_gen_config.bat integration/rusefi_config.txt Fri Feb 19 13:00:17 UTC 2021 diff --git a/firmware/config/boards/hellen/cypress/config/controllers/algo/rusefi_generated.h b/firmware/config/boards/hellen/cypress/config/controllers/algo/rusefi_generated.h index d3885e4086..5a9304676a 100644 --- a/firmware/config/boards/hellen/cypress/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/hellen/cypress/config/controllers/algo/rusefi_generated.h @@ -1242,7 +1242,7 @@ #define showHumanReadableWarning_offset 976 #define showSdCardWarning_offset 76 #define SIGNATURE_BOARD hellen_cypress -#define SIGNATURE_DATE 2021.02.18 +#define SIGNATURE_DATE 2021.02.19 #define SIGNATURE_HASH 929793293 #define silentTriggerError_offset 1464 #define slowAdcAlpha_offset 2088 @@ -1577,7 +1577,7 @@ #define ts_show_spi true #define ts_show_trigger_comparator false #define ts_show_tunerstudio_port true -#define TS_SIGNATURE "rusEFI 2021.02.18.hellen_cypress.929793293" +#define TS_SIGNATURE "rusEFI 2021.02.19.hellen_cypress.929793293" #define TS_SINGLE_WRITE_COMMAND 'W' #define TS_SINGLE_WRITE_COMMAND_char W #define TS_TEST_COMMAND 't' // 0x74 diff --git a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h index 34ab86c36a..67ea25cf03 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Thu Feb 18 23:19:43 UTC 2021 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Fri Feb 19 13:00:14 UTC 2021 // by class com.rusefi.output.CHeaderConsumer // begin #pragma once @@ -3859,4 +3859,4 @@ struct persistent_config_s { typedef struct persistent_config_s persistent_config_s; // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Thu Feb 18 23:19:43 UTC 2021 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Fri Feb 19 13:00:14 UTC 2021 diff --git a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h index 2a2514011e..be0f3cb474 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h @@ -1226,7 +1226,7 @@ #define showHumanReadableWarning_offset 976 #define showSdCardWarning_offset 76 #define SIGNATURE_BOARD kin -#define SIGNATURE_DATE 2021.02.18 +#define SIGNATURE_DATE 2021.02.19 #define SIGNATURE_HASH 3368962545 #define silentTriggerError_offset 1464 #define slowAdcAlpha_offset 2088 @@ -1561,7 +1561,7 @@ #define ts_show_spi true #define ts_show_trigger_comparator true #define ts_show_tunerstudio_port true -#define TS_SIGNATURE "rusEFI 2021.02.18.kin.3368962545" +#define TS_SIGNATURE "rusEFI 2021.02.19.kin.3368962545" #define TS_SINGLE_WRITE_COMMAND 'W' #define TS_SINGLE_WRITE_COMMAND_char W #define TS_TEST_COMMAND 't' // 0x74 diff --git a/firmware/config/boards/microrusefi/connectors/main.yaml b/firmware/config/boards/microrusefi/connectors/main.yaml index b8719b63ca..02456fbbea 100644 --- a/firmware/config/boards/microrusefi/connectors/main.yaml +++ b/firmware/config/boards/microrusefi/connectors/main.yaml @@ -12,6 +12,11 @@ pins: ts_name: Battery Sense type: 12V + - pin: 2 + function: Power GND + type: pgnd + color: white + # default Idle Air Control TLE8888 high current low side: VVT2 TLE8888_OUT5 - pin: 3 id: TLE8888_PIN_5 @@ -21,6 +26,21 @@ pins: ts_name: 3 - Lowside 2 type: ls + - pin: 4 + function: ETB+ + type: etb + color: white + + - pin: 5 + function: 12V supply from Key (turn on/off power) + type: 12V + color: black + + - pin: 6 + function: Power GND + type: pgnd + color: black + # default VVT TLE8888 high current low side: VVT1 TLE8888_OUT6 - pin: 7 id: TLE8888_PIN_6 @@ -30,6 +50,11 @@ pins: ts_name: 7 - Lowside 1 type: ls + - pin: 8 + function: ETB- + type: etb + color: black + # TC4427 ignition outputs (5v) - pin: 9 id: GPIOD_4 @@ -80,6 +105,21 @@ pins: ts_name: 14 - GP Out 5 type: gp_high + - pin: 15 + function: USB white wire https://youtu.be/4v2VnP-YdlQ + type: usb + color: yellow + + - pin: 16 + function: USB green wire https://youtu.be/4v2VnP-YdlQ + type: usb + color: yellow + + - pin: 17 + function: Signal GND + type: sgnd + color: red right + - pin: 18 id: [GPIOA_0, EFI_ADC_0] class: [switch_inputs, analog_inputs] @@ -104,6 +144,11 @@ pins: ts_name: 20 - AN volt 5 type: av + - pin: 21 + function: Signal GND + type: sgnd + color: dark green + - pin: 22 id: [GPIOA_3, EFI_ADC_3] class: [switch_inputs, analog_inputs] @@ -160,6 +205,11 @@ pins: class: outputs ts_name: AUX AV10 reuse + - pin: 29 + function: Main relay control signal (low side) + type: mr + color: pink right + - pin: 30 id: [GPIOC_5, EFI_ADC_15] class: [switch_inputs, analog_inputs] @@ -242,6 +292,11 @@ pins: ts_name: 38 - Injector 2 type: inj + - pin: 39 + function: MAP sensor supply + type: 5v + color: grey + - pin: 40 id: [GPIOB_1, EFI_ADC_9] class: [switch_inputs, analog_inputs] @@ -278,6 +333,11 @@ pins: ts_name: 43 - GP Out 4 type: [gp_low, gp_pp] + - pin: 44 + function: TPS sensor supply + type: 5v + color: brown left + - pin: 45 id: GPIOC_6 class: event_inputs @@ -286,6 +346,21 @@ pins: ts_name: 45 - VR/Hall Crank type: vr hall + - pin: 46 + function: Crank VR- (do not connect if hall) + type: vr + color: light green + + - pin: 47 + function: CAN bus + type: can + color: light green + + - pin: 48 + function: CAN bus + type: can + color: light green + info: image: file: main.jpg diff --git a/firmware/config/boards/subaru_eg33/config/controllers/algo/engine_configuration_generated_structures.h b/firmware/config/boards/subaru_eg33/config/controllers/algo/engine_configuration_generated_structures.h index cd82a09143..c8fefac023 100644 --- a/firmware/config/boards/subaru_eg33/config/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/config/boards/subaru_eg33/config/controllers/algo/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on config/boards/subaru_eg33/config/gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:50 UTC 2021 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on config/boards/subaru_eg33/config/gen_config.sh integration/rusefi_config.txt Fri Feb 19 13:00:20 UTC 2021 // by class com.rusefi.output.CHeaderConsumer // begin #pragma once @@ -3864,4 +3864,4 @@ struct persistent_config_s { typedef struct persistent_config_s persistent_config_s; // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on config/boards/subaru_eg33/config/gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:50 UTC 2021 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on config/boards/subaru_eg33/config/gen_config.sh integration/rusefi_config.txt Fri Feb 19 13:00:20 UTC 2021 diff --git a/firmware/config/boards/subaru_eg33/config/controllers/algo/rusefi_generated.h b/firmware/config/boards/subaru_eg33/config/controllers/algo/rusefi_generated.h index 68d118356a..0a050444ae 100644 --- a/firmware/config/boards/subaru_eg33/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/subaru_eg33/config/controllers/algo/rusefi_generated.h @@ -1242,7 +1242,7 @@ #define showHumanReadableWarning_offset 976 #define showSdCardWarning_offset 76 #define SIGNATURE_BOARD subaru_eg33_f7 -#define SIGNATURE_DATE 2021.02.18 +#define SIGNATURE_DATE 2021.02.19 #define SIGNATURE_HASH 3083086059 #define silentTriggerError_offset 1464 #define slowAdcAlpha_offset 2088 @@ -1577,7 +1577,7 @@ #define ts_show_spi true #define ts_show_trigger_comparator false #define ts_show_tunerstudio_port false -#define TS_SIGNATURE "rusEFI 2021.02.18.subaru_eg33_f7.3083086059" +#define TS_SIGNATURE "rusEFI 2021.02.19.subaru_eg33_f7.3083086059" #define TS_SINGLE_WRITE_COMMAND 'W' #define TS_SINGLE_WRITE_COMMAND_char W #define TS_TEST_COMMAND 't' // 0x74 diff --git a/firmware/console/binary/bluetooth.cpp b/firmware/console/binary/bluetooth.cpp index 484001859e..cd1b7344e1 100644 --- a/firmware/console/binary/bluetooth.cpp +++ b/firmware/console/binary/bluetooth.cpp @@ -124,18 +124,18 @@ static void runCommands() { break; // send current command - sr5WriteData(tsChannel, (uint8_t *)commands[cmdIdx], strlen(commands[cmdIdx])); + tsChannel->write((uint8_t*)commands[cmdIdx], strlen(commands[cmdIdx])); // waiting for an answer bool wasAnswer = false; - if (sr5ReadDataTimeout(tsChannel, buffer, 2, btModuleTimeout) == 2) { + if (tsChannel->readTimeout(buffer, 2, btModuleTimeout) == 2) { wasAnswer = (buffer[0] == 'O' && buffer[1] == 'K') || (buffer[0] == '+' && (buffer[1] >= 'A' && buffer[1] <= 'Z')); } // wait 1 second and skip all remaining response bytes from the bluetooth module while (true) { - if (sr5ReadDataTimeout(tsChannel, buffer, 1, btModuleTimeout) < 1) + if (tsChannel->readTimeout(buffer, 1, btModuleTimeout) < 1) break; } diff --git a/firmware/console/binary/tunerstudio.cpp b/firmware/console/binary/tunerstudio.cpp index 1b02c4c3c0..8eca20cf37 100644 --- a/firmware/console/binary/tunerstudio.cpp +++ b/firmware/console/binary/tunerstudio.cpp @@ -484,7 +484,7 @@ static void tsProcessOne(ts_channel_s* tsChannel) { tsState.totalCounter++; uint8_t firstByte; - int received = sr5ReadData(tsChannel, &firstByte, 1); + int received = tsChannel->read(&firstByte, 1); #if EFI_SIMULATOR logMsg("received %d\r\n", received); #endif @@ -504,7 +504,7 @@ static void tsProcessOne(ts_channel_s* tsChannel) { return; uint8_t secondByte; - received = sr5ReadData(tsChannel, &secondByte, 1); + received = tsChannel->read(&secondByte, 1); if (received != 1) { tunerStudioError("TS: ERROR: no second byte"); return; @@ -520,7 +520,7 @@ static void tsProcessOne(ts_channel_s* tsChannel) { return; } - received = sr5ReadData(tsChannel, (uint8_t* )tsChannel->scratchBuffer, 1); + received = tsChannel->read((uint8_t* )tsChannel->scratchBuffer, 1); if (received != 1) { tunerStudioError("ERROR: did not receive command"); sendErrorCode(tsChannel, TS_RESPONSE_UNDERRUN); @@ -538,7 +538,7 @@ static void tsProcessOne(ts_channel_s* tsChannel) { logMsg("command %c\r\n", command); #endif - received = sr5ReadData(tsChannel, (uint8_t * ) (tsChannel->scratchBuffer + 1), + received = tsChannel->read((uint8_t*)(tsChannel->scratchBuffer + 1), incomingPacketSize + CRC_VALUE_SIZE - 1); int expectedSize = incomingPacketSize + CRC_VALUE_SIZE - 1; if (received != expectedSize) { @@ -631,16 +631,16 @@ static void handleTestCommand(ts_channel_s *tsChannel) { * extension of the protocol to simplify troubleshooting */ tunerStudioDebug("got T (Test)"); - sr5WriteData(tsChannel, (const uint8_t *) VCS_VERSION, sizeof(VCS_VERSION)); + tsChannel->write((const uint8_t*)VCS_VERSION, sizeof(VCS_VERSION)); chsnprintf(testOutputBuffer, sizeof(testOutputBuffer), " %d %d", engine->engineState.warnings.lastErrorCode, tsState.testCommandCounter); - sr5WriteData(tsChannel, (const uint8_t *) testOutputBuffer, strlen(testOutputBuffer)); + tsChannel->write((const uint8_t*)testOutputBuffer, strlen(testOutputBuffer)); chsnprintf(testOutputBuffer, sizeof(testOutputBuffer), " uptime=%ds", getTimeNowSeconds()); - sr5WriteData(tsChannel, (const uint8_t *) testOutputBuffer, strlen(testOutputBuffer)); + tsChannel->write((const uint8_t*)testOutputBuffer, strlen(testOutputBuffer)); chsnprintf(testOutputBuffer, sizeof(testOutputBuffer), " %s\r\n", PROTOCOL_TEST_RESPONSE_TAG); - sr5WriteData(tsChannel, (const uint8_t *) testOutputBuffer, strlen(testOutputBuffer)); + tsChannel->write((const uint8_t*)testOutputBuffer, strlen(testOutputBuffer)); } extern CommandHandler console_line_callback; @@ -705,7 +705,7 @@ bool handlePlainCommand(ts_channel_s *tsChannel, uint8_t command) { */ tunerStudioDebug("not ignoring F"); - sr5WriteData(tsChannel, (const uint8_t *) TS_PROTOCOL, strlen(TS_PROTOCOL)); + tsChannel->write((const uint8_t *)TS_PROTOCOL, strlen(TS_PROTOCOL)); return true; } else { // This wasn't a valid command diff --git a/firmware/console/binary/tunerstudio_io.cpp b/firmware/console/binary/tunerstudio_io.cpp index 3aa3a567d3..1c93176db2 100644 --- a/firmware/console/binary/tunerstudio_io.cpp +++ b/firmware/console/binary/tunerstudio_io.cpp @@ -160,46 +160,43 @@ bool stopTsPort(ts_channel_s *tsChannel) { int sr5TestWriteDataIndex = 0; uint8_t st5TestBuffer[16000]; -void sr5WriteData(ts_channel_s *tsChannel, const uint8_t * buffer, int size) { +void ts_channel_s::write(const uint8_t* buffer, size_t size) { memcpy(&st5TestBuffer[sr5TestWriteDataIndex], buffer, size); sr5TestWriteDataIndex += size; } #endif // EFI_UNIT_TEST #if EFI_PROD_CODE || EFI_SIMULATOR -void sr5WriteData(ts_channel_s *tsChannel, const uint8_t * buffer, int size) { +void ts_channel_s::write(const uint8_t* buffer, size_t size) { efiAssertVoid(CUSTOM_ERR_6570, getCurrentRemainingStack() > 64, "tunerStudioWriteData"); #if EFI_SIMULATOR logMsg("chSequentialStreamWrite [%d]\r\n", size); #endif #if (PRIMARY_UART_DMA_MODE || TS_UART_DMA_MODE || TS_UART_MODE) && EFI_PROD_CODE - if (tsChannel->uartp != nullptr) { - int transferred = size; - uartSendTimeout(tsChannel->uartp, (size_t *)&transferred, buffer, BINARY_IO_TIMEOUT); - return; + if (uartp) { + uartSendTimeout(uartp, &size, buffer, BINARY_IO_TIMEOUT); + return; } #elif defined(TS_CAN_DEVICE) - UNUSED(tsChannel); - int transferred = size; - canAddToTxStreamTimeout(&TS_CAN_DEVICE, (size_t *)&transferred, buffer, BINARY_IO_TIMEOUT); + canAddToTxStreamTimeout(&TS_CAN_DEVICE, &size, buffer, BINARY_IO_TIMEOUT); #endif - if (tsChannel->channel == nullptr) + if (!channel) { return; + } // int transferred = chnWriteTimeout(tsChannel->channel, buffer, size, BINARY_IO_TIMEOUT); // temporary attempt to work around #553 // instead of one huge packet let's try sending a few smaller packets - int transferred = 0; - int stillToTransfer = size; + size_t transferred = 0; + size_t stillToTransfer = size; while (stillToTransfer > 0) { int thisTransferSize = minI(stillToTransfer, 768); - transferred += chnWriteTimeout(tsChannel->channel, buffer, thisTransferSize, BINARY_IO_TIMEOUT); + transferred += chnWriteTimeout(channel, buffer, thisTransferSize, BINARY_IO_TIMEOUT); buffer += thisTransferSize; stillToTransfer -= thisTransferSize; } - #if EFI_SIMULATOR logMsg("transferred [%d]\r\n", transferred); #endif @@ -211,36 +208,32 @@ void sr5WriteData(ts_channel_s *tsChannel, const uint8_t * buffer, int size) { } } -int sr5ReadDataTimeout(ts_channel_s *tsChannel, uint8_t * buffer, int size, int timeout) { +size_t ts_channel_s::readTimeout(uint8_t* buffer, size_t size, int timeout) { #if TS_UART_DMA_MODE || PRIMARY_UART_DMA_MODE - if (tsChannel->uartp!= NULL) { + if (uartp) { extern uart_dma_s tsUartDma; - return (int)iqReadTimeout(&tsUartDma.fifoRxQueue, (uint8_t * )buffer, (size_t)size, timeout); + return iqReadTimeout(&tsUartDma.fifoRxQueue, buffer, size, timeout); } #endif #if TS_UART_DMA_MODE #elif TS_UART_MODE - UNUSED(tsChannel); - size_t received = (size_t)size; - uartReceiveTimeout(TS_UART_DEVICE, &received, buffer, timeout); - return (int)received; + uartReceiveTimeout(TS_UART_DEVICE, &size, buffer, timeout); + return size; #elif defined(TS_CAN_DEVICE) - UNUSED(tsChannel); - size_t received = (size_t)size; - canStreamReceiveTimeout(&TS_CAN_DEVICE, &received, buffer, timeout); - return (int)received; + canStreamReceiveTimeout(&TS_CAN_DEVICE, &size, buffer, timeout); + return size; #else /* TS_UART_DMA_MODE */ - if (tsChannel->channel == nullptr) + if (channel == nullptr) return 0; - return chnReadTimeout(tsChannel->channel, (uint8_t * )buffer, size, timeout); + return chnReadTimeout(channel, buffer, size, timeout); #endif /* TS_UART_DMA_MODE */ firmwareError(CUSTOM_ERR_6126, "Unexpected channel situation"); return 0; } -int sr5ReadData(ts_channel_s *tsChannel, uint8_t * buffer, int size) { - return sr5ReadDataTimeout(tsChannel, buffer, size, SR5_READ_TIMEOUT); +size_t ts_channel_s::read(uint8_t* buffer, size_t size) { + return readTimeout(buffer, size, SR5_READ_TIMEOUT); } #endif // EFI_PROD_CODE || EFI_SIMULATOR @@ -270,7 +263,7 @@ void sr5WriteCrcPacketSmall(ts_channel_s* tsChannel, uint8_t responseCode, const *reinterpret_cast(&scratchBuffer[size + 3]) = SWAP_UINT32(crc); // Write to the underlying stream - sr5WriteData(tsChannel, reinterpret_cast(scratchBuffer), size + 7); + tsChannel->write(reinterpret_cast(scratchBuffer), size + 7); } void sr5WriteCrcPacketLarge(ts_channel_s* tsChannel, uint8_t responseCode, const uint8_t* buf, size_t size) { @@ -287,15 +280,15 @@ void sr5WriteCrcPacketLarge(ts_channel_s* tsChannel, uint8_t responseCode, const *(uint32_t*)crcBuffer = SWAP_UINT32(crc); // Write header - sr5WriteData(tsChannel, headerBuffer, sizeof(headerBuffer)); + tsChannel->write(headerBuffer, sizeof(headerBuffer)); // If data, write that if (size) { - sr5WriteData(tsChannel, buf, size); + tsChannel->write(buf, size); } // Lastly the CRC footer - sr5WriteData(tsChannel, crcBuffer, sizeof(crcBuffer)); + tsChannel->write(crcBuffer, sizeof(crcBuffer)); } /** @@ -311,9 +304,9 @@ void sr5WriteCrcPacket(ts_channel_s *tsChannel, uint8_t responseCode, const uint // a special case for short packets: we can sent them in 1 frame, without CRC & size, // because the CAN protocol is already protected by its own checksum. if ((size + 1) <= 7) { - sr5WriteData(tsChannel, &responseCode, 1); // header without size + tsChannel->write(&responseCode, 1); // header without size if (size > 0) { - sr5WriteData(tsChannel, (const uint8_t*)buf, size); // body + tsChannel->write(buf, size); // body } sr5FlushData(tsChannel); return; @@ -334,7 +327,7 @@ void sr5SendResponse(ts_channel_s *tsChannel, ts_response_format_e mode, const u sr5WriteCrcPacket(tsChannel, TS_RESPONSE_OK, buffer, size); } else { if (size > 0) { - sr5WriteData(tsChannel, buffer, size); + tsChannel->write(buffer, size); sr5FlushData(tsChannel); } } diff --git a/firmware/console/binary/tunerstudio_io.h b/firmware/console/binary/tunerstudio_io.h index 9dcfb09fab..d952491dee 100644 --- a/firmware/console/binary/tunerstudio_io.h +++ b/firmware/console/binary/tunerstudio_io.h @@ -23,6 +23,10 @@ typedef enum { } ts_response_format_e; struct ts_channel_s { + void write(const uint8_t* buffer, size_t size); + size_t readTimeout(uint8_t* buffer, size_t size, int timeout); + size_t read(uint8_t* buffer, size_t size); + #if ! EFI_UNIT_TEST BaseChannel * channel = nullptr; #endif @@ -51,14 +55,11 @@ bool stopTsPort(ts_channel_s *tsChannel); // that's 1 second #define SR5_READ_TIMEOUT TIME_MS2I(1000) -void sr5WriteData(ts_channel_s *tsChannel, const uint8_t * buffer, int size); void sr5WriteCrcPacketSmall(ts_channel_s* tsChannel, uint8_t responseCode, const uint8_t* buf, size_t size); void sr5WriteCrcPacketLarge(ts_channel_s* tsChannel, uint8_t responseCode, const uint8_t* buf, size_t size); void sr5WriteCrcPacket(ts_channel_s *tsChannel, uint8_t responseCode, const uint8_t* buf, size_t size); void sr5SendResponse(ts_channel_s *tsChannel, ts_response_format_e mode, const uint8_t * buffer, int size); void sendOkResponse(ts_channel_s *tsChannel, ts_response_format_e mode); -int sr5ReadData(ts_channel_s *tsChannel, uint8_t * buffer, int size); -int sr5ReadDataTimeout(ts_channel_s *tsChannel, uint8_t * buffer, int size, int timeout); bool sr5IsReady(ts_channel_s *tsChannel); void sr5FlushData(ts_channel_s *tsChannel); diff --git a/firmware/console/console_io.cpp b/firmware/console/console_io.cpp index e40de76012..54af95c5a0 100644 --- a/firmware/console/console_io.cpp +++ b/firmware/console/console_io.cpp @@ -73,86 +73,6 @@ void onDataArrived(void) { consoleByteArrived = true; } - -/** - * @brief Reads a whole line from the input channel. - * - * @param[in] chp pointer to a @p BaseChannel object - * @param[in] line pointer to the line buffer - * @param[in] size buffer maximum length - * @return The operation status. - * @retval TRUE the channel was reset or CTRL-D pressed. - * @retval FALSE operation successful. - */ -/* let's keep this dead code for a bit -static bool getConsoleLine(BaseSequentialStream *chp, char *line, unsigned size) { - char *p = line; - - while (true) { - if (!isCommandLineConsoleReady()) { - // we better do not read from serial before it is ready - chThdSleepMilliseconds(10); - continue; - } - - short c = (short) streamGet(chp); - onDataArrived(); - -#if defined(EFI_CONSOLE_SERIAL_DEVICE) - - uint32_t flags; - chSysLock() - ; - - flags = chEvtGetAndClearFlagsI(&consoleEventListener); - chSysUnlock() - ; - if (flags & SD_OVERRUN_ERROR) { -// firmwareError(OBD_PCM_Processor_Fault, "serial overrun"); - } - -#endif - -#if EFI_UART_ECHO_TEST_MODE - // That's test code - let's test connectivity - consolePutChar((uint8_t) c); - continue; -#endif - - if (c < 0 || c == 4) { - return true; - } - if (c == 8) { - if (p != line) { - // backspace - consolePutChar((uint8_t) c); - consolePutChar(0x20); - consolePutChar((uint8_t) c); - p--; - } - continue; - } - if (c == '\r') { - consolePutChar('\r'); - consolePutChar('\n'); - *p = 0; - return false; - } - if (c == '\n') { - consolePutChar('\n'); - *p = 0; - return false; - } - if (c < 0x20) { - continue; - } - if (p < line + size - 1) { - consolePutChar((uint8_t) c); - *p++ = (char) c; - } - } -} -*/ CommandHandler console_line_callback; #if (defined(EFI_CONSOLE_SERIAL_DEVICE) && ! EFI_SIMULATOR ) @@ -304,13 +224,6 @@ static THD_FUNCTION(consoleThreadEntryPoint, arg) { #endif /* EFI_CONSOLE_NO_THREAD */ -void consolePutChar(int x) { - BaseChannel * channel = getConsoleChannel(); - if (channel != nullptr) { - chnWriteTimeout(channel, (const uint8_t *)&x, 1, CONSOLE_WRITE_TIMEOUT); - } -} - void consoleOutputBuffer(const uint8_t *buf, int size) { #if !EFI_UART_ECHO_TEST_MODE BaseChannel * channel = getConsoleChannel(); diff --git a/firmware/console/console_io.h b/firmware/console/console_io.h index 4d201411a4..8c78f9b6e1 100644 --- a/firmware/console/console_io.h +++ b/firmware/console/console_io.h @@ -21,7 +21,6 @@ typedef void (*CommandHandler)(char *); #include "datalogging.h" -void consolePutChar(int x); void consoleOutputBuffer(const uint8_t *buf, int size); void startConsole(Logging *sharedLogger, CommandHandler console_line_callback_p); void onDataArrived(void); diff --git a/firmware/console/eficonsole.cpp b/firmware/console/eficonsole.cpp index fa2bf3a332..9ade38c6d8 100644 --- a/firmware/console/eficonsole.cpp +++ b/firmware/console/eficonsole.cpp @@ -37,14 +37,6 @@ static void myerror(void) { firmwareError(CUSTOM_ERR_TEST_ERROR, "firmwareError: %d", getRusEfiVersion()); } -static void sayNothing(void) { - /** - * @see EngineState#TS_PROTOCOL_TAG - * this empty response is part of protocol check - * todo: make this logic smarter? - */ -} - static void sayHello(void) { scheduleMsg(&logger, PROTOCOL_HELLO_PREFIX " rusEFI LLC (c) 2012-2021. All rights reserved."); scheduleMsg(&logger, PROTOCOL_HELLO_PREFIX " rusEFI v%d@%s", getRusEfiVersion(), VCS_VERSION); @@ -205,7 +197,7 @@ void initializeConsole(Logging *sharedLogger) { startConsole(sharedLogger, &handleConsoleLine); sayHello(); - addConsoleAction("test", sayNothing); + addConsoleAction("test", [](){ /* do nothing */}); addConsoleAction("hello", sayHello); #if EFI_HAS_RESET addConsoleAction("reset", scheduleReset); diff --git a/firmware/controllers/generated/engine_configuration_generated_structures.h b/firmware/controllers/generated/engine_configuration_generated_structures.h index 80fa0b3b09..577bbdb28b 100644 --- a/firmware/controllers/generated/engine_configuration_generated_structures.h +++ b/firmware/controllers/generated/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:20 UTC 2021 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Feb 19 12:59:55 UTC 2021 // by class com.rusefi.output.CHeaderConsumer // begin #pragma once @@ -3864,4 +3864,4 @@ struct persistent_config_s { typedef struct persistent_config_s persistent_config_s; // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:20 UTC 2021 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Feb 19 12:59:55 UTC 2021 diff --git a/firmware/controllers/generated/fsio_enums_generated.def b/firmware/controllers/generated/fsio_enums_generated.def index b89d6bf8ae..f79903e17a 100644 --- a/firmware/controllers/generated/fsio_enums_generated.def +++ b/firmware/controllers/generated/fsio_enums_generated.def @@ -1,4 +1,4 @@ -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:20 UTC 2021 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Feb 19 12:59:55 UTC 2021 // by class com.rusefi.output.FileFsioSettingsConsumer FSIO_SETTING_FANONTEMPERATURE = 1000, diff --git a/firmware/controllers/generated/fsio_getters.def b/firmware/controllers/generated/fsio_getters.def index 95d3c7e93c..4ec30aa0dd 100644 --- a/firmware/controllers/generated/fsio_getters.def +++ b/firmware/controllers/generated/fsio_getters.def @@ -1,4 +1,4 @@ -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:20 UTC 2021 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Feb 19 12:59:55 UTC 2021 // by class com.rusefi.output.FileFsioSettingsConsumer case FSIO_SETTING_FANONTEMPERATURE: diff --git a/firmware/controllers/generated/fsio_names.def b/firmware/controllers/generated/fsio_names.def index 4c8c1e07d6..501b7fb6e5 100644 --- a/firmware/controllers/generated/fsio_names.def +++ b/firmware/controllers/generated/fsio_names.def @@ -1,4 +1,4 @@ -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:20 UTC 2021 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Feb 19 12:59:55 UTC 2021 // by class com.rusefi.output.FileFsioSettingsConsumer static LENameOrdinalPair lefanOnTemperature(FSIO_SETTING_FANONTEMPERATURE, "cfg_fanOnTemperature"); diff --git a/firmware/controllers/generated/fsio_strings.def b/firmware/controllers/generated/fsio_strings.def index a753a8ab90..8b97759896 100644 --- a/firmware/controllers/generated/fsio_strings.def +++ b/firmware/controllers/generated/fsio_strings.def @@ -1,4 +1,4 @@ -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:20 UTC 2021 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Feb 19 12:59:55 UTC 2021 // by class com.rusefi.output.FileFsioSettingsConsumer case FSIO_SETTING_FANONTEMPERATURE: diff --git a/firmware/controllers/generated/rusefi_generated.h b/firmware/controllers/generated/rusefi_generated.h index 9a3be3de9c..819b95df3b 100644 --- a/firmware/controllers/generated/rusefi_generated.h +++ b/firmware/controllers/generated/rusefi_generated.h @@ -1239,7 +1239,7 @@ #define showHumanReadableWarning_offset 976 #define showSdCardWarning_offset 76 #define SIGNATURE_BOARD all -#define SIGNATURE_DATE 2021.02.18 +#define SIGNATURE_DATE 2021.02.19 #define SIGNATURE_HASH 1964465885 #define silentTriggerError_offset 1464 #define slowAdcAlpha_offset 2088 @@ -1574,7 +1574,7 @@ #define ts_show_spi true #define ts_show_trigger_comparator false #define ts_show_tunerstudio_port true -#define TS_SIGNATURE "rusEFI 2021.02.18.all.1964465885" +#define TS_SIGNATURE "rusEFI 2021.02.19.all.1964465885" #define TS_SINGLE_WRITE_COMMAND 'W' #define TS_SINGLE_WRITE_COMMAND_char W #define TS_TEST_COMMAND 't' // 0x74 diff --git a/firmware/controllers/generated/signature_all.h b/firmware/controllers/generated/signature_all.h index 7cbdc3f723..fa6cebae3f 100644 --- a/firmware/controllers/generated/signature_all.h +++ b/firmware/controllers/generated/signature_all.h @@ -3,6 +3,6 @@ // #define SIGNATURE_BOARD all -#define SIGNATURE_DATE 2021.02.18 +#define SIGNATURE_DATE 2021.02.19 #define SIGNATURE_HASH 1964465885 -#define TS_SIGNATURE "rusEFI 2021.02.18.all.1964465885" +#define TS_SIGNATURE "rusEFI 2021.02.19.all.1964465885" diff --git a/firmware/controllers/generated/signature_frankenso_na6.h b/firmware/controllers/generated/signature_frankenso_na6.h index ade1859e63..ebf465e893 100644 --- a/firmware/controllers/generated/signature_frankenso_na6.h +++ b/firmware/controllers/generated/signature_frankenso_na6.h @@ -3,6 +3,6 @@ // #define SIGNATURE_BOARD frankenso_na6 -#define SIGNATURE_DATE 2021.02.18 +#define SIGNATURE_DATE 2021.02.19 #define SIGNATURE_HASH 4050481998 -#define TS_SIGNATURE "rusEFI 2021.02.18.frankenso_na6.4050481998" +#define TS_SIGNATURE "rusEFI 2021.02.19.frankenso_na6.4050481998" diff --git a/firmware/controllers/generated/signature_hellen72.h b/firmware/controllers/generated/signature_hellen72.h index 245d0e7945..3b031a56ed 100644 --- a/firmware/controllers/generated/signature_hellen72.h +++ b/firmware/controllers/generated/signature_hellen72.h @@ -3,6 +3,6 @@ // #define SIGNATURE_BOARD hellen72 -#define SIGNATURE_DATE 2021.02.18 +#define SIGNATURE_DATE 2021.02.19 #define SIGNATURE_HASH 256101980 -#define TS_SIGNATURE "rusEFI 2021.02.18.hellen72.256101980" +#define TS_SIGNATURE "rusEFI 2021.02.19.hellen72.256101980" diff --git a/firmware/controllers/generated/signature_hellen_cypress.h b/firmware/controllers/generated/signature_hellen_cypress.h index ff5468e2ab..bb35d8fed8 100644 --- a/firmware/controllers/generated/signature_hellen_cypress.h +++ b/firmware/controllers/generated/signature_hellen_cypress.h @@ -3,6 +3,6 @@ // #define SIGNATURE_BOARD hellen_cypress -#define SIGNATURE_DATE 2021.02.18 +#define SIGNATURE_DATE 2021.02.19 #define SIGNATURE_HASH 929793293 -#define TS_SIGNATURE "rusEFI 2021.02.18.hellen_cypress.929793293" +#define TS_SIGNATURE "rusEFI 2021.02.19.hellen_cypress.929793293" diff --git a/firmware/controllers/generated/signature_kin.h b/firmware/controllers/generated/signature_kin.h index 3005871a1c..03f8cae7a6 100644 --- a/firmware/controllers/generated/signature_kin.h +++ b/firmware/controllers/generated/signature_kin.h @@ -3,6 +3,6 @@ // #define SIGNATURE_BOARD kin -#define SIGNATURE_DATE 2021.02.18 +#define SIGNATURE_DATE 2021.02.19 #define SIGNATURE_HASH 3368962545 -#define TS_SIGNATURE "rusEFI 2021.02.18.kin.3368962545" +#define TS_SIGNATURE "rusEFI 2021.02.19.kin.3368962545" diff --git a/firmware/controllers/generated/signature_mre_f4.h b/firmware/controllers/generated/signature_mre_f4.h index 23e92ad296..e30f649393 100644 --- a/firmware/controllers/generated/signature_mre_f4.h +++ b/firmware/controllers/generated/signature_mre_f4.h @@ -3,6 +3,6 @@ // #define SIGNATURE_BOARD mre_f4 -#define SIGNATURE_DATE 2021.02.18 +#define SIGNATURE_DATE 2021.02.19 #define SIGNATURE_HASH 1540434999 -#define TS_SIGNATURE "rusEFI 2021.02.18.mre_f4.1540434999" +#define TS_SIGNATURE "rusEFI 2021.02.19.mre_f4.1540434999" diff --git a/firmware/controllers/generated/signature_mre_f7.h b/firmware/controllers/generated/signature_mre_f7.h index 14ce90af79..4987d99d85 100644 --- a/firmware/controllers/generated/signature_mre_f7.h +++ b/firmware/controllers/generated/signature_mre_f7.h @@ -3,6 +3,6 @@ // #define SIGNATURE_BOARD mre_f7 -#define SIGNATURE_DATE 2021.02.18 +#define SIGNATURE_DATE 2021.02.19 #define SIGNATURE_HASH 1540434999 -#define TS_SIGNATURE "rusEFI 2021.02.18.mre_f7.1540434999" +#define TS_SIGNATURE "rusEFI 2021.02.19.mre_f7.1540434999" diff --git a/firmware/controllers/generated/signature_prometheus_405.h b/firmware/controllers/generated/signature_prometheus_405.h index 71de4af232..27d295fba1 100644 --- a/firmware/controllers/generated/signature_prometheus_405.h +++ b/firmware/controllers/generated/signature_prometheus_405.h @@ -3,6 +3,6 @@ // #define SIGNATURE_BOARD prometheus_405 -#define SIGNATURE_DATE 2021.02.18 +#define SIGNATURE_DATE 2021.02.19 #define SIGNATURE_HASH 1736531179 -#define TS_SIGNATURE "rusEFI 2021.02.18.prometheus_405.1736531179" +#define TS_SIGNATURE "rusEFI 2021.02.19.prometheus_405.1736531179" diff --git a/firmware/controllers/generated/signature_prometheus_469.h b/firmware/controllers/generated/signature_prometheus_469.h index a4bc0f9a20..a76ec4b266 100644 --- a/firmware/controllers/generated/signature_prometheus_469.h +++ b/firmware/controllers/generated/signature_prometheus_469.h @@ -3,6 +3,6 @@ // #define SIGNATURE_BOARD prometheus_469 -#define SIGNATURE_DATE 2021.02.18 +#define SIGNATURE_DATE 2021.02.19 #define SIGNATURE_HASH 1736531179 -#define TS_SIGNATURE "rusEFI 2021.02.18.prometheus_469.1736531179" +#define TS_SIGNATURE "rusEFI 2021.02.19.prometheus_469.1736531179" diff --git a/firmware/controllers/generated/signature_proteus_f4.h b/firmware/controllers/generated/signature_proteus_f4.h index c0bf23ab3a..ca73ea4890 100644 --- a/firmware/controllers/generated/signature_proteus_f4.h +++ b/firmware/controllers/generated/signature_proteus_f4.h @@ -3,6 +3,6 @@ // #define SIGNATURE_BOARD proteus_f4 -#define SIGNATURE_DATE 2021.02.18 +#define SIGNATURE_DATE 2021.02.19 #define SIGNATURE_HASH 304518898 -#define TS_SIGNATURE "rusEFI 2021.02.18.proteus_f4.304518898" +#define TS_SIGNATURE "rusEFI 2021.02.19.proteus_f4.304518898" diff --git a/firmware/controllers/generated/signature_proteus_f7.h b/firmware/controllers/generated/signature_proteus_f7.h index f4964e4754..1d86c035b2 100644 --- a/firmware/controllers/generated/signature_proteus_f7.h +++ b/firmware/controllers/generated/signature_proteus_f7.h @@ -3,6 +3,6 @@ // #define SIGNATURE_BOARD proteus_f7 -#define SIGNATURE_DATE 2021.02.18 +#define SIGNATURE_DATE 2021.02.19 #define SIGNATURE_HASH 304518898 -#define TS_SIGNATURE "rusEFI 2021.02.18.proteus_f7.304518898" +#define TS_SIGNATURE "rusEFI 2021.02.19.proteus_f7.304518898" diff --git a/firmware/controllers/generated/signature_subaru_eg33_f7.h b/firmware/controllers/generated/signature_subaru_eg33_f7.h index 7cca003585..00f9390b17 100644 --- a/firmware/controllers/generated/signature_subaru_eg33_f7.h +++ b/firmware/controllers/generated/signature_subaru_eg33_f7.h @@ -3,6 +3,6 @@ // #define SIGNATURE_BOARD subaru_eg33_f7 -#define SIGNATURE_DATE 2021.02.18 +#define SIGNATURE_DATE 2021.02.19 #define SIGNATURE_HASH 3083086059 -#define TS_SIGNATURE "rusEFI 2021.02.18.subaru_eg33_f7.3083086059" +#define TS_SIGNATURE "rusEFI 2021.02.19.subaru_eg33_f7.3083086059" diff --git a/firmware/tunerstudio/generated/cache.zip b/firmware/tunerstudio/generated/cache.zip index f2a071746f..e4dad5c89d 100644 Binary files a/firmware/tunerstudio/generated/cache.zip and b/firmware/tunerstudio/generated/cache.zip differ diff --git a/firmware/tunerstudio/generated/rusefi.ini b/firmware/tunerstudio/generated/rusefi.ini index b2be693d3d..0262b4d9ed 100644 --- a/firmware/tunerstudio/generated/rusefi.ini +++ b/firmware/tunerstudio/generated/rusefi.ini @@ -33,12 +33,12 @@ enable2ndByteCanID = false [MegaTune] ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 - signature = "rusEFI 2021.02.18.all.1964465885" + signature = "rusEFI 2021.02.19.all.1964465885" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI 2021.02.18.all.1964465885" ; signature is expected to be 7 or more characters. + signature = "rusEFI 2021.02.19.all.1964465885" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -77,7 +77,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:20 UTC 2021 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Feb 19 12:59:55 UTC 2021 pageSize = 20000 page = 1 diff --git a/firmware/tunerstudio/generated/rusefi_frankenso_na6.ini b/firmware/tunerstudio/generated/rusefi_frankenso_na6.ini index be01a5517d..225021a37a 100644 --- a/firmware/tunerstudio/generated/rusefi_frankenso_na6.ini +++ b/firmware/tunerstudio/generated/rusefi_frankenso_na6.ini @@ -33,12 +33,12 @@ enable2ndByteCanID = false [MegaTune] ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 - signature = "rusEFI 2021.02.18.frankenso_na6.4050481998" + signature = "rusEFI 2021.02.19.frankenso_na6.4050481998" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI 2021.02.18.frankenso_na6.4050481998" ; signature is expected to be 7 or more characters. + signature = "rusEFI 2021.02.19.frankenso_na6.4050481998" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -77,7 +77,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:28 UTC 2021 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Feb 19 13:00:03 UTC 2021 pageSize = 20000 page = 1 diff --git a/firmware/tunerstudio/generated/rusefi_hellen72.ini b/firmware/tunerstudio/generated/rusefi_hellen72.ini index 5bee632e0f..377b4bb25d 100644 --- a/firmware/tunerstudio/generated/rusefi_hellen72.ini +++ b/firmware/tunerstudio/generated/rusefi_hellen72.ini @@ -33,12 +33,12 @@ enable2ndByteCanID = false [MegaTune] ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 - signature = "rusEFI 2021.02.18.hellen72.256101980" + signature = "rusEFI 2021.02.19.hellen72.256101980" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI 2021.02.18.hellen72.256101980" ; signature is expected to be 7 or more characters. + signature = "rusEFI 2021.02.19.hellen72.256101980" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -77,7 +77,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:22 UTC 2021 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Feb 19 12:59:57 UTC 2021 pageSize = 20000 page = 1 diff --git a/firmware/tunerstudio/generated/rusefi_hellen_cypress.ini b/firmware/tunerstudio/generated/rusefi_hellen_cypress.ini index 97c31a432d..63d4875da3 100644 --- a/firmware/tunerstudio/generated/rusefi_hellen_cypress.ini +++ b/firmware/tunerstudio/generated/rusefi_hellen_cypress.ini @@ -33,12 +33,12 @@ enable2ndByteCanID = false [MegaTune] ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 - signature = "rusEFI 2021.02.18.hellen_cypress.929793293" + signature = "rusEFI 2021.02.19.hellen_cypress.929793293" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI 2021.02.18.hellen_cypress.929793293" ; signature is expected to be 7 or more characters. + signature = "rusEFI 2021.02.19.hellen_cypress.929793293" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -77,7 +77,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on hellen_cypress_gen_config.bat integration/rusefi_config.txt Thu Feb 18 23:19:48 UTC 2021 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on hellen_cypress_gen_config.bat integration/rusefi_config.txt Fri Feb 19 13:00:17 UTC 2021 pageSize = 20000 page = 1 diff --git a/firmware/tunerstudio/generated/rusefi_kinetis.ini b/firmware/tunerstudio/generated/rusefi_kinetis.ini index 3aca1e9819..b7d2a12bd1 100644 --- a/firmware/tunerstudio/generated/rusefi_kinetis.ini +++ b/firmware/tunerstudio/generated/rusefi_kinetis.ini @@ -33,12 +33,12 @@ enable2ndByteCanID = false [MegaTune] ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 - signature = "rusEFI 2021.02.18.kin.3368962545" + signature = "rusEFI 2021.02.19.kin.3368962545" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI 2021.02.18.kin.3368962545" ; signature is expected to be 7 or more characters. + signature = "rusEFI 2021.02.19.kin.3368962545" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -77,7 +77,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Thu Feb 18 23:19:43 UTC 2021 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Fri Feb 19 13:00:14 UTC 2021 pageSize = 19972 page = 1 diff --git a/firmware/tunerstudio/generated/rusefi_mre_f4.ini b/firmware/tunerstudio/generated/rusefi_mre_f4.ini index 5a14dd37a8..a5f155c49f 100644 --- a/firmware/tunerstudio/generated/rusefi_mre_f4.ini +++ b/firmware/tunerstudio/generated/rusefi_mre_f4.ini @@ -33,12 +33,12 @@ enable2ndByteCanID = false [MegaTune] ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 - signature = "rusEFI 2021.02.18.mre_f4.1540434999" + signature = "rusEFI 2021.02.19.mre_f4.1540434999" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI 2021.02.18.mre_f4.1540434999" ; signature is expected to be 7 or more characters. + signature = "rusEFI 2021.02.19.mre_f4.1540434999" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -77,7 +77,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:26 UTC 2021 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Feb 19 13:00:01 UTC 2021 pageSize = 20000 page = 1 diff --git a/firmware/tunerstudio/generated/rusefi_mre_f7.ini b/firmware/tunerstudio/generated/rusefi_mre_f7.ini index 0259040dd8..443efca061 100644 --- a/firmware/tunerstudio/generated/rusefi_mre_f7.ini +++ b/firmware/tunerstudio/generated/rusefi_mre_f7.ini @@ -33,12 +33,12 @@ enable2ndByteCanID = false [MegaTune] ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 - signature = "rusEFI 2021.02.18.mre_f7.1540434999" + signature = "rusEFI 2021.02.19.mre_f7.1540434999" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI 2021.02.18.mre_f7.1540434999" ; signature is expected to be 7 or more characters. + signature = "rusEFI 2021.02.19.mre_f7.1540434999" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -77,7 +77,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:24 UTC 2021 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Feb 19 12:59:59 UTC 2021 pageSize = 20000 page = 1 diff --git a/firmware/tunerstudio/generated/rusefi_prometheus_405.ini b/firmware/tunerstudio/generated/rusefi_prometheus_405.ini index cac750fd1d..4a28e55b40 100644 --- a/firmware/tunerstudio/generated/rusefi_prometheus_405.ini +++ b/firmware/tunerstudio/generated/rusefi_prometheus_405.ini @@ -33,12 +33,12 @@ enable2ndByteCanID = false [MegaTune] ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 - signature = "rusEFI 2021.02.18.prometheus_405.1736531179" + signature = "rusEFI 2021.02.19.prometheus_405.1736531179" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI 2021.02.18.prometheus_405.1736531179" ; signature is expected to be 7 or more characters. + signature = "rusEFI 2021.02.19.prometheus_405.1736531179" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -77,7 +77,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:32 UTC 2021 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Feb 19 13:00:07 UTC 2021 pageSize = 20000 page = 1 diff --git a/firmware/tunerstudio/generated/rusefi_prometheus_469.ini b/firmware/tunerstudio/generated/rusefi_prometheus_469.ini index bb0c89e1ef..d17ec8d0d5 100644 --- a/firmware/tunerstudio/generated/rusefi_prometheus_469.ini +++ b/firmware/tunerstudio/generated/rusefi_prometheus_469.ini @@ -33,12 +33,12 @@ enable2ndByteCanID = false [MegaTune] ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 - signature = "rusEFI 2021.02.18.prometheus_469.1736531179" + signature = "rusEFI 2021.02.19.prometheus_469.1736531179" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI 2021.02.18.prometheus_469.1736531179" ; signature is expected to be 7 or more characters. + signature = "rusEFI 2021.02.19.prometheus_469.1736531179" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -77,7 +77,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:30 UTC 2021 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Feb 19 13:00:05 UTC 2021 pageSize = 20000 page = 1 diff --git a/firmware/tunerstudio/generated/rusefi_proteus_f4.ini b/firmware/tunerstudio/generated/rusefi_proteus_f4.ini index a524f74590..393eccae42 100644 --- a/firmware/tunerstudio/generated/rusefi_proteus_f4.ini +++ b/firmware/tunerstudio/generated/rusefi_proteus_f4.ini @@ -33,12 +33,12 @@ enable2ndByteCanID = false [MegaTune] ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 - signature = "rusEFI 2021.02.18.proteus_f4.304518898" + signature = "rusEFI 2021.02.19.proteus_f4.304518898" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI 2021.02.18.proteus_f4.304518898" ; signature is expected to be 7 or more characters. + signature = "rusEFI 2021.02.19.proteus_f4.304518898" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -77,7 +77,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:37 UTC 2021 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Feb 19 13:00:11 UTC 2021 pageSize = 20000 page = 1 diff --git a/firmware/tunerstudio/generated/rusefi_proteus_f7.ini b/firmware/tunerstudio/generated/rusefi_proteus_f7.ini index 980a4cad05..8970fc12fb 100644 --- a/firmware/tunerstudio/generated/rusefi_proteus_f7.ini +++ b/firmware/tunerstudio/generated/rusefi_proteus_f7.ini @@ -33,12 +33,12 @@ enable2ndByteCanID = false [MegaTune] ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 - signature = "rusEFI 2021.02.18.proteus_f7.304518898" + signature = "rusEFI 2021.02.19.proteus_f7.304518898" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI 2021.02.18.proteus_f7.304518898" ; signature is expected to be 7 or more characters. + signature = "rusEFI 2021.02.19.proteus_f7.304518898" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -77,7 +77,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:34 UTC 2021 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Feb 19 13:00:09 UTC 2021 pageSize = 20000 page = 1 diff --git a/firmware/tunerstudio/generated/rusefi_subaru_eg33_f7.ini b/firmware/tunerstudio/generated/rusefi_subaru_eg33_f7.ini index 5b9831bfba..4d23055fe8 100644 --- a/firmware/tunerstudio/generated/rusefi_subaru_eg33_f7.ini +++ b/firmware/tunerstudio/generated/rusefi_subaru_eg33_f7.ini @@ -33,12 +33,12 @@ enable2ndByteCanID = false [MegaTune] ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 - signature = "rusEFI 2021.02.18.subaru_eg33_f7.3083086059" + signature = "rusEFI 2021.02.19.subaru_eg33_f7.3083086059" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI 2021.02.18.subaru_eg33_f7.3083086059" ; signature is expected to be 7 or more characters. + signature = "rusEFI 2021.02.19.subaru_eg33_f7.3083086059" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -77,7 +77,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on config/boards/subaru_eg33/config/gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:50 UTC 2021 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on config/boards/subaru_eg33/config/gen_config.sh integration/rusefi_config.txt Fri Feb 19 13:00:20 UTC 2021 pageSize = 20000 page = 1 diff --git a/java_console/models/src/main/java/com/rusefi/config/generated/Fields.java b/java_console/models/src/main/java/com/rusefi/config/generated/Fields.java index 9e96bb9f8e..ace40db6c4 100644 --- a/java_console/models/src/main/java/com/rusefi/config/generated/Fields.java +++ b/java_console/models/src/main/java/com/rusefi/config/generated/Fields.java @@ -1,6 +1,6 @@ package com.rusefi.config.generated; -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Thu Feb 18 23:19:20 UTC 2021 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Fri Feb 19 12:59:55 UTC 2021 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; @@ -1478,7 +1478,7 @@ public class Fields { public static final char TS_SD_R_COMMAND = 'r'; public static final char TS_SD_W_COMMAND = 'w'; public static final char TS_SET_LOGGER_SWITCH = 'l'; - public static final String TS_SIGNATURE = "rusEFI 2021.02.18.all.1964465885"; + public static final String TS_SIGNATURE = "rusEFI 2021.02.19.all.1964465885"; public static final char TS_SINGLE_WRITE_COMMAND = 'W'; public static final int TT_TT_1_16 = 50; public static final int TT_TT_2JZ_1_12 = 29; diff --git a/java_console/rusefi.xml b/java_console/rusefi.xml index acc7c90119..2532fb1051 100644 --- a/java_console/rusefi.xml +++ b/java_console/rusefi.xml @@ -1,6 +1,6 @@ - + diff --git a/misc/pinout-gen/script.js b/misc/pinout-gen/script.js index 161ec51e8a..774f39bc64 100644 --- a/misc/pinout-gen/script.js +++ b/misc/pinout-gen/script.js @@ -29,7 +29,7 @@ function clickPin(table, pin, pdiv) { return pin.id.indexOf(value) === index; }); for (var i = 0; i < pinIds.length; i++) { - addRow(table, {pin: pin.pin, id: pinIds[i], function: pin.function}, pdiv); + addRow(table, {pin: pin.pin, id: pinIds[i], function: pin.function, type: pin.type}, pdiv); } } else { addRow(table, pin, pdiv); diff --git a/misc/pinout-gen/style.css b/misc/pinout-gen/style.css index 1a740fd5d2..f1b1bd68e7 100644 --- a/misc/pinout-gen/style.css +++ b/misc/pinout-gen/style.css @@ -80,10 +80,22 @@ border-color: lightgreen; } +[data-type*="mr"] { + border-color: firebrick; +} + +[data-type*="pgnd"] { + border-color: coral; +} + [data-type*="sgnd"] { border-color: olive; } +[data-type*="usb"] { + border-color: lightseagreen; +} + [data-type*="vr"] { border-color: sienna; }