- 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_CRC_CHECK_COMMAND
|| command == TS_GET_FIRMWARE_VERSION
#if KNOCK_SPECTROGRAM
#ifdef KNOCK_SPECTROGRAM
|| command == TS_KNOCK_SPECTROGRAM_ENABLE
|| command == TS_KNOCK_SPECTROGRAM_DISABLE
#endif
@ -838,7 +838,7 @@ int TunerStudio::handleCrcCommand(TsChannelBase* tsChannel, char *data, int inco
sendErrorCode(tsChannel, TS_RESPONSE_OUT_OF_RANGE);
break;
#endif /* EFI_TOOTH_LOGGER */
#if KNOCK_SPECTROGRAM
#ifdef KNOCK_SPECTROGRAM
case TS_KNOCK_SPECTROGRAM_ENABLE:
knockSpectrogramEnable();
sendOkResponse(tsChannel, TS_CRC);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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