Skip to content

Commit bed631c

Browse files
V1.7.25 - Updates
- Fixes to Wifi code to fix SkySafari connectivity
1 parent 77e8381 commit bed631c

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Software/Arduino code/OpenAstroTracker/OpenAstroTracker.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include "Globals.hpp"
2020

21-
String version = "V1.7.24";
21+
String version = "V1.7.25";
2222

2323
///////////////////////////////////////////////////////////////////////////
2424
// Please see the Globals.h file for configuration of the firmware.

Software/Arduino code/OpenAstroTracker/WifiControl.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,24 +134,29 @@ void WifiControl::infraToAPFailover() {
134134

135135
void WifiControl::tcpLoop() {
136136
if (client && client.connected()) {
137-
unsigned char buffer[2];
138137
while (client.available()) {
138+
LOGV2(DEBUG_WIFI,"WifiTCP: Available bytes %d. Peeking.", client.available());
139+
139140
// Peek first byte and check for ACK (0x06) handshake
140-
client.read(buffer, 1);
141-
if (buffer[0] == 0x06) {
141+
LOGV2(DEBUG_WIFI,"WifiTCP: First byte is %x", client.peek());
142+
if (client.peek() == 0x06) {
143+
client.read();
142144
LOGV1(DEBUG_WIFI,"WifiTCP: Query <-- Handshake request");
143145
client.write("1");
144146
LOGV1(DEBUG_WIFI,"WifiTCP: Reply --> 1");
145147
}
146148
else {
147-
String cmd = String(buffer[0]) + client.readStringUntil('#');
149+
String cmd = client.readStringUntil('#');
148150
LOGV2(DEBUG_WIFI,"WifiTCP: Query <-- %s#", cmd.c_str());
149151
String retVal = _cmdProcessor->processCommand(cmd);
150152

151153
if (retVal != "") {
152154
client.write(retVal.c_str());
153155
LOGV2(DEBUG_WIFI,"WifiTCP: Reply --> %s", retVal.c_str());
154156
}
157+
else{
158+
LOGV1(DEBUG_WIFI,"WifiTCP: No Reply");
159+
}
155160
}
156161

157162
_mount->loop();

0 commit comments

Comments
 (0)