Skip to content

Commit 06075fc

Browse files
committed
Whitespace
1 parent 534dc6b commit 06075fc

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

Firmware/RTK_Everywhere/AuthCoPro.ino

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ const char *hardwareVersion = "1.0.0";
55
const char *EAProtocol = "com.sparkfun.rtk";
66
const char *BTTransportName = "com.sparkfun.bt";
77
const char *LIComponentName = "com.sparkfun.li";
8-
const char *productPlanUID = "0123456789ABCDEF"; // This comes from the MFi Portal, when you register the product with Apple
8+
const char *productPlanUID =
9+
"0123456789ABCDEF"; // This comes from the MFi Portal, when you register the product with Apple
910

1011
extern BTSerialInterface *bluetoothSerialSpp;
1112

@@ -28,7 +29,7 @@ void beginAuthCoPro(TwoWire *i2cBus)
2829

2930
appleAccessory->usePSRAM(online.psram);
3031

31-
if(!appleAccessory->begin(*i2cBus))
32+
if (!appleAccessory->begin(*i2cBus))
3233
{
3334
systemPrintln("Could not initialize the authentication coprocessor");
3435
return;
@@ -64,14 +65,16 @@ void beginAuthCoPro(TwoWire *i2cBus)
6465
systemPrintln("Authentication coprocessor online");
6566
}
6667

67-
static char *bda2str(esp_bd_addr_t bda, char *str, size_t size) {
68-
if (bda == NULL || str == NULL || size < 18) {
69-
return NULL;
70-
}
68+
static char *bda2str(esp_bd_addr_t bda, char *str, size_t size)
69+
{
70+
if (bda == NULL || str == NULL || size < 18)
71+
{
72+
return NULL;
73+
}
7174

72-
uint8_t *p = bda;
73-
snprintf(str, size, "%02x:%02x:%02x:%02x:%02x:%02x", p[0], p[1], p[2], p[3], p[4], p[5]);
74-
return str;
75+
uint8_t *p = bda;
76+
snprintf(str, size, "%02x:%02x:%02x:%02x:%02x:%02x", p[0], p[1], p[2], p[3], p[4], p[5]);
77+
return str;
7578
}
7679

7780
void updateAuthCoPro()
@@ -88,8 +91,10 @@ void updateAuthCoPro()
8891
// Check for a new device connection
8992
if (bluetoothSerialSpp->aclConnected() == true)
9093
{
91-
// // https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/DiscoverConnect/DiscoverConnect.ino
92-
// std::map<int, std::string> channels = bluetoothSerialSpp->getChannels(bluetoothSerialSpp->aclGetAddress());
94+
// //
95+
// https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/DiscoverConnect/DiscoverConnect.ino
96+
// std::map<int, std::string> channels =
97+
// bluetoothSerialSpp->getChannels(bluetoothSerialSpp->aclGetAddress());
9398

9499
// int channel = 0; // Channel 0 for auto-detect
95100
// if (channels.size() > 0)
@@ -100,8 +105,7 @@ void updateAuthCoPro()
100105
char bda_str[18];
101106
bda2str(bluetoothSerialSpp->aclGetAddress(), bda_str, 18);
102107

103-
systemPrintf("Apple Device %s found, connecting on channel %d\r\n",
104-
bda_str, channel);
108+
systemPrintf("Apple Device %s found, connecting on channel %d\r\n", bda_str, channel);
105109

106110
bluetoothSerialSpp->connect(bluetoothSerialSpp->aclGetAddress(), channel);
107111

0 commit comments

Comments
 (0)