- fix build

This commit is contained in:
3er0.1ive 2024-05-04 14:28:00 +03:00 committed by rusefillc
parent bdb997fe1a
commit d6fdf204fa
7 changed files with 11 additions and 11 deletions

View File

@ -392,7 +392,7 @@ static bool isKnownCommand(char command) {
|| command == TS_GET_TEXT || command == TS_GET_TEXT
|| command == TS_CRC_CHECK_COMMAND || command == TS_CRC_CHECK_COMMAND
|| command == TS_GET_FIRMWARE_VERSION || command == TS_GET_FIRMWARE_VERSION
#if KNOCK_SPECTROGRAM #ifdef KNOCK_SPECTROGRAM
|| command == TS_KNOCK_SPECTROGRAM_ENABLE || command == TS_KNOCK_SPECTROGRAM_ENABLE
|| command == TS_KNOCK_SPECTROGRAM_DISABLE || command == TS_KNOCK_SPECTROGRAM_DISABLE
#endif #endif
@ -838,7 +838,7 @@ int TunerStudio::handleCrcCommand(TsChannelBase* tsChannel, char *data, int inco
sendErrorCode(tsChannel, TS_RESPONSE_OUT_OF_RANGE); sendErrorCode(tsChannel, TS_RESPONSE_OUT_OF_RANGE);
break; break;
#endif /* EFI_TOOTH_LOGGER */ #endif /* EFI_TOOTH_LOGGER */
#if KNOCK_SPECTROGRAM #ifdef KNOCK_SPECTROGRAM
case TS_KNOCK_SPECTROGRAM_ENABLE: case TS_KNOCK_SPECTROGRAM_ENABLE:
knockSpectrogramEnable(); knockSpectrogramEnable();
sendOkResponse(tsChannel, TS_CRC); sendOkResponse(tsChannel, TS_CRC);

View File

@ -263,7 +263,7 @@ void setDefaultBaseEngine() {
engineConfiguration->issFilterReciprocal = 2; engineConfiguration->issFilterReciprocal = 2;
//knock //knock
#if KNOCK_SPECTROGRAM #ifdef KNOCK_SPECTROGRAM
engineConfiguration->enableKnockSpectrogram = false; engineConfiguration->enableKnockSpectrogram = false;
#endif #endif

View File

@ -741,7 +741,7 @@ void initRealHardwareEngineController() {
* UNUSED_SIZE constants. * UNUSED_SIZE constants.
*/ */
#ifndef RAM_UNUSED_SIZE #ifndef RAM_UNUSED_SIZE
#define RAM_UNUSED_SIZE 18000 #define RAM_UNUSED_SIZE 17400
#endif #endif
#ifndef CCM_UNUSED_SIZE #ifndef CCM_UNUSED_SIZE
#define CCM_UNUSED_SIZE 512 #define CCM_UNUSED_SIZE 512

View File

@ -10,7 +10,7 @@
#include "knock_config.h" #include "knock_config.h"
#include "ch.hpp" #include "ch.hpp"
#if KNOCK_SPECTROGRAM #ifdef KNOCK_SPECTROGRAM
#include "development/knock_spectrogram.h" #include "development/knock_spectrogram.h"
#include "fft/fft.h" #include "fft/fft.h"
@ -174,7 +174,7 @@ void initSoftwareKnock() {
knockFilter.configureBandpass(KNOCK_SAMPLE_RATE, 1000 * engineConfiguration->knockBandCustom, 3); knockFilter.configureBandpass(KNOCK_SAMPLE_RATE, 1000 * engineConfiguration->knockBandCustom, 3);
adcStart(&KNOCK_ADC, nullptr); adcStart(&KNOCK_ADC, nullptr);
#if KNOCK_SPECTROGRAM #ifdef KNOCK_SPECTROGRAM
engineConfiguration->enableKnockSpectrogram = false; engineConfiguration->enableKnockSpectrogram = false;
#endif #endif
@ -230,7 +230,7 @@ static void processLastKnockEvent() {
float mainFreq = 0.f; float mainFreq = 0.f;
#if KNOCK_SPECTROGRAM #ifdef KNOCK_SPECTROGRAM
if(enableKnockSpectrogram) { if(enableKnockSpectrogram) {
//ScopePerf perf(PE::KnockAnalyzer); //ScopePerf perf(PE::KnockAnalyzer);
constexpr float ratio = 3.3f / 4095.0f; constexpr float ratio = 3.3f / 4095.0f;
@ -269,7 +269,7 @@ void KnockThread::ThreadTask() {
} }
} }
#if KNOCK_SPECTROGRAM #ifdef KNOCK_SPECTROGRAM
void knockSpectrogramEnable() { void knockSpectrogramEnable() {
chibios_rt::CriticalSectionLocker csl; chibios_rt::CriticalSectionLocker csl;

View File

@ -6,7 +6,7 @@
void initSoftwareKnock(); void initSoftwareKnock();
void knockSamplingCallback(uint8_t cylinderIndex, efitick_t nowNt); void knockSamplingCallback(uint8_t cylinderIndex, efitick_t nowNt);
#if KNOCK_SPECTROGRAM #ifdef KNOCK_SPECTROGRAM
void knockSpectrogramEnable(); void knockSpectrogramEnable();
void knockSpectrogramDisable(); void knockSpectrogramDisable();
#endif #endif

View File

@ -7,7 +7,7 @@
#include "pch.h" #include "pch.h"
#if KNOCK_SPECTROGRAM #ifdef KNOCK_SPECTROGRAM
#include "knock_spectrogram.h" #include "knock_spectrogram.h"
#include <climits> #include <climits>

View File

@ -9,6 +9,6 @@
#include "global.h" #include "global.h"
#if KNOCK_SPECTROGRAM #ifdef KNOCK_SPECTROGRAM
void knockSpectorgramAddLine(float main_freq, float* data, size_t size); void knockSpectorgramAddLine(float main_freq, float* data, size_t size);
#endif #endif