SHARE
TWEET

Untitled

a guest Feb 16th, 2020 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    case MSG_LIGHT_STATUS: {
  2.       int fogsTmp = buf[MSG_LIGHT_STATUS_BYTE];
  3.       Serial.print(F("JT: ")); Serial.println(fogsTmp);
  4.       if ((fogsTmp == 40) || (fogsTmp == 41)) {
  5.         //High Beam On
  6.         Serial.println(F("Turning ON Fogs"));
  7.         DID_TURN_ON_FOGS = true;
  8.         turn_Off_On_Fogs();
  9.       } else if ((fogsTmp == 72) || (fogsTmp == 73)) {
  10.         //Fogs are On, but high beam is not
  11.         if (DID_TURN_ON_FOGS) {
  12.           Serial.println(F("Turning OFF Fogs"));
  13.           delay(FOGS_SEND_DELAY);
  14.           DID_TURN_ON_FOGS = false;
  15.           TURNED_FOGS_OFF = true;
  16.           turn_Off_On_Fogs();
  17.         }
  18.       } else if (fogsTmp == 104) {
  19.         // High beam + Fogs on
  20.         if ((TURNED_FOGS_OFF) && (!DID_TURN_ON_FOGS)) {
  21.            TURNED_FOGS_OFF=false;
  22.            DID_TURN_ON_FOGS=true;
  23.         }
  24.         Serial.println(F("High beam and Fogs on..."));
  25.       }
  26.     }
  27.     break;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top