Skip to content

Commit

Permalink
code cleaning for(
Browse files Browse the repository at this point in the history
  • Loading branch information
richonguzman committed Dec 19, 2024
1 parent f4c52d8 commit 724dc2b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lib/APRSPacketLib/APRSPacketLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ namespace APRSPacketLib {
int d28 = (int)informationField[0] - 28;
if (offset) d28 += 100;
temp = String(d28);
for(int i = temp.length(); i < 3; i++) {
for (int i = temp.length(); i < 3; i++) {
temp = '0' + temp;
}
String longitudeString = temp;
Expand Down
2 changes: 1 addition & 1 deletion src/ble_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ namespace BLE_Utils {
delay(200);
}
} else { // TNC2
for(int n = 0; n < frame.length(); n++) txBLE(frame[n]);
for (int n = 0; n < frame.length(); n++) txBLE(frame[n]);
txBLE('\n');
}
}
Expand Down
14 changes: 7 additions & 7 deletions src/menu_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ namespace MENU_Utils {
topHeader2 += " ";
topHeader2 += String(gps.location.lng(), 4);

for(int i = topHeader2.length(); i < 19; i++) {
for (int i = topHeader2.length(); i < 19; i++) {
topHeader2 += " ";
}
if (gps.satellites.value() <= 9) topHeader2 += " ";
Expand Down Expand Up @@ -326,13 +326,13 @@ namespace MENU_Utils {
case 300: //3.Stations ---> Packet Decoder
if (lastReceivedPacket.sender != currentBeacon->callsign) {
firstLineDecoder = lastReceivedPacket.sender;
for(int i = firstLineDecoder.length(); i < 9; i++) {
for (int i = firstLineDecoder.length(); i < 9; i++) {
firstLineDecoder += ' ';
}
firstLineDecoder += lastReceivedPacket.symbol;
if (lastReceivedPacket.type == 0 || lastReceivedPacket.type == 4) { // gps and Mic-E gps
courseSpeedAltitude = String(lastReceivedPacket.altitude);
for(int j = courseSpeedAltitude.length(); j < 4; j++) {
for (int j = courseSpeedAltitude.length(); j < 4; j++) {
courseSpeedAltitude = '0' + courseSpeedAltitude;
}
courseSpeedAltitude = "A=" + courseSpeedAltitude + "m ";
Expand All @@ -341,11 +341,11 @@ namespace MENU_Utils {
speedPacketDec = ' ' + speedPacketDec;
}
courseSpeedAltitude += speedPacketDec + "km/h ";
for(int l = courseSpeedAltitude.length(); l < 17; l++) {
for (int l = courseSpeedAltitude.length(); l < 17; l++) {
courseSpeedAltitude += ' ';
}
coursePacketDec = String(lastReceivedPacket.course);
for(int m = coursePacketDec.length(); m < 3; m++) {
for (int m = coursePacketDec.length(); m < 3; m++) {
coursePacketDec = ' ' + coursePacketDec;
}
courseSpeedAltitude += coursePacketDec;
Expand Down Expand Up @@ -584,7 +584,7 @@ namespace MENU_Utils {
}
}

for(int i = thirdRowMainMenu.length(); i < 18; i++) {
for (int i = thirdRowMainMenu.length(); i < 18; i++) {
thirdRowMainMenu += " ";
}

Expand Down Expand Up @@ -619,7 +619,7 @@ namespace MENU_Utils {
fourthRowCourse = "---";
} else {
fourthRowCourse.trim();
for(int c = fourthRowCourse.length(); c < 3; c++) {
for (int c = fourthRowCourse.length(); c < 3; c++) {
fourthRowCourse = "0" + fourthRowCourse;
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ namespace Utils {
void i2cScannerForPeripherals() {
uint8_t err, addr;
if (Config.wxsensor.active) {
for(addr = 1; addr < 0x7F; addr++) {
for (addr = 1; addr < 0x7F; addr++) {
#ifdef HELTEC_V3_GPS
Wire1.beginTransmission(addr);
err = Wire1.endTransmission();
Expand All @@ -144,7 +144,7 @@ namespace Utils {
}
}

for(addr = 1; addr < 0x7F; addr++) {
for (addr = 1; addr < 0x7F; addr++) {
Wire.beginTransmission(addr);
err = Wire.endTransmission();
if (err == 0) {
Expand All @@ -160,7 +160,7 @@ namespace Utils {
}

#ifdef HAS_TOUCHSCREEN
for(addr = 1; addr < 0x7F; addr++) {
for (addr = 1; addr < 0x7F; addr++) {
Wire.beginTransmission(addr);
err = Wire.endTransmission();
if (err == 0) {
Expand Down

0 comments on commit 724dc2b

Please sign in to comment.