@@ -55,7 +55,12 @@ void beginAuthCoPro(TwoWire *i2cBus)
5555 latestGPGGA = (char *)rtkMalloc (latestNmeaMaxLen, " AuthCoPro" );
5656 latestGPRMC = (char *)rtkMalloc (latestNmeaMaxLen, " AuthCoPro" );
5757 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);
5964
6065 // Pass the transport connected and disconnect methods into the accessory driver
6166 appleAccessory->setTransportConnectedMethod (&transportConnected);
@@ -89,7 +94,9 @@ void updateAuthCoPro()
8994 appleAccessory->update (); // Update the Accessory driver
9095
9196 // 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 )
93100 {
94101 // //
95102 // https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/DiscoverConnect/DiscoverConnect.ino
0 commit comments