mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-27 18:43:36 +05:00
Compare commits
1 Commits
arduino_fr
...
8fa440810c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fa440810c |
7
.gitignore
vendored
7
.gitignore
vendored
@@ -2,12 +2,7 @@
|
|||||||
.vscode
|
.vscode
|
||||||
build/*
|
build/*
|
||||||
data/*
|
data/*
|
||||||
managed_components/*
|
|
||||||
node_modules/*
|
|
||||||
secrets.ini
|
secrets.ini
|
||||||
|
node_modules
|
||||||
package-lock.json
|
package-lock.json
|
||||||
*.lock
|
|
||||||
sdkconfig.*
|
|
||||||
CMakeLists.txt
|
|
||||||
!sdkconfig.defaults
|
|
||||||
!.gitkeep
|
!.gitkeep
|
||||||
@@ -287,26 +287,21 @@ build_flags =
|
|||||||
|
|
||||||
[env:esp32_c6]
|
[env:esp32_c6]
|
||||||
platform = ${esp32_defaults.platform}
|
platform = ${esp32_defaults.platform}
|
||||||
framework = arduino, espidf
|
|
||||||
platform_packages = ${esp32_defaults.platform_packages}
|
platform_packages = ${esp32_defaults.platform_packages}
|
||||||
board = esp32-c6-devkitm-1
|
board = esp32-c6-devkitm-1
|
||||||
board_build.partitions = ${esp32_defaults.board_build.partitions}
|
board_build.partitions = ${esp32_defaults.board_build.partitions}
|
||||||
lib_deps = ${esp32_defaults.lib_deps}
|
lib_deps =
|
||||||
lib_ignore =
|
${esp32_defaults.lib_deps}
|
||||||
${esp32_defaults.lib_ignore}
|
;${esp32_defaults.nimble_lib}
|
||||||
|
lib_ignore = ${esp32_defaults.lib_ignore}
|
||||||
extra_scripts = ${esp32_defaults.extra_scripts}
|
extra_scripts = ${esp32_defaults.extra_scripts}
|
||||||
build_unflags =
|
build_unflags =
|
||||||
-mtext-section-literals
|
-mtext-section-literals
|
||||||
build_type = ${esp32_defaults.build_type}
|
build_type = ${esp32_defaults.build_type}
|
||||||
build_flags =
|
build_flags =
|
||||||
${esp32_defaults.build_flags}
|
${esp32_defaults.build_flags}
|
||||||
-D USE_BLE=1
|
; Currently the NimBLE library is incompatible with ESP32 C6
|
||||||
-D DEFAULT_OT_IN_GPIO=15
|
;-D USE_BLE=1
|
||||||
-D DEFAULT_OT_OUT_GPIO=23
|
|
||||||
-D DEFAULT_SENSOR_OUTDOOR_GPIO=0
|
|
||||||
-D DEFAULT_SENSOR_INDOOR_GPIO=0
|
|
||||||
-D DEFAULT_STATUS_LED_GPIO=11
|
|
||||||
-D DEFAULT_OT_RX_LED_GPIO=10
|
|
||||||
|
|
||||||
[env:otthing]
|
[env:otthing]
|
||||||
platform = ${esp32_defaults.platform}
|
platform = ${esp32_defaults.platform}
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
# Source:
|
|
||||||
# https://github.com/pioarduino/platform-espressif32/tree/main/examples/espidf-arduino-h2zero-BLE_scan
|
|
||||||
|
|
||||||
CONFIG_FREERTOS_HZ=1000
|
|
||||||
CONFIG_MBEDTLS_PSK_MODES=y
|
|
||||||
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y
|
|
||||||
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y
|
|
||||||
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
|
|
||||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
|
||||||
CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE=y
|
|
||||||
|
|
||||||
#
|
|
||||||
# BT config
|
|
||||||
CONFIG_BT_ENABLED=y
|
|
||||||
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
|
|
||||||
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
|
|
||||||
CONFIG_BTDM_CTRL_MODE_BTDM=n
|
|
||||||
CONFIG_BT_BLUEDROID_ENABLED=n
|
|
||||||
CONFIG_BT_NIMBLE_ENABLED=y
|
|
||||||
|
|
||||||
#
|
|
||||||
# Arduino Configuration
|
|
||||||
CONFIG_AUTOSTART_ARDUINO=y
|
|
||||||
CONFIG_ARDUINO_SELECTIVE_COMPILATION=y
|
|
||||||
CONFIG_ARDUINO_SELECTIVE_Zigbee=n
|
|
||||||
CONFIG_ARDUINO_SELECTIVE_Matter=n
|
|
||||||
CONFIG_ARDUINO_SELECTIVE_WiFiProv=n
|
|
||||||
CONFIG_ARDUINO_SELECTIVE_BLE=n
|
|
||||||
CONFIG_ARDUINO_SELECTIVE_BluetoothSerial=n
|
|
||||||
CONFIG_ARDUINO_SELECTIVE_SimpleBLE=n
|
|
||||||
CONFIG_ARDUINO_SELECTIVE_RainMaker=n
|
|
||||||
CONFIG_ARDUINO_SELECTIVE_OpenThread=n
|
|
||||||
CONFIG_ARDUINO_SELECTIVE_Insights=n
|
|
||||||
@@ -496,9 +496,8 @@ protected:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!rSensor.connected) {
|
// Mark connected
|
||||||
rSensor.connected = true;
|
Sensors::setConnectionStatusById(sensorId, true, true);
|
||||||
}
|
|
||||||
|
|
||||||
if (!this->bleLastSetDtTime[sensorId] || millis() - this->bleLastSetDtTime[sensorId] > this->bleSetDtInterval) {
|
if (!this->bleLastSetDtTime[sensorId] || millis() - this->bleLastSetDtTime[sensorId] > this->bleSetDtInterval) {
|
||||||
struct tm ti;
|
struct tm ti;
|
||||||
@@ -521,7 +520,6 @@ protected:
|
|||||||
|
|
||||||
this->bleLastSetDtTime[sensorId] = millis();
|
this->bleLastSetDtTime[sensorId] = millis();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -981,16 +979,16 @@ protected:
|
|||||||
auto& rSensor = Sensors::results[sensorId];
|
auto& rSensor = Sensors::results[sensorId];
|
||||||
|
|
||||||
if (rSensor.connected && !sSensor.enabled) {
|
if (rSensor.connected && !sSensor.enabled) {
|
||||||
rSensor.connected = false;
|
Sensors::setConnectionStatusById(sensorId, false, false);
|
||||||
|
|
||||||
} else if (rSensor.connected && sSensor.type == Sensors::Type::NOT_CONFIGURED) {
|
} else if (rSensor.connected && sSensor.type == Sensors::Type::NOT_CONFIGURED) {
|
||||||
rSensor.connected = false;
|
Sensors::setConnectionStatusById(sensorId, false, false);
|
||||||
|
|
||||||
} else if (rSensor.connected && sSensor.purpose == Sensors::Purpose::NOT_CONFIGURED) {
|
} else if (rSensor.connected && sSensor.purpose == Sensors::Purpose::NOT_CONFIGURED) {
|
||||||
rSensor.connected = false;
|
Sensors::setConnectionStatusById(sensorId, false, false);
|
||||||
|
|
||||||
} else if (sSensor.type != Sensors::Type::MANUAL && rSensor.connected && (millis() - rSensor.activityTime) > this->disconnectedTimeout) {
|
} else if (sSensor.type != Sensors::Type::MANUAL && rSensor.connected && (millis() - rSensor.activityTime) > this->disconnectedTimeout) {
|
||||||
rSensor.connected = false;
|
Sensors::setConnectionStatusById(sensorId, false, false);
|
||||||
|
|
||||||
}/* else if (!rSensor.connected) {
|
}/* else if (!rSensor.connected) {
|
||||||
rSensor.connected = true;
|
rSensor.connected = true;
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
dependencies:
|
|
||||||
idf: ">=5.3.2"
|
|
||||||
h2zero/esp-nimble-cpp: ">=2.2.1"
|
|
||||||
Reference in New Issue
Block a user