code sanitizations

This commit is contained in:
Verkehrsrot 2019-07-21 19:21:11 +02:00
parent bb7b8b90f8
commit 7057b59b0f
3 changed files with 19 additions and 18 deletions

View File

@ -162,6 +162,7 @@ IRAM_ATTR void gap_callback_handler(esp_gap_ble_cb_event_t event,
/* to be improved in vendorfilter if: /* to be improved in vendorfilter if:
// you can search for elements in the payload using the // you can search for elements in the payload using the
// function esp_ble_resolve_adv_data() // function esp_ble_resolve_adv_data()
// //
@ -238,7 +239,6 @@ void start_BLEscan(void) {
ESP_LOGI(TAG, "Initializing bluetooth scanner ..."); ESP_LOGI(TAG, "Initializing bluetooth scanner ...");
ESP_ERROR_CHECK(esp_coex_preference_set( ESP_ERROR_CHECK(esp_coex_preference_set(
(esp_coex_prefer_t)
ESP_COEX_PREFER_BALANCE)); // configure Wifi/BT coexist lib ESP_COEX_PREFER_BALANCE)); // configure Wifi/BT coexist lib
// Initialize BT controller to allocate task and other resource. // Initialize BT controller to allocate task and other resource.
@ -260,8 +260,8 @@ void stop_BLEscan(void) {
ESP_ERROR_CHECK(esp_bluedroid_disable()); ESP_ERROR_CHECK(esp_bluedroid_disable());
ESP_ERROR_CHECK(esp_bluedroid_deinit()); ESP_ERROR_CHECK(esp_bluedroid_deinit());
btStop(); // disable bt_controller btStop(); // disable bt_controller
ESP_ERROR_CHECK(esp_coex_preference_set(( ESP_ERROR_CHECK(esp_coex_preference_set(
esp_coex_prefer_t)ESP_COEX_PREFER_WIFI)); // configure Wifi/BT coexist lib ESP_COEX_PREFER_WIFI)); // configure Wifi/BT coexist lib
ESP_LOGI(TAG, "Bluetooth scanner stopped"); ESP_LOGI(TAG, "Bluetooth scanner stopped");
#endif // BLECOUNTER #endif // BLECOUNTER
} // stop_BLEscan } // stop_BLEscan

View File

@ -80,11 +80,12 @@ void IRAM_ATTR gps_storetime(gpsStatus_t &gps_store) {
if (gps.time.isUpdated() && gps.date.isValid() && (gps.time.age() < 1000)) { if (gps.time.isUpdated() && gps.date.isValid() && (gps.time.age() < 1000)) {
// nmea telegram serial delay compensation; not sure if we need this? // nmea telegram serial delay compensation; not sure if we need this?
/*
if (gps.time.age() > nmea_txDelay_ms) if (gps.time.age() > nmea_txDelay_ms)
gps_store.timedate.Second = gps.time.second() + 1; gps_store.timedate.Second = gps.time.second() + 1;
else else
gps_store.timedate.Second = gps.time.second(); gps_store.timedate.Second = gps.time.second();
*/
gps_store.timedate.Second = gps.time.second(); gps_store.timedate.Second = gps.time.second();
gps_store.timedate.Minute = gps.time.minute(); gps_store.timedate.Minute = gps.time.minute();

View File

@ -262,8 +262,8 @@ void setup() {
// remove bluetooth stack to gain more free memory // remove bluetooth stack to gain more free memory
btStop(); btStop();
ESP_ERROR_CHECK(esp_bt_mem_release(ESP_BT_MODE_BTDM)); ESP_ERROR_CHECK(esp_bt_mem_release(ESP_BT_MODE_BTDM));
ESP_ERROR_CHECK(esp_coex_preference_set(( ESP_ERROR_CHECK(esp_coex_preference_set(
esp_coex_prefer_t)ESP_COEX_PREFER_WIFI)); // configure Wifi/BT coexist lib ESP_COEX_PREFER_WIFI)); // configure Wifi/BT coexist lib
#endif #endif
// initialize gps // initialize gps