when board is powered down we should be more CANbus silent

This commit is contained in:
rusefillc 2024-03-23 17:33:05 -04:00
parent 06fae8a555
commit 5b61136dea
2 changed files with 8 additions and 1 deletions

View File

@ -43,6 +43,11 @@ void setHellen64Can() {
static OutputPin megaEn;
bool boardEnableSendWidebandInfo() {
// when board is powered down we should be more CANbus silent
return megaEn.getLogicValue();
}
void hellenEnableEn() {
megaEn.setValue(1);
}

View File

@ -26,6 +26,8 @@ CanWrite::CanWrite()
{
}
__attribute__((weak)) bool boardEnableSendWidebandInfo() { return true; }
void CanWrite::PeriodicTask(efitick_t nowNt) {
UNUSED(nowNt);
static uint16_t cycleCount = 0;
@ -69,7 +71,7 @@ void CanWrite::PeriodicTask(efitick_t nowNt) {
}
#if EFI_WIDEBAND_FIRMWARE_UPDATE
if (engineConfiguration->enableAemXSeries && cycle.isInterval(CI::_50ms)) {
if (engineConfiguration->enableAemXSeries && cycle.isInterval(CI::_50ms) && boardEnableSendWidebandInfo()) {
sendWidebandInfo();
}
#endif