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