Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case MSG_LIGHT_STATUS: {
- int fogsTmp = buf[MSG_LIGHT_STATUS_BYTE];
- Serial.print(F("JT: ")); Serial.println(fogsTmp);
- if ((fogsTmp == 40) || (fogsTmp == 41)) {
- //High Beam On
- Serial.println(F("Turning ON Fogs"));
- DID_TURN_ON_FOGS = true;
- turn_Off_On_Fogs();
- } else if ((fogsTmp == 72) || (fogsTmp == 73)) {
- //Fogs are On, but high beam is not
- if (DID_TURN_ON_FOGS) {
- Serial.println(F("Turning OFF Fogs"));
- delay(FOGS_SEND_DELAY);
- DID_TURN_ON_FOGS = false;
- TURNED_FOGS_OFF = true;
- turn_Off_On_Fogs();
- }
- } else if (fogsTmp == 104) {
- // High beam + Fogs on
- if ((TURNED_FOGS_OFF) && (!DID_TURN_ON_FOGS)) {
- TURNED_FOGS_OFF=false;
- DID_TURN_ON_FOGS=true;
- }
- Serial.println(F("High beam and Fogs on..."));
- }
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement