auto-sync
This commit is contained in:
parent
5afecce3a0
commit
066c6f4583
|
@ -72,6 +72,8 @@
|
|||
|
||||
#define EFI_ALTERNATOR_CONTROL TRUE
|
||||
|
||||
#define EFI_AUX_PID TRUE
|
||||
|
||||
#define EFI_SIGNAL_EXECUTOR_SLEEP FALSE
|
||||
#define EFI_SIGNAL_EXECUTOR_ONE_TIMER TRUE
|
||||
#define EFI_SIGNAL_EXECUTOR_HW_TIMER FALSE
|
||||
|
|
|
@ -7,7 +7,34 @@
|
|||
|
||||
#include "aux_pid.h"
|
||||
|
||||
#if EFI_AUX_PID || defined(__DOXYGEN__)
|
||||
|
||||
EXTERN_ENGINE
|
||||
;
|
||||
|
||||
// todo: this is to some extent a copy-paste of alternatorController. maybe same loop
|
||||
// for all PIDs?
|
||||
|
||||
static THD_WORKING_AREA(auxPidThreadStack, UTILITY_THREAD_STACK_SIZE);
|
||||
|
||||
static msg_t auxPidThread(int param) {
|
||||
UNUSED(param);
|
||||
chRegSetThreadName("AuxPidController");
|
||||
while (true) {
|
||||
int dt = maxI(10, engineConfiguration->auxPid1DT);
|
||||
chThdSleepMilliseconds(dt);
|
||||
|
||||
|
||||
}
|
||||
#if defined __GNUC__
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
void initAuxPid(Logging *sharedLogger) {
|
||||
chThdCreateStatic(auxPidThreadStack, sizeof(auxPidThreadStack), LOWPRIO,
|
||||
(tfunc_t) auxPidThread, NULL);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
#include "alternatorController.h"
|
||||
#include "fuel_math.h"
|
||||
#include "settings.h"
|
||||
#include "aux_pid.h"
|
||||
|
||||
#if HAL_USE_ADC || defined(__DOXYGEN__)
|
||||
#include "AdcConfiguration.h"
|
||||
|
@ -617,6 +618,10 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S) {
|
|||
initAlternatorCtrl(sharedLogger);
|
||||
#endif
|
||||
|
||||
#if EFI_AUX_PID || defined(__DOXYGEN__)
|
||||
initAuxPid(sharedLogger);
|
||||
#endif
|
||||
|
||||
#if EFI_ELECTRONIC_THROTTLE_BODY || defined(__DOXYGEN__)
|
||||
initElectronicThrottle();
|
||||
#endif /* EFI_ELECTRONIC_THROTTLE_BODY */
|
||||
|
|
Loading…
Reference in New Issue