From 90a1712a5f0e954c67fb92b644392bda79dbebfa Mon Sep 17 00:00:00 2001 From: Skorpishor Date: Sun, 10 Apr 2022 13:03:12 +0200 Subject: [PATCH] Add dependency on 5th wheel #define TRAILER_LIGHTS_TRAILER_PRESENCE_WHILE_5TH_WHEEL_LOCKED to be added in 10_adjustmentsTrailer.h --- src/src.ino | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/src.ino b/src/src.ino index 194bff1..11f35a1 100644 --- a/src/src.ino +++ b/src/src.ino @@ -3796,6 +3796,21 @@ else { trailerData.indicatorL = 0; trailerData.indicatorR = 0; } +#elif defined(TRAILER_LIGHTS_TRAILER_PRESENCE_WHILE_5TH_WHEEL_LOCKED) //Tralier lights depending on trucks 5-th wheel +if (!unlock5thWheel) { + trailerData.tailLight = ledcRead(2); + trailerData.sideLight = ledcRead(8); + trailerData.reversingLight = ledcRead(6); + trailerData.indicatorL = ledcRead(3); + trailerData.indicatorR = ledcRead(4); +} +else { + trailerData.tailLight = 0; + trailerData.sideLight = 0; + trailerData.reversingLight = 0; + trailerData.indicatorL = 0; + trailerData.indicatorR = 0; +} #else // Trailer lights always on trailerData.tailLight = ledcRead(2); trailerData.sideLight = ledcRead(8);