@@ -55,7 +55,12 @@ void beginAuthCoPro(TwoWire *i2cBus)
55
55
latestGPGGA = (char *)rtkMalloc (latestNmeaMaxLen, " AuthCoPro" );
56
56
latestGPRMC = (char *)rtkMalloc (latestNmeaMaxLen, " AuthCoPro" );
57
57
latestGPGST = (char *)rtkMalloc (latestNmeaMaxLen, " AuthCoPro" );
58
- appleAccessory->setNMEApointers (latestGPGGA, latestGPRMC, latestGPGST);
58
+ latestGPVTG = (char *)rtkMalloc (latestNmeaMaxLen, " AuthCoPro" );
59
+ appleAccessory->setNMEApointers (latestGPGGA, latestGPRMC, latestGPGST, latestGPVTG);
60
+
61
+ // Pass the pointer for additional GSA / GSV EA Session data
62
+ latestEASessionData = (char *)rtkMalloc (latestEASessionDataMaxLen, " AuthCoPro" );
63
+ appleAccessory->setEASessionPointer (latestEASessionData);
59
64
60
65
// Pass the transport connected and disconnect methods into the accessory driver
61
66
appleAccessory->setTransportConnectedMethod (&transportConnected);
@@ -89,7 +94,9 @@ void updateAuthCoPro()
89
94
appleAccessory->update (); // Update the Accessory driver
90
95
91
96
// Check for a new device connection
92
- if (bluetoothSerialSpp->aclConnected () == true && bluetoothSerialSpp->connected () == false )
97
+ // Note: aclConnected is a one-shot
98
+ // The internal flag is automatically cleared when aclConnected returns true
99
+ if (bluetoothSerialSpp->aclConnected () == true )
93
100
{
94
101
// //
95
102
// https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/DiscoverConnect/DiscoverConnect.ino
0 commit comments