mirror of https://github.com/rusefi/wideband.git
board can override CAN format
This commit is contained in:
parent
0b27e6a8e7
commit
a588f15808
|
@ -22,7 +22,7 @@ void CanTxThread(void*)
|
|||
while(1)
|
||||
{
|
||||
for (int ch = 0; ch < AFR_CHANNELS; ch++) {
|
||||
SendRusefiFormat(ch);
|
||||
SendCanForChannel(ch);
|
||||
}
|
||||
|
||||
chThdSleepMilliseconds(10);
|
||||
|
@ -161,3 +161,9 @@ void SendRusefiFormat(uint8_t ch)
|
|||
frame.get().HeaterDuty = GetHeaterDuty(ch) * 255;
|
||||
}
|
||||
}
|
||||
|
||||
// Weak link so boards can override it
|
||||
__attribute__((weak)) void SendCanForChannel(uint8_t ch)
|
||||
{
|
||||
SendRusefiFormat(ch);
|
||||
}
|
||||
|
|
|
@ -20,3 +20,7 @@ enum class HeaterAllow {
|
|||
HeaterAllow GetHeaterAllowed();
|
||||
|
||||
float GetRemoteBatteryVoltage();
|
||||
|
||||
// implement this for your board if you want some non-standard behavior
|
||||
// default implementation simply calls SendRusefiFormat
|
||||
void SendCanForChannel(uint8_t ch);
|
||||
|
|
Loading…
Reference in New Issue