auto-sync
This commit is contained in:
parent
58b17a8807
commit
d352d240c5
|
@ -166,10 +166,6 @@ uint64_t getTimeNowNt(void) {
|
|||
return halTime.get();
|
||||
}
|
||||
|
||||
//uint64_t getHalTimer(void) {
|
||||
// return halTime.get();
|
||||
//}
|
||||
|
||||
efitimems_t currentTimeMillis(void) {
|
||||
// todo: migrate to getTimeNowUs? or not?
|
||||
return chTimeNow() / TICKS_IN_MS;
|
||||
|
@ -203,7 +199,6 @@ static void handleGpio(Engine *engine, int index) {
|
|||
// scheduleMsg(&logger, "setting %s %s", getIo_pin_e(pin), boolToString(value));
|
||||
setOutputPinValue(pin, value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void setPinState(io_pin_e ioPin, LEElement *element, Engine *engine) {
|
||||
|
@ -266,34 +261,6 @@ static void initPeriodicEvents(Engine *engine) {
|
|||
(vtfunc_t) &onEvenyGeneralMilliseconds, engine);
|
||||
}
|
||||
|
||||
//static void fuelPumpOff(void *arg) {
|
||||
// (void)arg;
|
||||
// if (getOutputPinValue(FUEL_PUMP_RELAY))
|
||||
// scheduleMsg(&logger, "fuelPump OFF at %s%d", hwPortname(boardConfiguration->fuelPumpPin));
|
||||
// turnOutputPinOff(FUEL_PUMP_RELAY);
|
||||
//}
|
||||
|
||||
//static void fuelPumpOn(trigger_event_e signal, uint32_t index, void *arg) {
|
||||
// (void)arg;
|
||||
// if (index != 0)
|
||||
// return; // let's not abuse the timer - one time per revolution would be enough
|
||||
// // todo: the check about GPIO_UNASSIGNED should be somewhere else!
|
||||
// if (!getOutputPinValue(FUEL_PUMP_RELAY) && boardConfiguration->fuelPumpPin != GPIO_UNASSIGNED)
|
||||
// scheduleMsg(&logger, "fuelPump ON at %s", hwPortname(boardConfiguration->fuelPumpPin));
|
||||
// turnOutputPinOn(FUEL_PUMP_RELAY);
|
||||
// /**
|
||||
// * the idea of this implementation is that we turn the pump when the ECU turns on or
|
||||
// * if the shafts are spinning and then we are constantly postponing the time when we
|
||||
// * will turn it off. Only if the shafts stop the turn off would actually happen.
|
||||
// */
|
||||
// chVTSetAny(&fuelPumpTimer, FUEL_PUMP_DELAY, &fuelPumpOff, 0);
|
||||
//}
|
||||
|
||||
//static void initFuelPump(void) {
|
||||
// addTriggerEventListener(&fuelPumpOn, "fuel pump", NULL);
|
||||
// fuelPumpOn(SHAFT_PRIMARY_UP, 0, NULL);
|
||||
//}
|
||||
|
||||
char * getPinNameByAdcChannel(adc_channel_e hwChannel, char *buffer) {
|
||||
strcpy((char*) buffer, portname(getAdcChannelPort(hwChannel)));
|
||||
itoa10(&buffer[2], getAdcChannelPin(hwChannel));
|
||||
|
|
Loading…
Reference in New Issue