From 105dc1b588d8c3a00be3035a1c8bc5c34ed674ed Mon Sep 17 00:00:00 2001 From: rusefi Date: Tue, 17 Oct 2023 16:04:42 -0400 Subject: [PATCH] making 'isUsbConnected' visible outside of EFI_SHAFT_POSITION_INPUT guard only:small-can-board --- firmware/console/status_loop.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 30198f9afc..2f29f3eb30 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -575,10 +575,6 @@ static void updateIgnition(int rpm) { } static void updateFlags() { -#if EFI_USB_SERIAL - engine->outputChannels.isUsbConnected = is_usb_serial_ready(); -#endif // EFI_USB_SERIAL - engine->outputChannels.isMainRelayOn = enginePins.mainRelay.getLogicValue(); engine->outputChannels.isFanOn = enginePins.fanRelay.getLogicValue(); engine->outputChannels.isFan2On = enginePins.fanRelay2.getLogicValue(); @@ -604,6 +600,9 @@ static void updateFlags() { // As of 2022 it's preferred to leverage LiveData where all state is exposed void updateTunerStudioState() { TunerStudioOutputChannels *tsOutputChannels = &engine->outputChannels; +#if EFI_USB_SERIAL + engine->outputChannels.isUsbConnected = is_usb_serial_ready(); +#endif // EFI_USB_SERIAL #if EFI_SHAFT_POSITION_INPUT int rpm = Sensor::get(SensorType::Rpm).value_or(0); #else /* EFI_SHAFT_POSITION_INPUT */