From 24c78d2f0bcebfefc943302b8e303710be5c1421 Mon Sep 17 00:00:00 2001 From: Andrey Date: Sat, 26 Nov 2022 17:36:27 -0500 Subject: [PATCH] Q: would this break anything? A: apparently YES! --- firmware/console/binary/live_data.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/firmware/console/binary/live_data.cpp b/firmware/console/binary/live_data.cpp index 5882b695d3..93b0cec970 100644 --- a/firmware/console/binary/live_data.cpp +++ b/firmware/console/binary/live_data.cpp @@ -140,6 +140,18 @@ const electronic_throttle_s* getLiveDataAddr(size_t) { return nullptr; } +#if EFI_UNIT_TEST +FragmentList getLiveDataFragments() { + // todo: would same runtime be optimized into static during firmware build? + FragmentEntry fragments[] = { + // This header is generated - do not edit by hand! + #include "live_data_fragments.h" + }; + + return { fragments, efi::size(fragments) }; +} +#else + static const FragmentEntry fragments[] = { // This header is generated - do not edit by hand! #include "live_data_fragments.h" @@ -148,3 +160,5 @@ static const FragmentEntry fragments[] = { FragmentList getLiveDataFragments() { return { fragments, efi::size(fragments) }; } + +#endif