Skip to content

Commit 721e4c2

Browse files
authored
fix issue of Celestron SCT focuser for aarch64 (#2259)
1 parent 0619ab4 commit 721e4c2

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

drivers/focuser/celestron.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,10 @@ bool CelestronSCT::initProperties()
114114
// Add debugging support
115115
addDebugControl();
116116

117-
// Set default baud rate to 19200
118-
serialConnection->setDefaultBaudRate(Connection::Serial::B_19200);
117+
// Set default baud rate to 9600
118+
// On aarch64 19200 or more seems to crash the whole USB hub.
119+
// stty -a says the baud rate is 9600
120+
serialConnection->setDefaultBaudRate(Connection::Serial::B_9600);
119121

120122
communicator.setDeviceName(getDeviceName());
121123

drivers/focuser/celestronauxpacket.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ char * toHexStr(buffer data)
4343
sz = 100;
4444
for (int i = 0; i < sz; i++)
4545
{
46-
snprintf(&debugStr[i * 3], 301, "%02X ", data[i]);
46+
snprintf(&debugStr[i * 3], 301 - 3*i, "%02X ", data[i]);
4747
}
4848
return debugStr;
4949
}

0 commit comments

Comments
 (0)