EFI_TOOTH_LOGGER

This commit is contained in:
rusefi 2019-07-07 15:22:46 -04:00
parent 3bf055cbdd
commit d0d546e500
7 changed files with 37 additions and 4 deletions

View File

@ -12,7 +12,9 @@ set EXTRA_PARAMS=-DDUMMY -DSTM32F746xx ^
-DEFI_INJECTOR_PIN3=GPIO_UNASSIGNED ^
-DEFI_COMMUNICATION_PIN=GPIOB_7 ^
-DEFI_FATAL_ERROR_PIN=GPIOB_14 ^
-DRAM_UNUSED_SIZE=10 -DCCM_UNUSED_SIZE=10
-DEFI_TOOTH_LOGGER=FALSE ^
-DRAM_UNUSED_SIZE=10 ^
-DCCM_UNUSED_SIZE=10
set DEBUG_LEVEL_OPT="-O2"
call config/boards/common_make.bat

View File

@ -18,6 +18,10 @@
#define EFI_CDM_INTEGRATION TRUE
#endif
#ifndef EFI_TOOTH_LOGGER
#define EFI_TOOTH_LOGGER TRUE
#endif
#define EFI_TEXT_LOGGING TRUE
#define EFI_PWM_TESTER FALSE

View File

@ -794,7 +794,8 @@ int tunerStudioHandleCrcCommand(ts_channel_s *tsChannel, char *data, int incomin
sendOkResponse(tsChannel, TS_CRC);
}
break;
case TS_SET_LOGGER_MODE:
#if EFI_TOOTH_LOGGER
case TS_SET_LOGGER_MODE:
switch(data[0]) {
case 0x01:
EnableToothLogger();
@ -817,6 +818,7 @@ int tunerStudioHandleCrcCommand(ts_channel_s *tsChannel, char *data, int incomin
}
break;
#endif /* EFI_TOOTH_LOGGER */
default:
tunerStudioError("ERROR: ignoring unexpected command");
return false;

View File

@ -1,8 +1,18 @@
/*
* @file tooth_logger.cpp
*
* @date Jul 7, 2019
* @author Matthew Kennedy
*/
#include "tooth_logger.h"
#include "global.h"
#if EFI_TOOTH_LOGGER
#include <cstddef>
#include "efitime.h"
#include "global.h"
#include "efilib.h"
#include "tunerstudio_configuration.h"
@ -70,3 +80,5 @@ void DisableToothLogger() {
ToothLoggerBuffer GetToothLoggerBuffer() {
return { reinterpret_cast<uint8_t*>(buffer), sizeof(buffer) };
}
#endif /* EFI_TOOTH_LOGGER */

View File

@ -1,3 +1,10 @@
/*
* @file tooth_logger.h
*
* @date Jul 7, 2019
* @author Matthew Kennedy
*/
#pragma once
#include <cstdint>

View File

@ -191,10 +191,12 @@ static bool isInsideTriggerHandler = false;
void hwHandleShaftSignal(trigger_event_e signal) {
#if EFI_TOOTH_LOGGER
// Log to the Tunerstudio tooth logger
// We want to do this before anything else as we
// actually want to capture any noise/jitter that may be occuring
// actually want to capture any noise/jitter that may be occurring
LogTriggerTooth(signal);
#endif /* EFI_TOOTH_LOGGER */
// for effective noise filtering, we need both signal edges,
// so we pass them to handleShaftSignal() and defer this test

View File

@ -42,6 +42,10 @@
#define EFI_MEMS FALSE
#ifndef EFI_TOOTH_LOGGER
#define EFI_TOOTH_LOGGER TRUE
#endif
#define CONSOLE_MAX_ACTIONS 256
#define EFI_SIMULATOR TRUE