More than one aux pid #866

refactoring
This commit is contained in:
rusefi 2019-07-07 19:59:48 -04:00
parent 87233c1e36
commit 788e69aadc
2 changed files with 10 additions and 13 deletions

View File

@ -795,7 +795,7 @@ int tunerStudioHandleCrcCommand(ts_channel_s *tsChannel, char *data, int incomin
}
break;
#if EFI_TOOTH_LOGGER
case TS_SET_LOGGER_MODE:
case TS_SET_LOGGER_MODE:
switch(data[0]) {
case 0x01:
EnableToothLogger();

View File

@ -226,15 +226,6 @@ efitimesec_t getTimeNowSeconds(void) {
#endif /* EFI_PROD_CODE */
static void periodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE);
static void scheduleNextSlowInvocation(void) {
// schedule next invocation
// we need at least protection from zero value while resetting configuration
int periodMs = maxI(50, CONFIGB(generalPeriodicThreadPeriodMs));
chVTSetAny(&periodicSlowTimer, TIME_MS2I(periodMs), (vtfunc_t) &periodicSlowCallback, NULL);
}
static void periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engine->periodicFastCallback();
/**
@ -285,7 +276,7 @@ static void invokePerSecond(void) {
#endif /* EFI_CLOCK_LOCKS */
}
static void periodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
static void doPeriodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
#if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT
efiAssertVoid(CUSTOM_ERR_6661, getCurrentRemainingStack() > 64, "lowStckOnEv");
#if EFI_PROD_CODE
@ -327,11 +318,17 @@ static void periodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
}
engine->periodicSlowCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
scheduleNextSlowInvocation();
#endif
}
static void periodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
doPeriodicSlowCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
// schedule next invocation
// we need at least protection from zero value while resetting configuration
int periodMs = maxI(50, CONFIGB(generalPeriodicThreadPeriodMs));
chVTSetAny(&periodicSlowTimer, TIME_MS2I(periodMs), (vtfunc_t) &periodicSlowCallback, NULL);
}
void initPeriodicEvents(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
periodicSlowCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);