rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions
status_loop.h File Reference

Detailed Description

Date
Mar 15, 2013
Author
Andrey Belomutskiy, (c) 2012-2020

Definition in file status_loop.h.

Functions

void updateDevConsoleState ()
 Sends all pending data to rusEfi console.
 
void startStatusThreads ()
 
void printOverallStatus ()
 

Function Documentation

◆ printOverallStatus()

void printOverallStatus ( )

we report the version every second - this way the console does not need to request it and we will display it pretty soon

Definition at line 145 of file status_loop.cpp.

145 {
146#if EFI_ENGINE_SNIFFER
148#endif /* EFI_ENGINE_SNIFFER */
149
150
151 /**
152 * we report the version every second - this way the console does not need to
153 * request it and we will display it pretty soon
154 */
155 if (printVersionTimer.hasElapsedSec(1)) {
156 // we're sending, reset the timer
157 printVersionTimer.reset();
158
159 // Output the firmware version, board type, git hash, uptime in seconds, etc for rusEFI console
161
162 // Output the current engine sniffer pin mappings
164 }
165}
const char * getEngine_type_e(engine_type_e value)
void publishIfFull()
static constexpr engine_configuration_s * engineConfiguration
static void printEngineSnifferPinMappings()
static void printVersionForConsole(const char *engineTypeName, const char *firmwareBuildId)
static Timer printVersionTimer
WaveChart waveChart

Referenced by handleGetText().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ startStatusThreads()

void startStatusThreads ( )

Definition at line 768 of file status_loop.cpp.

768 {
769 // todo: refactoring needed, this file should probably be split into pieces
770#if EFI_PROD_CODE
773#endif /* EFI_PROD_CODE */
774}
static void initStatusLeds()
static CommunicationBlinkingTask communicationsBlinkingTask

Referenced by commonEarlyInit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateDevConsoleState()

void updateDevConsoleState ( )

Sends all pending data to rusEfi console.

This method is periodically invoked by the main loop todo: is this mostly dead code?

Definition at line 183 of file status_loop.cpp.

183 {
184#if EFI_PROD_CODE
185 // todo: unify with simulator!
186 if (hasFirmwareError()) {
187 efiPrintf("%s error: %s", CRITICAL_PREFIX, getCriticalErrorMessage());
188 return;
189 }
190#endif /* EFI_PROD_CODE */
191
192#if EFI_RTC
194#endif
195
196#if HAL_USE_ADC
198#endif /* HAL_USE_ADC */
199
200#if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT
201 int currentCkpEventCounter = engine->triggerCentral.triggerState.getTotalEventCounter();
202 systime_t nowSeconds = getTimeNowS();
203static int prevCkpEventCounter = -1;
204static systime_t timeOfPreviousReport = (systime_t) -1;
205 if (prevCkpEventCounter == currentCkpEventCounter && timeOfPreviousReport == nowSeconds) {
206 return;
207 }
208 timeOfPreviousReport = nowSeconds;
209
210 prevCkpEventCounter = currentCkpEventCounter;
211#else
212 chThdSleepMilliseconds(200);
213#endif
214
215#if EFI_LOGIC_ANALYZER
218#endif /* EFI_LOGIC_ANALYZER */
219}
void printFullAdcReportIfNeeded(void)
TriggerCentral triggerCentral
Definition engine.h:318
TunerStudioOutputChannels outputChannels
Definition engine.h:109
PrimaryTriggerDecoder triggerState
int64_t getTotalEventCounter() const
efitimesec_t getTimeNowS()
Current system time in seconds (32 bits)
Definition efitime.cpp:42
static EngineAccessor engine
Definition engine.h:413
const char * getCriticalErrorMessage()
void scheduleLogging(Logging *logging)
void printWave(Logging *logging)
uint32_t getEpochTime()
static Logging logicAnalyzerLogger("logic analyzer", logicAnalyzerBuffer, sizeof(logicAnalyzerBuffer))

Referenced by runMainLoop().

Here is the call graph for this function:
Here is the caller graph for this function:

Go to the source code of this file.