mirror of https://github.com/FOME-Tech/fome-fw.git
tachometer onFastCallback
This commit is contained in:
parent
c3e1435f39
commit
e00bc56666
|
@ -467,7 +467,6 @@ void Engine::periodicFastCallback() {
|
|||
|
||||
engineState.periodicFastCallback();
|
||||
|
||||
tachUpdate();
|
||||
speedoUpdate();
|
||||
|
||||
engineModules.apply_all([](auto & m) { m.onFastCallback(); });
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue