ETB duty cycle jitter #4833

do-you-TDD
This commit is contained in:
Andrey 2022-11-29 16:05:36 -05:00
parent 3070e1b3c8
commit 21b217f132
2 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@
#include "tunerstudio.h"
#include "wideband_state_generated.h"
#include "electronic_throttle_generated.h"
#include "electronic_throttle_impl.h"
#include "knock_controller_generated.h"
#include "fuel_computer.h"
@ -136,8 +136,8 @@ const ignition_state_s* getLiveDataAddr() {
template<>
const electronic_throttle_s* getLiveDataAddr(size_t) {
// return engine->etbControllers[0];
return nullptr;
EtbController *etb = (EtbController *)engine->etbControllers[0];
return etb;
}
#if EFI_UNIT_TEST

View File

@ -36,5 +36,5 @@ TEST(etb, integrated) {
float destination;
int offset = ELECTRONIC_THROTTLE_BASE_ADDRESS + offsetof(electronic_throttle_s, etbDutyRateOfChange);
copyRange((uint8_t*)&destination, getLiveDataFragments(), offset, sizeof(destination));
ASSERT_EQ(destination, 0); // huh? what is broken here?
ASSERT_EQ(destination, -75);
}