auto-sync
This commit is contained in:
parent
ea5e001e9b
commit
6b0b207fef
|
@ -317,6 +317,9 @@ void handleBurnCommand(ts_response_format_e mode, uint16_t page) {
|
|||
static TunerStudioReadRequest readRequest;
|
||||
static short int pageIn;
|
||||
|
||||
/**
|
||||
* @return true if legacy command was processed, false otherwise
|
||||
*/
|
||||
static bool handlePlainCommand(uint8_t command) {
|
||||
if (command == TS_HELLO_COMMAND || command == TS_HELLO_COMMAND_DEPRECATED) {
|
||||
scheduleMsg(tsLogger, "Got naked Query command");
|
||||
|
@ -343,7 +346,10 @@ static bool handlePlainCommand(uint8_t command) {
|
|||
//scheduleMsg(logger, "Got naked Channels???");
|
||||
handleOutputChannelsCommand(TS_PLAIN);
|
||||
return true;
|
||||
} else if (command == 'F') {
|
||||
} else if (command == TS_LEGACY_HELLO_COMMAND) {
|
||||
tunerStudioDebug("ignoring LEGACY_HELLO_COMMAND");
|
||||
return true;
|
||||
} else if (command == TS_COMMAND_F) {
|
||||
tunerStudioDebug("not ignoring F");
|
||||
tunerStudioWriteData((const uint8_t *) PROTOCOL, strlen(PROTOCOL));
|
||||
return true;
|
||||
|
@ -355,6 +361,7 @@ static bool handlePlainCommand(uint8_t command) {
|
|||
static bool isKnownCommand(char command) {
|
||||
return command == TS_HELLO_COMMAND || command == TS_READ_COMMAND || command == TS_OUTPUT_COMMAND
|
||||
|| command == TS_PAGE_COMMAND || command == TS_BURN_COMMAND || command == TS_SINGLE_WRITE_COMMAND
|
||||
|| command == TS_LEGACY_HELLO_COMMAND
|
||||
|| command == TS_CHUNK_WRITE_COMMAND;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,12 +108,12 @@ int tunerStudioHandleCrcCommand(uint8_t *data, int incomingPacketSize) {
|
|||
handlePageReadCommand(TS_CRC, page, offset, count);
|
||||
} else if (command == 't' || command == 'T') {
|
||||
handleTestCommand();
|
||||
} else if (command == 'Q') {
|
||||
} else if (command == TS_LEGACY_HELLO_COMMAND) {
|
||||
/**
|
||||
* 'Q' is the query command used for compatibility with older ECUs
|
||||
*/
|
||||
tunerStudioDebug("ignoring Q");
|
||||
} else if (command == 'F') {
|
||||
} else if (command == TS_COMMAND_F) {
|
||||
tunerStudioDebug("ignoring F");
|
||||
/**
|
||||
* http://www.msextra.com/forums/viewtopic.php?f=122&t=48327
|
||||
|
@ -124,9 +124,9 @@ int tunerStudioHandleCrcCommand(uint8_t *data, int incomingPacketSize) {
|
|||
*/
|
||||
} else {
|
||||
tunerStudioError("ERROR: ignoring unexpected command");
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void tsSendResponse(ts_response_format_e mode, const uint8_t * buffer, int size) {
|
||||
|
|
|
@ -63,9 +63,11 @@ void tunerStudioError(const char *msg);
|
|||
|
||||
#define TS_HELLO_COMMAND_DEPRECATED 'H'
|
||||
#define TS_HELLO_COMMAND 'S'
|
||||
#define TS_LEGACY_HELLO_COMMAND 'Q'
|
||||
#define TS_OUTPUT_COMMAND 'O'
|
||||
#define TS_READ_COMMAND 'R'
|
||||
#define TS_PAGE_COMMAND 'P'
|
||||
#define TS_COMMAND_F 'F'
|
||||
|
||||
#define TS_SINGLE_WRITE_COMMAND 'W'
|
||||
#define TS_CHUNK_WRITE_COMMAND 'C'
|
||||
|
|
|
@ -1 +1 @@
|
|||
openocd-0.8.0.exe -f interface/stlink-v2.cfg -f board/stm32f4discovery.cfg -c init -c targets -c "halt" -c "flash write_image erase build/rusefi.elf" -c "verify_image firmware.elf" -c "reset run" -c shutdown
|
||||
openocd-0.8.0.exe -f interface/stlink-v2.cfg -f board/stm32f4discovery.cfg -c init -c targets -c "halt" -c "flash write_image erase rusefi.elf" -c "verify_image rusefi.elf" -c "reset run" -c shutdown
|
||||
|
|
Loading…
Reference in New Issue