Format after PR

Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
This commit is contained in:
Sara Damiano
2021-11-24 10:34:29 -05:00
parent 132844d1e1
commit cce063cf88

View File

@@ -449,14 +449,14 @@ class TinyGsmSim800 : public TinyGsmModem<TinyGsmSim800>,
* Audio functions * Audio functions
*/ */
public: public:
bool setVolume(uint8_t volume = 50){ bool setVolume(uint8_t volume = 50) {
//Set speaker volume // Set speaker volume
sendAT(GF("+CLVL="), volume); sendAT(GF("+CLVL="), volume);
return waitResponse() == 1; return waitResponse() == 1;
} }
uint8_t getVolume(){ uint8_t getVolume() {
//Get speaker volume // Get speaker volume
sendAT(GF("+CLVL?")); sendAT(GF("+CLVL?"));
if (waitResponse(GF(GSM_NL)) != 1) { return 0; } if (waitResponse(GF(GSM_NL)) != 1) { return 0; }
String res = stream.readStringUntil('\n'); String res = stream.readStringUntil('\n');
@@ -466,25 +466,24 @@ class TinyGsmSim800 : public TinyGsmModem<TinyGsmSim800>,
return res.toInt(); return res.toInt();
} }
bool setMicVolume(uint8_t channel, uint8_t level){ bool setMicVolume(uint8_t channel, uint8_t level) {
if(channel > 4){ if (channel > 4) { return 0; }
return 0;
}
sendAT(GF("+CMIC="), level); sendAT(GF("+CMIC="), level);
return waitResponse() == 1; return waitResponse() == 1;
} }
bool setAudioChannel(uint8_t channel){ bool setAudioChannel(uint8_t channel) {
sendAT(GF("+CHFA="), channel); sendAT(GF("+CHFA="), channel);
return waitResponse() == 1; return waitResponse() == 1;
} }
bool playToolkitTone(uint8_t tone, uint32_t duration){ bool playToolkitTone(uint8_t tone, uint32_t duration) {
sendAT(GF("STTONE="), 1, tone); sendAT(GF("STTONE="), 1, tone);
delay(duration); delay(duration);
sendAT(GF("STTONE="), 0); sendAT(GF("STTONE="), 0);
return waitResponse(); return waitResponse();
} }
/* /*
* Time functions * Time functions
*/ */