tachometer onFastCallback

This commit is contained in:
Matthew Kennedy 2024-09-03 16:32:22 -07:00
parent c3e1435f39
commit e00bc56666
3 changed files with 8 additions and 7 deletions

View File

@ -467,7 +467,6 @@ void Engine::periodicFastCallback() {
engineState.periodicFastCallback();
tachUpdate();
speedoUpdate();
engineModules.apply_all([](auto & m) { m.onFastCallback(); });

View File

@ -11,8 +11,8 @@
#include "pch.h"
static SimplePwm tachControl("tach");
static float tachFreq;
static float duty;
static float tachFreq;
static float duty;
#if EFI_UNIT_TEST
float getTachFreq() {
@ -26,7 +26,7 @@ float getTachDuty() {
static bool tachHasInit = false;
void tachUpdate() {
void TachometerModule::onFastCallback() {
// Only do anything if tach enabled
if (!tachHasInit) {
return;

View File

@ -8,7 +8,9 @@
#pragma once
void initTachometer();
void tachUpdate();
// TODO
struct TachometerModule : public EngineModule { };
struct TachometerModule : public EngineModule {
// TODO: can/should this be slow callback instead?
void onFastCallback() override;
};