v1.6.991
This commit is contained in:
1 parent
664d58bb4f
commit
e733dba9f4
12 files changed
+102
-21
No files matched your search
@@ -50,6 +50,11 @@ function Decoder(bytes, port) {
|
||||
return decode(bytes, [float, uint16, ufloat, ufloat], ['temperature', 'pressure', 'humidity', 'air']);
|
||||
}
|
||||
|
||||
if (port === 8) {
|
||||
// battery voltage
|
||||
return decode(bytes, [uint16], ['voltage']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -18,9 +18,9 @@
|
||||
#define HAS_BUTTON (0) // button "PROG" on board
|
||||
|
||||
// Pins for I2C interface of OLED Display
|
||||
#define OLED_SDA (4)
|
||||
#define OLED_SCL (15)
|
||||
#define OLED_RST (16)
|
||||
#define MY_OLED_SDA (4)
|
||||
#define MY_OLED_SCL (15)
|
||||
#define MY_OLED_RST (16)
|
||||
|
||||
// Pins for LORA chip SPI interface come from board file, we need some
|
||||
// additional definitions for LMIC
|
||||
|
||||
@@ -222,13 +222,6 @@ void onEvent(ev_t ev) {
|
||||
: PSTR("TX_COMPLETE"));
|
||||
sprintf(display_line6, " "); // clear previous lmic status
|
||||
|
||||
// if (LMIC.dataLen) {
|
||||
// ESP_LOGI(TAG, "Received %d bytes of payload, RSSI %d SNR %d",
|
||||
// LMIC.dataLen, (signed char)LMIC.rssi, (signed
|
||||
// char)LMIC.snr);
|
||||
// sprintf(display_line6, "RSSI %d SNR %d", (signed char)LMIC.rssi,
|
||||
// (signed char)LMIC.snr);
|
||||
|
||||
if (LMIC.dataLen) {
|
||||
ESP_LOGI(TAG, "Received %d bytes of payload, RSSI -%d SNR %d",
|
||||
LMIC.dataLen, LMIC.rssi, LMIC.snr / 4);
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@ void setup() {
|
||||
(chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded"
|
||||
: "external");
|
||||
ESP_LOGI(TAG, "ESP32 SDK: %s", ESP.getSdkVersion());
|
||||
ESP_LOGI(TAG, "Wifi/BT software coexist version: %s", coex_version_get());
|
||||
ESP_LOGI(TAG, "Wifi/BT software coexist version: %s", esp_coex_version_get());
|
||||
ESP_LOGI(TAG, "Free RAM: %d bytes", ESP.getFreeHeap());
|
||||
|
||||
#ifdef HAS_GPS
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
|
||||
// Set this to include BLE counting and vendor filter functions
|
||||
#define VENDORFILTER 1 // comment out if you want to count things, not people
|
||||
//#define BLECOUNTER 1 // activate if you want BLE count, at expense of power & memory
|
||||
#define BLECOUNTER 1 // activate if you want to use BLE count, at expense of memory
|
||||
|
||||
// BLE scan parameters
|
||||
#define BLESCANTIME 0 // [seconds] scan duration, 0 means infinite [default], see note below
|
||||
|
||||
@@ -31,6 +31,8 @@ uint8_t sensor_mask(uint8_t sensor_no) {
|
||||
return (uint8_t)MEMS_DATA;
|
||||
case 7:
|
||||
return (uint8_t)ALARM_DATA;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -87,8 +87,7 @@ void spi_slave_task(void *param) {
|
||||
// wait until spi master clocks out the data, and read results in rx buffer
|
||||
ESP_LOGI(TAG, "Prepared SPI transaction for %zu byte(s)", transaction_size);
|
||||
ESP_LOG_BUFFER_HEXDUMP(TAG, txbuf, transaction_size, ESP_LOG_DEBUG);
|
||||
esp_err_t ret =
|
||||
spi_slave_transmit(HSPI_HOST, &spi_transaction, portMAX_DELAY);
|
||||
ESP_ERROR_CHECK_WITHOUT_ABORT(spi_slave_transmit(HSPI_HOST, &spi_transaction, portMAX_DELAY));
|
||||
ESP_LOG_BUFFER_HEXDUMP(TAG, rxbuf, transaction_size, ESP_LOG_DEBUG);
|
||||
ESP_LOGI(TAG, "Transaction finished with size %zu bits",
|
||||
spi_transaction.trans_len);
|
||||
|
||||
+5
-2
@@ -2,6 +2,7 @@
|
||||
#include "globals.h"
|
||||
#include "wifiscan.h"
|
||||
#include <esp_coexist.h>
|
||||
#include "coexist_internal.h"
|
||||
|
||||
// Local logging tag
|
||||
static const char TAG[] = "wifi";
|
||||
@@ -50,8 +51,10 @@ void wifi_sniffer_init(void) {
|
||||
// .filter_mask = WIFI_PROMIS_FILTER_MASK_MGMT}; // only MGMT frames
|
||||
.filter_mask = WIFI_PROMIS_FILTER_MASK_ALL}; // we use all frames
|
||||
|
||||
ESP_ERROR_CHECK(
|
||||
esp_coex_preference_set((esp_coex_prefer_t) ESP_COEX_PREFER_WIFI)); // configure Wifi/BT coexist lib
|
||||
ESP_ERROR_CHECK(esp_coex_preference_set(
|
||||
ESP_COEX_PREFER_BALANCE)); // configure Wifi/BT coexist lib
|
||||
|
||||
coex_deinit();
|
||||
|
||||
ESP_ERROR_CHECK(esp_wifi_init(&cfg)); // configure Wifi with cfg
|
||||
ESP_ERROR_CHECK(
|
||||
|
||||
Reference in new issue
Block a user