service print fix

This commit is contained in:
leo 2023-06-26 17:33:50 +02:00
parent a15c1ca68e
commit 01063a014c
Signed by: leo
GPG Key ID: 0DD993BFB2B307DB

5
BLEh.c
View File

@ -280,7 +280,8 @@ void print_char(struct ble_gatt_chr_def chr){
void print_service(struct ble_gatt_svc_def* svcs){
int svc_id = 0;
struct ble_gatt_svc_def svc = svcs[svc_id];
for(svc_id = 0; svc.uuid != NULL; svc_id++){
for(svc_id = 0; svcs[svc_id].uuid != NULL; svc_id++){
svc = svcs[svc_id];
ESP_LOGI(TAG, "svc %d", svc_id);
struct ble_gatt_chr_def chr = svc.characteristics[0];
int ind = 0;
@ -291,8 +292,6 @@ void print_service(struct ble_gatt_svc_def* svcs){
ind++;
chr = svc.characteristics[ind];
}
svc = svcs[svc_id];
}
}