update wideband firmware (#4186)

* use header from wideband

* update wideband

* we can use master now
This commit is contained in:
Matthew Kennedy 2022-05-29 10:49:51 -07:00 committed by GitHub
parent 66fffee321
commit a5eb91f1b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 29 deletions

1
.gitmodules vendored
View File

@ -22,7 +22,6 @@
[submodule "firmware/controllers/can/wideband_firmware"]
path = firmware/controllers/can/wideband_firmware
url = https://github.com/mck1117/wideband
branch = 20210110-hotfix
[submodule "firmware/ext/uzlib"]
path = firmware/ext/uzlib
url = https://github.com/pfalcon/uzlib

@ -1 +1 @@
Subproject commit e012aabeef0cff9fd4f04b26511275a70d907cb0
Subproject commit 88278fe7e6d843dd0d7248f4c8610202c2714780

View File

@ -99,37 +99,14 @@ void AemXSeriesWideband::decodeAemXSeries(const CANRxFrame& frame, efitick_t now
setValidValue(lambdaFloat, nowNt);
}
// TODO: include rusEFI wideband file directly
namespace wbo
{
struct StandardData
{
uint8_t Version;
uint8_t Valid;
uint16_t Lambda;
uint16_t TemperatureC;
uint16_t pad;
};
struct DiagData
{
uint16_t Esr;
uint16_t NernstDc;
uint8_t PumpDuty;
uint8_t Status;
uint8_t HeaterDuty;
uint8_t pad;
};
} // namespace wbo
#include "wideband_firmware/for_rusefi/wideband_can.h"
void AemXSeriesWideband::decodeRusefiStandard(const CANRxFrame& frame, efitick_t nowNt) {
auto data = reinterpret_cast<const wbo::StandardData*>(&frame.data8[0]);
// TODO: enforce version check
//bool versionValid = data->Version != RUSEFI_WIDEBAND_VERSION;
if (data->Version != RUSEFI_WIDEBAND_VERSION) {
// TODO: firmwareError here
}
float lambda = 0.0001f * data->Lambda;
engine->outputChannels.wbTemperature[m_sensorIndex] = data->TemperatureC;