diff options
author | dakkar <dakkar@thenautilus.net> | 2018-04-20 15:51:25 +0100 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2018-04-20 15:51:25 +0100 |
commit | 04340552b4882448c1f2028c04a74638a68b7294 (patch) | |
tree | db790544960b595a7b7cf90db14779363181bfe9 /sensor/thermostat.ino | |
parent | more power, more reliability (diff) | |
download | thermostat-04340552b4882448c1f2028c04a74638a68b7294.tar.gz thermostat-04340552b4882448c1f2028c04a74638a68b7294.tar.bz2 thermostat-04340552b4882448c1f2028c04a74638a68b7294.zip |
factor power settings
Diffstat (limited to 'sensor/thermostat.ino')
-rw-r--r-- | sensor/thermostat.ino | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sensor/thermostat.ino b/sensor/thermostat.ino index 7eb6683..2416caa 100644 --- a/sensor/thermostat.ino +++ b/sensor/thermostat.ino @@ -16,6 +16,9 @@ static BLEUUID thermo_time_uuid("11111111-2222-3333-4444-000000000002"); /* Conversion factor for micro seconds to seconds */ #define uS_TO_S_FACTOR 1000000 +#define BLE_POWER ESP_PWR_LVL_P7 +// #define BLE_POWER ESP_PWR_LVL_N14 + SSD1306 display(0x3c, 5, 4); DHTesp dht; @@ -124,9 +127,9 @@ void setup() { display.init(); display.connect(); BLEDevice::init(""); - esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_ADV, ESP_PWR_LVL_P7); - esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_SCAN, ESP_PWR_LVL_P7); - esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_DEFAULT, ESP_PWR_LVL_P7); + esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_ADV, BLE_POWER); + esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_SCAN, BLE_POWER); + esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_DEFAULT, BLE_POWER); } void watchdog_cb() { |