diff --git a/firmware/console/binary/live_data.cpp b/firmware/console/binary/live_data.cpp index 45932996b3..f80cf4576a 100644 --- a/firmware/console/binary/live_data.cpp +++ b/firmware/console/binary/live_data.cpp @@ -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 diff --git a/unit_tests/tests/actuators/test_etb_integrated.cpp b/unit_tests/tests/actuators/test_etb_integrated.cpp index 95bbfa6556..a477fb6051 100644 --- a/unit_tests/tests/actuators/test_etb_integrated.cpp +++ b/unit_tests/tests/actuators/test_etb_integrated.cpp @@ -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); }