FatBeard / vbus-arduino-library

VBUS Decoder Library for Arduino
13 stars 13 forks source link

missing closing } in function #15

Closed FritsOV closed 3 years ago

FritsOV commented 3 years ago

Hello,

in function vBusRead()

the following code:

      if (Bufferlength < 20)
      {
        lastTimeTimer = millis();
        Bufferlength = 0;
      }
      else                                                       // <----- missing { 
             stop = true;
    }

Please correct cpp file.

FatBeard commented 3 years ago

Hi. I'm not sure it's requested. Its a one line statement after the if and it compiles. Are you seeing an issue?

FritsOV commented 3 years ago

Yes, i got a stackdump on my esp32. connecting to vbus/lan with an Resol MX. putting some serial prints in the code shows me that it looks like there is never a way out of the first while loop. in the vBusRead()

FatBeard commented 3 years ago

Cool. It's working for me on an arduino. But if you raise a pr I'll merge it.

FatBeard commented 3 years ago

Hi FritsOV, I've preliminarily ported this to esphome, see the newly attached new files in source if you're interested