Fix compilation with esp32p4 (#253)

This commit is contained in:
h2zero authored and GitHub committed 2024-12-03 08:47:41 -07:00
1 parent 6c85cfa6c3
commit b5b46661e0
6 files changed
+24 -21

No files matched your search

@@ -14,7 +14,7 @@ extern "C" void app_main(void);
#define SERVICE_UUID "ABCD"
#define CHARACTERISTIC_UUID "1234"
static NimBLEAdvertisedDevice* advDevice;
static const NimBLEAdvertisedDevice* advDevice;
static bool doConnect = false;
static uint32_t scanTime = 10 * 1000; // In milliseconds, 0 = scan forever
@@ -37,7 +37,7 @@ class ClientCallbacks : public NimBLEClientCallbacks {
/* Define a class to handle the callbacks when advertisements are received */
class scanCallbacks: public NimBLEScanCallbacks {
void onResult(NimBLEAdvertisedDevice* advertisedDevice) {
void onResult(const NimBLEAdvertisedDevice* advertisedDevice) {
printf("Advertised Device found: %s\n", advertisedDevice->toString().c_str());
if(advertisedDevice->isAdvertisingService(NimBLEUUID("ABCD")))
{
@@ -52,7 +52,7 @@ class scanCallbacks: public NimBLEScanCallbacks {
}
/** Callback to process the results of the completed scan or restart it */
void onScanEnd(NimBLEScanResults results) {
void onScanEnd(const NimBLEScanResults& results, int rc) {
printf("Scan Ended\n");
}
};