Skip to content

Commit

Permalink
Fixed bug reported by OskyBear
Browse files Browse the repository at this point in the history
the readings from ESP32Encoder are of type int64_t so the correct sprintf token for them is "%lld"
  • Loading branch information
vlaate authored Jun 9, 2021
1 parent 174bbbf commit 8375212
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DobsonianDSC/DobsonianDSC.ino
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ void attendTcpRequests() // handle connections from SkySafari and similar softw
switch (character)
{
case 'Q': // the Query command, sent by SkySafari and others as the "Basic Encoder protocol" to query for encoder values.
sprintf(response, "%i\t%i\t\n", AZencoder.getCount(), ALTencoder.getCount());
sprintf(response, "%lld\t%lld\t\n", AZencoder.getCount(), ALTencoder.getCount());
serverClients[i].println(response);
break;
case 'H': // 'H' - request for encoder resolution, e.g. 10000-10000\n
Expand Down Expand Up @@ -291,7 +291,7 @@ void attendBTRequests() // handle connections from SkySafari and similar softw
switch (character)
{
case 'Q': // the Query command, sent by SkySafari and others as the "Basic Encoder protocol" to query for encoder values.
sprintf(response, "%05i\t%05i\t\n", AZencoder.getCount(), ALTencoder.getCount());
sprintf(response, "%lld\t%lld\t\n", AZencoder.getCount(), ALTencoder.getCount());
Serial.print(response);
SerialBT.println(response);
break;
Expand Down

0 comments on commit 8375212

Please sign in to comment.