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(); engineState.periodicFastCallback();
tachUpdate();
speedoUpdate(); speedoUpdate();
engineModules.apply_all([](auto & m) { m.onFastCallback(); }); engineModules.apply_all([](auto & m) { m.onFastCallback(); });

View File

@ -26,7 +26,7 @@ float getTachDuty() {
static bool tachHasInit = false; static bool tachHasInit = false;
void tachUpdate() { void TachometerModule::onFastCallback() {
// Only do anything if tach enabled // Only do anything if tach enabled
if (!tachHasInit) { if (!tachHasInit) {
return; return;

View File

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