only:CAN progress

This commit is contained in:
rusefillc 2024-02-05 09:47:11 -05:00
parent da4e6496c4
commit 994d53a28b
1 changed files with 2 additions and 4 deletions

View File

@ -5,8 +5,6 @@
#include "wideband_firmware/for_rusefi/wideband_can.h"
static constexpr uint32_t aem_base = 0x180;
// todo: consume WB_DATA_BASE_ADDR from fresh wideband_can.h https://github.com/rusefi/rusefi/issues/5208
#define WB_DATA_BASE_ADDR 0x190
static constexpr uint32_t rusefi_base = WB_DATA_BASE_ADDR;
AemXSeriesWideband::AemXSeriesWideband(uint8_t sensorIndex, SensorType type)
@ -24,7 +22,7 @@ bool AemXSeriesWideband::acceptFrame(const CANRxFrame& frame) const {
if (frame.DLC != 8) {
return false;
}
uint32_t id = CAN_ID(frame);
// 0th sensor is 0x180, 1st sensor is 0x181, etc
@ -33,7 +31,7 @@ bool AemXSeriesWideband::acceptFrame(const CANRxFrame& frame) const {
// 0th sensor is 0x190 and 0x191, 1st sensor is 0x192 and 0x193
uint32_t rusefiBaseId = rusefi_base + 2 * m_sensorIndex;
return
return
id == aemXSeriesId ||
id == rusefiBaseId ||
id == rusefiBaseId + 1;