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();
|
engineState.periodicFastCallback();
|
||||||
|
|
||||||
tachUpdate();
|
|
||||||
speedoUpdate();
|
speedoUpdate();
|
||||||
|
|
||||||
engineModules.apply_all([](auto & m) { m.onFastCallback(); });
|
engineModules.apply_all([](auto & m) { m.onFastCallback(); });
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue