auto-sync
This commit is contained in:
parent
860700a022
commit
0bf5c2af8e
|
@ -115,7 +115,7 @@ extern LoggingWithStorage sharedLogger;
|
|||
|
||||
// todo: make these macro? kind of a penny optimization if compiler is not smart to inline
|
||||
void seTurnPinHigh(InjectorOutputPin *output) {
|
||||
// if (output->currentLogicValue == 1) {
|
||||
if (output->currentLogicValue == 1) {
|
||||
// if (output->cancelNextTurningInjectorOff) {
|
||||
// // how comes AutoTest.testFordAspire ends up here?
|
||||
// } else {
|
||||
|
@ -123,10 +123,14 @@ void seTurnPinHigh(InjectorOutputPin *output) {
|
|||
// * #299
|
||||
// * this is another kind of overlap which happens in case of a small duty cycle after a large duty cycle
|
||||
// */
|
||||
#if EFI_SIMULATOR || defined(__DOXYGEN__)
|
||||
printf("cancelNextTurningInjectorOff %s %d\r\n", output->name, (int)getTimeNowUs());
|
||||
#endif /* EFI_SIMULATOR */
|
||||
|
||||
// output->cancelNextTurningInjectorOff = true;
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
#if FUEL_MATH_EXTREME_LOGGING || defined(__DOXYGEN__)
|
||||
const char * w = output->currentLogicValue == true ? "err" : "";
|
||||
scheduleMsg(&sharedLogger, "^ %spin=%s eventIndex %d %d", w, output->name,
|
||||
|
@ -138,6 +142,9 @@ void seTurnPinHigh(InjectorOutputPin *output) {
|
|||
// firmwareError("Already high");
|
||||
#endif
|
||||
|
||||
#if EFI_SIMULATOR || defined(__DOXYGEN__)
|
||||
printf("seTurnPinHigh %s %d\r\n", output->name, (int)getTimeNowUs());
|
||||
#endif /* EFI_SIMULATOR */
|
||||
turnPinHigh(output);
|
||||
}
|
||||
|
||||
|
@ -153,9 +160,16 @@ void seTurnPinLow(InjectorOutputPin *output) {
|
|||
*
|
||||
*/
|
||||
output->cancelNextTurningInjectorOff = false;
|
||||
#if EFI_SIMULATOR || defined(__DOXYGEN__)
|
||||
printf("was cancelled %s %d\r\n", output->name, (int)getTimeNowUs());
|
||||
#endif /* EFI_SIMULATOR */
|
||||
return;
|
||||
}
|
||||
#if FUEL_MATH_EXTREME_LOGGING || defined(__DOXYGEN__)
|
||||
#if EFI_SIMULATOR || defined(__DOXYGEN__)
|
||||
printf("seTurnPinLow %s %d\r\n", output->name, (int)getTimeNowUs());
|
||||
#endif /* EFI_SIMULATOR */
|
||||
|
||||
#if FUEL_MATH_EXTREME_LOGGING || defined(__DOXYGEN__)
|
||||
const char * w = output->currentLogicValue == false ? "err" : "";
|
||||
|
||||
scheduleMsg(&sharedLogger, "- %spin=%s eventIndex %d %d", w, output->name,
|
||||
|
@ -176,9 +190,10 @@ void seScheduleByTime(const char *prefix, scheduling_s *scheduling, efitimeus_t
|
|||
scheduleMsg(&sharedLogger, "schX %s", param->name);
|
||||
#endif /* FUEL_MATH_EXTREME_LOGGING */
|
||||
|
||||
#if EFI_UNIT_TEST || defined(__DOXYGEN__)
|
||||
printf("schB %s %d\r\n", param->name, time);
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
#if EFI_SIMULATOR || EFI_UNIT_TEST || defined(__DOXYGEN__)
|
||||
printf("schB %s %d\r\n", param->name, (int)time);
|
||||
#endif /* EFI_SIMULATOR || EFI_UNIT_TEST */
|
||||
|
||||
scheduleByTime(prefix, scheduling, time, callback, param);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ engine_pins_s::engine_pins_s() {
|
|||
void InjectorOutputPin::reset() {
|
||||
overlappingScheduleOffTime = 0;
|
||||
cancelNextTurningInjectorOff = false;
|
||||
overlappingCounter = 0;
|
||||
// todo: this could be refactored by calling some super-reset method
|
||||
currentLogicValue = INITIAL_PIN_STATE;
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ public:
|
|||
void reset();
|
||||
efitimeus_t overlappingScheduleOffTime;
|
||||
bool cancelNextTurningInjectorOff;
|
||||
int overlappingCounter;
|
||||
};
|
||||
|
||||
class engine_pins_s {
|
||||
|
|
Loading…
Reference in New Issue