Skip to content

Commit

Permalink
Run astyle
Browse files Browse the repository at this point in the history
  • Loading branch information
skorokithakis committed Sep 30, 2018
1 parent 6388bee commit c51ace4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions A6lib.cpp
Expand Up @@ -3,9 +3,9 @@
#include "A6lib.h"

#ifdef ESP8266
#define min _min
#define max _max
#endif
#define min _min
#define max _max
#endif

/////////////////////////////////////////////
// Public methods.
Expand Down Expand Up @@ -323,7 +323,7 @@ byte A6lib::deleteSMS(int index) {
// Delete SMS with special flags; example 1,4 delete all SMS from the storage area
byte A6lib::deleteSMS(int index, int flag) {
char buffer[20];
String command = "AT+CMGD=";
String command = "AT+CMGD=";
command += String(index);
command += ",";
command += String(flag);
Expand All @@ -345,7 +345,7 @@ void A6lib::setVol(byte level) {
char buffer[30];

// level should be between 5 and 8.
level = min(max(level, 5), 8);
level = min(max(level, 5), 8);
sprintf(buffer, "AT+CLVL=%d", level);
A6command(buffer, "OK", "yy", A6_CMD_TIMEOUT, 2, NULL);
}
Expand All @@ -357,7 +357,7 @@ void A6lib::enableSpeaker(byte enable) {
char buffer[30];

// enable should be between 0 and 1.
enable = min(max(enable, 0), 1);
enable = min(max(enable, 0), 1);
sprintf(buffer, "AT+SNFS=%d", enable);
A6command(buffer, "OK", "yy", A6_CMD_TIMEOUT, 2, NULL);
}
Expand Down Expand Up @@ -476,9 +476,9 @@ byte A6lib::A6waitFor(const char *resp1, const char *resp2, int timeout, String
byte retVal = 99;
do {
reply += read();
#ifdef ESP8266
yield();
#endif
#ifdef ESP8266
yield();
#endif
} while (((reply.indexOf(resp1) + reply.indexOf(resp2)) == -2) && ((millis() - entry) < timeout));

if (reply != "") {
Expand Down
2 changes: 1 addition & 1 deletion A6lib.h
Expand Up @@ -92,7 +92,7 @@ class A6lib {
int getSMSLocsOfType(int* buf, int maxItems, String type);
SMSmessage readSMS(int index);
byte deleteSMS(int index);
byte deleteSMS(int index, int flag);
byte deleteSMS(int index, int flag);
byte setSMScharset(String charset);

void setVol(byte level);
Expand Down

0 comments on commit c51ace4

Please sign in to comment.