rusEFI
The most advanced open source ECU
|
Binary protocol implementation.
This implementation would not happen without the documentation provided by Jon Zeeff (jon@z.nosp@m.eeff.nosp@m..com)
Integration with EFI Analytics Tuner Studio software
Tuner Studio has a really simple protocol, a minimal implementation capable of displaying current engine state on the gauges would require only two commands: queryCommand and ochGetCommand
queryCommand: Communication initialization command. TunerStudio sends a single byte H ECU response: One of the known ECU id strings.
ochGetCommand: Request for output channels state.TunerStudio sends a single byte O ECU response: A snapshot of output channels as described in [OutputChannels] section of the .ini file The length of this block is 'ochBlockSize' property of the .ini file
These two commands are enough to get working gauges. In order to start configuring the ECU using tuner studio, three more commands should be implemented:
See also https://www.efianalytics.com/TunerStudio/docs/EFI%20Analytics%20ECU%20Definition%20files.pdf
This file is part of rusEfi - see http://rusefi.com
rusEfi is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
This file is part of rusEfi - see http://rusefi.com
rusEfi is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file tunerstudio.cpp.
Variables | |
TunerStudio | tsInstance |
tunerstudio_counters_s | tsState |
CommandHandler | console_line_callback |
Definition at line 191 of file tunerstudio.cpp.
Referenced by validateOffsetCount().
|
static |
Definition at line 169 of file tunerstudio.cpp.
Referenced by TunerStudio::handleCrc32Check(), TunerStudio::handlePageReadCommand(), and TunerStudio::handleWriteChunkCommand().
|
static |
'Burn' command is a command to commit the changes
Definition at line 463 of file tunerstudio.cpp.
Referenced by TunerStudio::handleCrcCommand().
|
static |
Definition at line 548 of file tunerstudio.cpp.
Referenced by TunerStudio::handleCrcCommand().
|
static |
Definition at line 781 of file tunerstudio.cpp.
Referenced by TunerStudio::handleCrcCommand().
|
static |
Definition at line 774 of file tunerstudio.cpp.
Referenced by TunerStudio::handleCrcCommand().
|
static |
rusEfi own test command
this is NOT a standard TunerStudio command, this is my own extension of the protocol to simplify troubleshooting
Definition at line 521 of file tunerstudio.cpp.
Referenced by TunerStudio::handleCrcCommand(), and TunerStudio::handlePlainCommand().
PUBLIC_API_WEAK bool isBoardAskingTriggerTsRefresh | ( | ) |
Definition at line 261 of file tunerstudio.cpp.
Definition at line 496 of file tunerstudio.cpp.
Referenced by tsProcessOne().
bool isTouchingArea | ( | uint16_t | offset, |
uint16_t | count, | ||
int | areaStart, | ||
int | areaSize | ||
) |
Definition at line 283 of file tunerstudio.cpp.
Referenced by isTouchingVe().
PUBLIC_API_WEAK bool isTouchingVe | ( | uint16_t | offset, |
uint16_t | count | ||
) |
Definition at line 273 of file tunerstudio.cpp.
Referenced by onCalibrationWrite().
bool isTuningVeNow | ( | ) |
Definition at line 1039 of file tunerstudio.cpp.
Referenced by checkIfTuningVeNow(), and TpsAccelEnrichment::getTpsEnrichment().
bool needToTriggerTsRefresh | ( | ) |
Definition at line 265 of file tunerstudio.cpp.
Referenced by handleBurnCommand(), TunerStudio::handleWriteChunkCommand(), and updateTunerStudioState().
void onApplyPreset | ( | ) |
Definition at line 269 of file tunerstudio.cpp.
Referenced by applyPreset().
|
static |
Definition at line 277 of file tunerstudio.cpp.
Referenced by TunerStudio::handleWriteChunkCommand().
|
static |
Definition at line 100 of file tunerstudio.cpp.
Referenced by printTsStats(), and tunerStudioError().
|
static |
Definition at line 117 of file tunerstudio.cpp.
|
static |
Definition at line 142 of file tunerstudio.cpp.
Referenced by setTsSpeed(), and startTunerStudioConnectivity().
void requestBurn | ( | ) |
Definition at line 449 of file tunerstudio.cpp.
Referenced by configureRusefiLuaHooks(), handleBurnCommand(), initFlash(), and unlockEcu().
|
static |
Definition at line 138 of file tunerstudio.cpp.
Referenced by startTunerStudioConnectivity().
void sendErrorCode | ( | TsChannelBase * | tsChannel, |
uint8_t | code, | ||
const char * | msg | ||
) |
Definition at line 226 of file tunerstudio.cpp.
Referenced by handleBurnCommand(), tsProcessOne(), and validateOffsetCount().
|
static |
Definition at line 222 of file tunerstudio.cpp.
Referenced by TunerStudio::handleCrcCommand(), and TunerStudio::handleWriteChunkCommand().
|
static |
Definition at line 158 of file tunerstudio.cpp.
Referenced by startTunerStudioConnectivity().
void startTunerStudioConnectivity | ( | ) |
Definition at line 1044 of file tunerstudio.cpp.
Referenced by runRusEfi().
|
static |
Definition at line 609 of file tunerstudio.cpp.
Referenced by TunerstudioThread::ThreadTask().
void tunerStudioDebug | ( | TsChannelBase * | tsChannel, |
const char * | msg | ||
) |
Definition at line 163 of file tunerstudio.cpp.
Referenced by TunerStudio::handleCrcCommand(), TunerStudio::handlePlainCommand(), handleTestCommand(), and tunerStudioError().
void tunerStudioError | ( | TsChannelBase * | tsChannel, |
const char * | msg | ||
) |
Definition at line 762 of file tunerstudio.cpp.
Referenced by getWorkingPageAddr(), TunerStudio::handleCrc32Check(), TunerStudio::handleCrcCommand(), TunerStudio::handlePageReadCommand(), TunerStudio::handleWriteChunkCommand(), tsProcessOne(), and validateOffsetCount().
|
static |
Definition at line 210 of file tunerstudio.cpp.
Referenced by TunerStudio::handleCrc32Check(), TunerStudio::handlePageReadCommand(), and TunerStudio::handleWriteChunkCommand().
|
extern |
Definition at line 53 of file console_io.cpp.
Referenced by TunerStudio::handleExecuteCommand(), and startConsole().
TunerStudio tsInstance |
Definition at line 607 of file tunerstudio.cpp.
Referenced by tsProcessOne().
tunerstudio_counters_s tsState |
Definition at line 760 of file tunerstudio.cpp.
Referenced by TunerStudio::cmdOutputChannels(), handleBurnCommand(), TunerStudio::handleCrc32Check(), handleGetText(), TunerStudio::handlePageReadCommand(), TunerStudio::handleQueryCommand(), TunerStudio::handleScatteredReadCommand(), handleTestCommand(), TunerStudio::handleWriteChunkCommand(), printErrorCounters(), resetTs(), sendErrorCode(), startTunerStudioConnectivity(), tsProcessOne(), and tunerStudioError().