aboutsummaryrefslogtreecommitdiff
path: root/drivers/bluetooth/bluefruit_le.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth/bluefruit_le.cpp')
-rw-r--r--drivers/bluetooth/bluefruit_le.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/bluetooth/bluefruit_le.cpp b/drivers/bluetooth/bluefruit_le.cpp
index 218eca2195..5fdd104dcf 100644
--- a/drivers/bluetooth/bluefruit_le.cpp
+++ b/drivers/bluetooth/bluefruit_le.cpp
@@ -32,13 +32,8 @@
# define BLUEFRUIT_LE_SCK_DIVISOR 2 // 4MHz SCK/8MHz CPU, calculated for Feather 32U4 BLE
#endif
-#define SAMPLE_BATTERY
#define ConnectionUpdateInterval 1000 /* milliseconds */
-#ifndef BATTERY_LEVEL_PIN
-# define BATTERY_LEVEL_PIN B5
-#endif
-
static struct {
bool is_connected;
bool initialized;
@@ -48,10 +43,6 @@ static struct {
#define UsingEvents 2
bool event_flags;
-#ifdef SAMPLE_BATTERY
- uint16_t last_battery_update;
- uint32_t vbat;
-#endif
uint16_t last_connection_update;
} state;
@@ -549,14 +540,6 @@ void bluefruit_le_task(void) {
set_connected(atoi(resbuf));
}
}
-
-#ifdef SAMPLE_BATTERY
- if (timer_elapsed(state.last_battery_update) > BatteryUpdateInterval && resp_buf.empty()) {
- state.last_battery_update = timer_read();
-
- state.vbat = analogReadPin(BATTERY_LEVEL_PIN);
- }
-#endif
}
static bool process_queue_item(struct queue_item *item, uint16_t timeout) {
@@ -655,10 +638,6 @@ void bluefruit_le_send_mouse(report_mouse_t *report) {
}
}
-uint32_t bluefruit_le_read_battery_voltage(void) {
- return state.vbat;
-}
-
bool bluefruit_le_set_mode_leds(bool on) {
if (!state.configured) {
return false;