removing a pointless thread

This commit is contained in:
rusefi 2019-07-13 10:36:31 -04:00
parent 0e6509906b
commit dcf0b3c867
3 changed files with 10 additions and 17 deletions

View File

@ -88,6 +88,11 @@ extern bool main_loop_started;
#include "fsio_impl.h"
#endif /* EFI_FSIO */
#if EFI_ENGINE_SNIFFER
#include "engine_sniffer.h"
extern WaveChart waveChart;
#endif /* EFI_ENGINE_SNIFFER */
// this 'true' value is needed for simulator
static volatile bool fullLog = true;
int warningEnabled = true;
@ -386,6 +391,10 @@ static void printOutPin(const char *pinName, brain_pin_e hwPin) {
#endif /* EFI_PROD_CODE */
void printOverallStatus(systime_t nowSeconds) {
#if EFI_ENGINE_SNIFFER
waveChart.publishIfFull();
#endif /* EFI_ENGINE_SNIFFER */
/**
* we report the version every 4 seconds - this way the console does not need to
* request it and we will display it pretty soon

View File

@ -793,7 +793,7 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX)
// help to notice when RAM usage goes up - if a code change adds to RAM usage these variables would fail
// linking process which is the way to raise the alarm
#ifndef RAM_UNUSED_SIZE
#define RAM_UNUSED_SIZE 14500
#define RAM_UNUSED_SIZE 16000
#endif
#ifndef CCM_UNUSED_SIZE
#define CCM_UNUSED_SIZE 4600

View File

@ -48,7 +48,6 @@ static volatile efitime_t previousEngineCycleTimeUs = 0;
static int waveReaderCount = 0;
static WaveReader readers[MAX_ICU_COUNT];
static THD_WORKING_AREA(waThreadStack, UTILITY_THREAD_STACK_SIZE);
static Logging * logger;
static void ensureInitialized(WaveReader *reader) {
@ -169,18 +168,6 @@ static void waTriggerEventListener(trigger_event_e ckpSignalType, uint32_t index
previousEngineCycleTimeUs = nowUs;
}
static THD_FUNCTION(waThread, arg) {
(void)arg;
chRegSetThreadName("Wave Analyzer");
#if EFI_ENGINE_SNIFFER
while (true) {
chThdSleepSeconds(CHART_RESET_DELAY);
waveChart.publishIfFull();
}
#endif /* EFI_ENGINE_SNIFFER */
}
/*
static uint32_t getWaveLowWidth(int index) {
WaveReader *reader = &readers[index];
@ -286,9 +273,6 @@ void initWaveAnalyzer(Logging *sharedLogger) {
addConsoleAction("waveinfo", showWaveInfo);
addConsoleActionII("set_logic_input_mode", setWaveModeSilent);
chThdCreateStatic(waThreadStack, sizeof(waThreadStack), NORMALPRIO, (tfunc_t)waThread, NULL);
#else
print("wave disabled\r\n");
#endif