Code cleanup a bit

This commit is contained in:
Łukasz Nidecki 2021-02-13 18:15:02 +01:00
parent 6bb59dafc7
commit f759805b04
1 changed files with 56 additions and 58 deletions

View File

@ -231,6 +231,7 @@ void recalcGPS(){
outString += String(BattVolts, 2);
outString += ("V");
#endif
#ifdef KISS_PROTOCOL
Serial.print(encode_kiss(outString));
#ifdef ENABLE_BLUETOOTH
@ -238,7 +239,6 @@ void recalcGPS(){
SerialBT.print(encode_kiss(outString));
}
#endif
#else
Serial.println(outString);
#endif
@ -330,7 +330,6 @@ void setup(){
#ifdef T_BEAM_V1_0
if (!axp.begin(Wire, AXP192_SLAVE_ADDRESS)) {
}
axp.setPowerOutPut(AXP192_LDO2, AXP202_ON);
axp.setPowerOutPut(AXP192_LDO3, AXP202_ON); // switch on GPS
axp.setPowerOutPut(AXP192_DCDC2, AXP202_ON);
@ -340,6 +339,7 @@ void setup(){
axp.adc1Enable(0xfe, true);
axp.adc2Enable(0x80, true);
#endif
if(!display.begin(SSD1306_SWITCHCAPVCC, SSD1306_ADDRESS)) {
for(;;); // Don't proceed, loop forever
}
@ -539,7 +539,6 @@ void loop() {
#ifdef ENABLE_BLUETOOTH
SerialBT.print(encapsulateKISS(debug_message, CMD_HARDWARE));
#endif
}
#endif
#endif
@ -552,7 +551,6 @@ void handleKISSData(char character) {
writedisplaytext("(KISSTX))","","","","","",1);
#ifdef KISS_PROTOCOL
const String &TNC2DataFrame = decode_kiss(inTNCData);
Serial.print(inTNCData);
#ifdef ENABLE_BLUETOOTH
if (SerialBT.connected()) {