Skip to content

Commit

Permalink
Fixed a "been there forever" bug in ATH. Not fatal, but annoying.
Browse files Browse the repository at this point in the history
  • Loading branch information
mecparts committed Oct 17, 2022
1 parent 8b63a2b commit 4592062
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
5 changes: 4 additions & 1 deletion RetroWiFiModem/RetroWiFiModem.ino
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ void doAtCmds(char *atCmd) {
} else if( !strncasecmp(atCmd, "DS", 2) && len == 3 ) {
// speed dial a number
atCmd = speedDialNumber(atCmd + 2);
} else if( !strncasecmp(atCmd, "H", 1) || !strncasecmp(atCmd, "H0", 2) ) {
} else if( !strncasecmp(atCmd, "H0", 2) ) {
// hang up call
atCmd = hangup(atCmd + 2);
} else if( !strncasecmp(atCmd, "H", 1) && !isDigit(atCmd[1]) ) {
// hang up call
atCmd = hangup(atCmd + 1);
} else if( !strncasecmp(atCmd, "&Z", 2) && isDigit(atCmd[2]) ) {
Expand Down
3 changes: 0 additions & 3 deletions RetroWiFiModem/at_basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,6 @@ char *httpGet(char *atCmd) {
// ATH go offline (if connected to a host)
//
char *hangup(char *atCmd) {
if( atCmd[0] ) {
++atCmd;
}
if( tcpClient.connected() ) {
endCall();
} else {
Expand Down
8 changes: 4 additions & 4 deletions RetroWiFiModem/support.h
Original file line number Diff line number Diff line change
Expand Up @@ -504,17 +504,17 @@ SerialConfig getSerialConfig(void) {
uint8_t serialConfig = 0;
switch( settings.dataBits ) {
case 5:
serialConfig = serialConfig = UART_NB_BIT_5 | (~UART_NB_BIT_MASK & serialConfig);
serialConfig = UART_NB_BIT_5 | (~UART_NB_BIT_MASK & serialConfig);
break;
case 6:
serialConfig = serialConfig = UART_NB_BIT_6 | (~UART_NB_BIT_MASK & serialConfig);
serialConfig = UART_NB_BIT_6 | (~UART_NB_BIT_MASK & serialConfig);
break;
case 7:
serialConfig = serialConfig = UART_NB_BIT_7 | (~UART_NB_BIT_MASK & serialConfig);
serialConfig = UART_NB_BIT_7 | (~UART_NB_BIT_MASK & serialConfig);
break;
case 8:
default:
serialConfig = serialConfig = UART_NB_BIT_8 | (~UART_NB_BIT_MASK & serialConfig);
serialConfig = UART_NB_BIT_8 | (~UART_NB_BIT_MASK & serialConfig);
break;
}
switch( settings.parity ) {
Expand Down
Binary file modified bin/RetroWiFiModem.d1r2_or_d1mini.bin
Binary file not shown.

0 comments on commit 4592062

Please sign in to comment.