Settings: Add PerfTest

This commit is contained in:
Bryant Jones
2026-06-18 11:12:13 -04:00
committed by Kyle Schwarz
parent 4dd97f734a
commit 30606be7a8
24 changed files with 415 additions and 0 deletions
@@ -155,6 +155,7 @@ public:
return nullptr;
}
}
const CANFD_SETTINGS* getCANFDSettingsFor(Network net) const override {
auto cfg = getStructurePointer<neovifire2_settings_t>();
if(cfg == nullptr)
@@ -180,6 +181,7 @@ public:
return nullptr;
}
}
const CAN_SETTINGS* getLSFTCANSettingsFor(Network net) const override { return getCANSettingsFor(net); }
const SWCAN_SETTINGS* getSWCANSettingsFor(Network net) const override {
auto cfg = getStructurePointer<neovifire2_settings_t>();
@@ -234,6 +236,23 @@ public:
}
}
std::optional<bool> isPerfTestEnabled() const override {
auto cfg = getStructurePointer<neovifire2_settings_t>();
if(cfg == nullptr)
return std::nullopt;
return std::make_optional<bool>(cfg->perf_en != 0);
}
bool setPerfTestEnable(bool enable) override {
auto cfg = getMutableStructurePointer<neovifire2_settings_t>();
if(cfg == nullptr)
return false;
cfg->perf_en = !!enable;
return true;
}
protected:
ICSNEO_UNALIGNED(const uint64_t*) getTerminationEnables() const override {
auto cfg = getStructurePointer<neovifire2_settings_t>();