Skip to content

Commit

Permalink
Fix no-EGT boards
Browse files Browse the repository at this point in the history
  • Loading branch information
dron0gus committed Feb 5, 2024
1 parent cc267a1 commit ee43331
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions firmware/can.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ void SendAemNetUEGOForamt(uint8_t ch)
}
}

#if (EGT_CHANNELS > 0)
void SendAemNetEGTFormat(uint8_t ch)
{
auto id = AEMNET_EGT_BASE_ID + configuration->egt[ch].AemNetIdOffset;
Expand All @@ -222,6 +223,7 @@ void SendAemNetEGTFormat(uint8_t ch)
frame.get().TemperatureC = getEgtDrivers()[ch].temperature;
}
}
#endif /* EGT_CHANNELS > 0 */

// Weak link so boards can override it
__attribute__((weak)) void SendCanForChannel(uint8_t ch)
Expand All @@ -232,6 +234,8 @@ __attribute__((weak)) void SendCanForChannel(uint8_t ch)

__attribute__((weak)) void SendCanEgtForChannel(uint8_t ch)
{
#if (EGT_CHANNELS > 0)
// TODO: implement RusEFI protocol?
SendAemNetEGTFormat(ch);
#endif /* EGT_CHANNELS > 0 */
}

0 comments on commit ee43331

Please sign in to comment.