only:AdcSubscription::ResetFilters()
This commit is contained in:
parent
47a78eac3e
commit
97acf15a41
|
@ -1,5 +1,6 @@
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
#include "adc_subscription.h"
|
||||||
|
|
||||||
void hellenWbo() {
|
void hellenWbo() {
|
||||||
engineConfiguration->enableAemXSeries = true;
|
engineConfiguration->enableAemXSeries = true;
|
||||||
|
@ -66,11 +67,13 @@ static bool hellenEnPinInitialized = false;
|
||||||
void hellenEnableEn(const char *msg) {
|
void hellenEnableEn(const char *msg) {
|
||||||
efiPrintf("Turning board ON [%s]", msg);
|
efiPrintf("Turning board ON [%s]", msg);
|
||||||
megaEn.setValue(1, /*isForce*/ true);
|
megaEn.setValue(1, /*isForce*/ true);
|
||||||
|
AdcSubscription::ResetFilters();
|
||||||
}
|
}
|
||||||
|
|
||||||
void hellenDisableEn(const char *msg) {
|
void hellenDisableEn(const char *msg) {
|
||||||
efiPrintf("Turning board off [%s]", msg);
|
efiPrintf("Turning board off [%s]", msg);
|
||||||
megaEn.setValue(0, /*isForce*/ true);
|
megaEn.setValue(0, /*isForce*/ true);
|
||||||
|
AdcSubscription::ResetFilters();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setHellenEnPin(Gpio pin, bool enableBoardOnStartUp) {
|
void setHellenEnPin(Gpio pin, bool enableBoardOnStartUp) {
|
||||||
|
|
|
@ -125,6 +125,13 @@ TODO: this code is similar to initIfValid, what is the plan? shall we extract he
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AdcSubscription::ResetFilters() {
|
||||||
|
for (size_t i = 0; i < efi::size(s_entries); i++) {
|
||||||
|
auto &entry = s_entries[i];
|
||||||
|
entry.HasUpdated = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void AdcSubscription::UpdateSubscribers(efitick_t nowNt) {
|
void AdcSubscription::UpdateSubscribers(efitick_t nowNt) {
|
||||||
ScopePerf perf(PE::AdcSubscriptionUpdateSubscribers);
|
ScopePerf perf(PE::AdcSubscriptionUpdateSubscribers);
|
||||||
|
|
||||||
|
|
|
@ -25,5 +25,7 @@ public:
|
||||||
static void UnsubscribeSensor(FunctionalSensor& sensor, adc_channel_e newChannel);
|
static void UnsubscribeSensor(FunctionalSensor& sensor, adc_channel_e newChannel);
|
||||||
static void UpdateSubscribers(efitick_t nowNt);
|
static void UpdateSubscribers(efitick_t nowNt);
|
||||||
|
|
||||||
|
static void ResetFilters();
|
||||||
|
|
||||||
static void PrintInfo();
|
static void PrintInfo();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue