diff --git a/main/include/temp.h b/main/include/temp.h index 56fd21c..cc609da 100644 --- a/main/include/temp.h +++ b/main/include/temp.h @@ -9,7 +9,7 @@ #define HEART_RATE_TASK_PERIOD (1000 / portTICK_PERIOD_MS) /* Public function declarations */ -uint8_t get_heart_rate(void); -void update_heart_rate(void); +uint8_t get_temp(void); +void update_temp(void); #endif // HEART_RATE_H diff --git a/main/main.c b/main/main.c index bb98461..9ef920b 100644 --- a/main/main.c +++ b/main/main.c @@ -59,8 +59,8 @@ static void heart_rate_task(void *param) { /* Loop forever */ while (1) { /* Update heart rate value every 1 second */ - update_heart_rate(); - ESP_LOGI(TAG, "heart rate updated to %d", get_heart_rate()); + update_temp(); + ESP_LOGI(TAG, "heart rate updated to %d", get_temp()); /* Send heart rate indication if enabled */ send_heart_rate_indication(); diff --git a/main/src/gatt_svc.c b/main/src/gatt_svc.c index f31bd00..bca977d 100644 --- a/main/src/gatt_svc.c +++ b/main/src/gatt_svc.c @@ -87,7 +87,7 @@ static int heart_rate_chr_access(uint16_t conn_handle, uint16_t attr_handle, /* Verify attribute handle */ if (attr_handle == heart_rate_chr_val_handle) { /* Update access buffer value */ - heart_rate_chr_val[1] = get_heart_rate(); + heart_rate_chr_val[1] = get_temp(); rc = os_mbuf_append(ctxt->om, &heart_rate_chr_val, sizeof(heart_rate_chr_val)); return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES; diff --git a/main/src/temp.c b/main/src/temp.c index 6ebf7fd..f9219c5 100644 --- a/main/src/temp.c +++ b/main/src/temp.c @@ -6,6 +6,6 @@ static uint8_t heart_rate; /* Public functions */ -uint8_t get_heart_rate(void) { return heart_rate; } +uint8_t get_temp(void) { return heart_rate; } -void update_heart_rate(void) { heart_rate = 60 + (uint8_t)(esp_random() % 21); } +void update_temp(void) { heart_rate = 60 + (uint8_t)(esp_random() % 21); }