move tsOutputChannels to header (#970)
This commit is contained in:
parent
9471a23484
commit
821ca6156f
|
@ -129,10 +129,6 @@ static ts_channel_s tsChannel;
|
||||||
// this thread wants a bit extra stack
|
// this thread wants a bit extra stack
|
||||||
static THD_WORKING_AREA(tunerstudioThreadStack, 3 * UTILITY_THREAD_STACK_SIZE);
|
static THD_WORKING_AREA(tunerstudioThreadStack, 3 * UTILITY_THREAD_STACK_SIZE);
|
||||||
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
|
|
||||||
extern tunerstudio_counters_s tsState;
|
|
||||||
|
|
||||||
static void resetTs(void) {
|
static void resetTs(void) {
|
||||||
memset(&tsState, 0, sizeof(tsState));
|
memset(&tsState, 0, sizeof(tsState));
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@ typedef struct {
|
||||||
int testCommandCounter;
|
int testCommandCounter;
|
||||||
} tunerstudio_counters_s;
|
} tunerstudio_counters_s;
|
||||||
|
|
||||||
|
extern tunerstudio_counters_s tsState;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* handle non CRC wrapped command
|
* handle non CRC wrapped command
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -180,4 +180,6 @@ typedef struct {
|
||||||
/* see also [OutputChannels] in rusefi.input */
|
/* see also [OutputChannels] in rusefi.input */
|
||||||
} TunerStudioOutputChannels;
|
} TunerStudioOutputChannels;
|
||||||
|
|
||||||
|
extern TunerStudioOutputChannels tsOutputChannels;
|
||||||
|
|
||||||
#endif /* TUNERSTUDIO_CONFIGURATION_H_ */
|
#endif /* TUNERSTUDIO_CONFIGURATION_H_ */
|
||||||
|
|
|
@ -101,11 +101,6 @@ static volatile bool fullLog = true;
|
||||||
int warningEnabled = true;
|
int warningEnabled = true;
|
||||||
//int warningEnabled = FALSE;
|
//int warningEnabled = FALSE;
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
extern tunerstudio_counters_s tsState;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern bool hasFirmwareErrorFlag;
|
extern bool hasFirmwareErrorFlag;
|
||||||
extern int maxTriggerReentraint;
|
extern int maxTriggerReentraint;
|
||||||
extern uint32_t maxLockedDuration;
|
extern uint32_t maxLockedDuration;
|
||||||
|
@ -1010,8 +1005,6 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
|
|
||||||
void prepareTunerStudioOutputs(void) {
|
void prepareTunerStudioOutputs(void) {
|
||||||
// sensor state for EFI Analytics Tuner Studio
|
// sensor state for EFI Analytics Tuner Studio
|
||||||
updateTunerStudioState(&tsOutputChannels PASS_ENGINE_PARAMETER_SUFFIX);
|
updateTunerStudioState(&tsOutputChannels PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
#include "efilib.h"
|
#include "efilib.h"
|
||||||
#include "tunerstudio_configuration.h"
|
#include "tunerstudio_configuration.h"
|
||||||
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
|
|
||||||
static uint16_t buffer[1000] CCM_OPTIONAL;
|
static uint16_t buffer[1000] CCM_OPTIONAL;
|
||||||
static size_t NextIdx = 0;
|
static size_t NextIdx = 0;
|
||||||
static volatile bool ToothLoggerEnabled = false;
|
static volatile bool ToothLoggerEnabled = false;
|
||||||
|
|
|
@ -36,10 +36,6 @@ Pid alternatorPid(altPidS);
|
||||||
|
|
||||||
static percent_t currentAltDuty;
|
static percent_t currentAltDuty;
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
|
||||||
|
|
||||||
static bool currentPlainOnOffState = false;
|
static bool currentPlainOnOffState = false;
|
||||||
static bool shouldResetPid = false;
|
static bool shouldResetPid = false;
|
||||||
|
|
||||||
|
|
|
@ -33,10 +33,6 @@ extern fsio8_Map3D_f32t fsioTable1;
|
||||||
// todo: this is to some extent a copy-paste of alternator_controller. maybe same loop
|
// todo: this is to some extent a copy-paste of alternator_controller. maybe same loop
|
||||||
// for all PIDs?
|
// for all PIDs?
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
|
||||||
|
|
||||||
static Logging *logger;
|
static Logging *logger;
|
||||||
|
|
||||||
static bool isEnabled(int index) {
|
static bool isEnabled(int index) {
|
||||||
|
|
|
@ -90,9 +90,6 @@
|
||||||
|
|
||||||
#define ETB_MAX_COUNT 2
|
#define ETB_MAX_COUNT 2
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
|
||||||
static bool shouldResetPid = false;
|
static bool shouldResetPid = false;
|
||||||
|
|
||||||
static pid_s tuneWorkingPidSettings;
|
static pid_s tuneWorkingPidSettings;
|
||||||
|
|
|
@ -47,9 +47,7 @@ static StepperMotor iacMotor;
|
||||||
|
|
||||||
|
|
||||||
static Logging *logger;
|
static Logging *logger;
|
||||||
#if EFI_TUNER_STUDIO
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
|
||||||
EXTERN_ENGINE
|
EXTERN_ENGINE
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
#if EFI_TUNER_STUDIO
|
#if EFI_TUNER_STUDIO
|
||||||
#include "tunerstudio_configuration.h"
|
#include "tunerstudio_configuration.h"
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
#endif /* EFI_TUNER_STUDIO */
|
||||||
|
|
||||||
EXTERN_ENGINE
|
EXTERN_ENGINE
|
||||||
|
|
|
@ -30,10 +30,6 @@
|
||||||
EXTERN_ENGINE
|
EXTERN_ENGINE
|
||||||
;
|
;
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
|
||||||
|
|
||||||
static ign_Map3D_t advanceMap("advance");
|
static ign_Map3D_t advanceMap("advance");
|
||||||
// This coeff in ctor parameter is sufficient for int16<->float conversion!
|
// This coeff in ctor parameter is sufficient for int16<->float conversion!
|
||||||
static ign_tps_Map3D_t advanceTpsMap("advanceTps", 1.0 / ADVANCE_TPS_STORAGE_MULT);
|
static ign_tps_Map3D_t advanceTpsMap("advanceTps", 1.0 / ADVANCE_TPS_STORAGE_MULT);
|
||||||
|
|
|
@ -42,10 +42,6 @@ LoggingWithStorage engineLogger("engine");
|
||||||
EXTERN_ENGINE
|
EXTERN_ENGINE
|
||||||
;
|
;
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
|
||||||
|
|
||||||
FsioState::FsioState() {
|
FsioState::FsioState() {
|
||||||
#if EFI_ENABLE_ENGINE_WARNING
|
#if EFI_ENABLE_ENGINE_WARNING
|
||||||
isEngineWarning = FALSE;
|
isEngineWarning = FALSE;
|
||||||
|
|
|
@ -32,10 +32,6 @@ EXTERN_ENGINE
|
||||||
// this does not look exactly right
|
// this does not look exactly right
|
||||||
extern LoggingWithStorage engineLogger;
|
extern LoggingWithStorage engineLogger;
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
|
||||||
|
|
||||||
WarningCodeState::WarningCodeState() {
|
WarningCodeState::WarningCodeState() {
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,10 +167,6 @@ void initSingleTimerExecutorHardware(void) {
|
||||||
initMicrosecondTimer();
|
initMicrosecondTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
|
||||||
|
|
||||||
void executorStatistics() {
|
void executorStatistics() {
|
||||||
if (engineConfiguration->debugMode == DBG_EXECUTOR) {
|
if (engineConfiguration->debugMode == DBG_EXECUTOR) {
|
||||||
#if EFI_TUNER_STUDIO && EFI_SIGNAL_EXECUTOR_ONE_TIMER
|
#if EFI_TUNER_STUDIO && EFI_SIGNAL_EXECUTOR_ONE_TIMER
|
||||||
|
|
|
@ -68,9 +68,6 @@ static Logging *logger;
|
||||||
#if ! EFI_UNIT_TEST
|
#if ! EFI_UNIT_TEST
|
||||||
static pid_s *fuelPidS = &persistentState.persistentConfiguration.engineConfiguration.fuelClosedLoopPid;
|
static pid_s *fuelPidS = &persistentState.persistentConfiguration.engineConfiguration.fuelClosedLoopPid;
|
||||||
static Pid fuelPid(fuelPidS);
|
static Pid fuelPid(fuelPidS);
|
||||||
#if EFI_TUNER_STUDIO
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// todo: figure out if this even helps?
|
// todo: figure out if this even helps?
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
#if EFI_TUNER_STUDIO
|
||||||
#include "tunerstudio_configuration.h"
|
#include "tunerstudio_configuration.h"
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
#endif /* EFI_TUNER_STUDIO */
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
#if EFI_TUNER_STUDIO
|
||||||
#include "tunerstudio.h"
|
#include "tunerstudio.h"
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
#endif /* EFI_TUNER_STUDIO */
|
||||||
|
|
||||||
#if EFI_ENGINE_SNIFFER
|
#if EFI_ENGINE_SNIFFER
|
||||||
|
|
|
@ -111,10 +111,6 @@ bool printTriggerDebug = false;
|
||||||
float actualSynchGap;
|
float actualSynchGap;
|
||||||
#endif /* ! EFI_PROD_CODE */
|
#endif /* ! EFI_PROD_CODE */
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
|
||||||
|
|
||||||
static Logging * logger;
|
static Logging * logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
EXTERN_CONFIG;
|
EXTERN_CONFIG;
|
||||||
#include "tunerstudio.h"
|
#include "tunerstudio.h"
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
#endif /* EFI_TUNER_STUDIO */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -28,10 +28,6 @@
|
||||||
|
|
||||||
#include "rtc_helper.h"
|
#include "rtc_helper.h"
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SD_STATE_INIT "init"
|
#define SD_STATE_INIT "init"
|
||||||
#define SD_STATE_MOUNTED "MOUNTED"
|
#define SD_STATE_MOUNTED "MOUNTED"
|
||||||
#define SD_STATE_MOUNT_FAILED "MOUNT_FAILED"
|
#define SD_STATE_MOUNT_FAILED "MOUNT_FAILED"
|
||||||
|
|
|
@ -23,7 +23,6 @@ EXTERN_ENGINE;
|
||||||
#include "hardware.h"
|
#include "hardware.h"
|
||||||
#include "backup_ram.h"
|
#include "backup_ram.h"
|
||||||
#include "pin_repository.h"
|
#include "pin_repository.h"
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
|
|
||||||
static Logging *logger;
|
static Logging *logger;
|
||||||
static unsigned char tx_buff[2];
|
static unsigned char tx_buff[2];
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
|
||||||
|
|
||||||
LinearFunc oilpSensorFunc;
|
LinearFunc oilpSensorFunc;
|
||||||
FunctionalSensor oilpSensor(SensorType::OilPressure);
|
FunctionalSensor oilpSensor(SensorType::OilPressure);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue