Giter Site home page Giter Site logo

ic705-bt-civ's People

Contributors

ok1cdj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

tatonka21 f6hic

ic705-bt-civ's Issues

Function "readLine()" & readtimeout

Hi,
some issues with function "readLine()":

  • "readLine()" contains a while loop which can be left when variable "ed" is reduced to zero. Problem is, that ed is initially set to the value of 'readtimeout', but readtimeout is not set all the time and initially zero.
  • if during this (long) while loop the bluetooth connnection is lost, the while loop will not be informed and continues to run.

To overcome this, something like the following change might help:

uint8_t readLine(void)
{
uint8_t byte;
uint8_t counter = 0;
uint32_t ed = readtimeout; // not really needed here, if not initialized with a proper value

while (btConnected) // without a BT connection don't try to read from the BT serial line
{
while (!SerialBT.available()) {
if (--ed == 0 || !btConnected ) return 0; // leave the loop if BT connection is lost
}
ed = readtimeout;
byte = SerialBT.read();
if (byte == 0xFF) continue; //TODO skip to start byte instead
...

Just an idea, code not tested so far.

Regards,
Peter

Reconnecting after switching the ESP32 on?

First of all, thanks for the code.
Not an issue, but just a question: I observed, that the 705 does not reconnect automatically, when I switched the esp32 off and on again. (setting "auotconnect" on 705 is "on"). The 705 will only reconnect in that case, when I switch the 705 off and on or if I manually connect within the bluetooth settings. So, is this the general behavior or a bug of the 705?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.