mirror of https://github.com/rusefi/wideband.git
CAN: send data for all AFR channels (#186)
Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
This commit is contained in:
parent
4730f1a2ca
commit
2a6d13f57c
|
@ -21,7 +21,9 @@ void CanTxThread(void*)
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
SendRusefiFormat(configuration->CanIndexOffset);
|
for (int ch = 0; ch < AFR_CHANNELS; ch++) {
|
||||||
|
SendRusefiFormat(ch);
|
||||||
|
}
|
||||||
|
|
||||||
chThdSleepMilliseconds(10);
|
chThdSleepMilliseconds(10);
|
||||||
}
|
}
|
||||||
|
@ -131,11 +133,9 @@ void InitCan()
|
||||||
chThdCreateStatic(waCanRxThread, sizeof(waCanRxThread), NORMALPRIO - 4, CanRxThread, nullptr);
|
chThdCreateStatic(waCanRxThread, sizeof(waCanRxThread), NORMALPRIO - 4, CanRxThread, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendRusefiFormat(uint8_t idx)
|
void SendRusefiFormat(uint8_t ch)
|
||||||
{
|
{
|
||||||
auto baseAddress = WB_DATA_BASE_ADDR + 2 * idx;
|
auto baseAddress = WB_DATA_BASE_ADDR + 2 * (ch + configuration->CanIndexOffset);
|
||||||
/* TODO: */
|
|
||||||
int ch = 0;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
CanTxTyped<wbo::StandardData> frame(baseAddress + 0);
|
CanTxTyped<wbo::StandardData> frame(baseAddress + 0);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
void InitCan();
|
void InitCan();
|
||||||
void SendCanData(float lambda, uint16_t measuredResistance);
|
void SendCanData(float lambda, uint16_t measuredResistance);
|
||||||
void SendRusefiFormat(uint8_t idx);
|
void SendRusefiFormat(uint8_t ch);
|
||||||
|
|
||||||
enum class HeaterAllow {
|
enum class HeaterAllow {
|
||||||
// no CAN message telling us what to do has been rx'd
|
// no CAN message telling us what to do has been rx'd
|
||||||
|
|
Loading…
Reference in New Issue