Correct issue with interval being added and not set to the expected value
and add debug infos
This commit is contained in:
1 parent
87c85eabe0
commit
4b0d3943ce
1 file changed
+5
-2
+5
-2
@@ -676,11 +676,14 @@ void MQTTtoBT(char * topicOri, JsonObject& BTdata) { // json object decoding
|
|||||||
|
|
||||||
// Scan interval set
|
// Scan interval set
|
||||||
if (BTdata.containsKey("interval")){
|
if (BTdata.containsKey("interval")){
|
||||||
trc(F("BLE interval set"));
|
trc(F("BLE interval"));
|
||||||
// storing BLE interval for further use if needed
|
// storing BLE interval for further use if needed
|
||||||
unsigned int prevBLEinterval = BLEinterval;
|
unsigned int prevBLEinterval = BLEinterval;
|
||||||
|
trc("previous interval");
|
||||||
|
trc(BLEinterval);
|
||||||
// set BLE interval if present if not setting default value
|
// set BLE interval if present if not setting default value
|
||||||
BLEinterval = (unsigned int)BTdata["interval"]|prevBLEinterval;
|
BLEinterval = (unsigned int)BTdata["interval"];
|
||||||
|
trc("new interval");
|
||||||
trc(BLEinterval);
|
trc(BLEinterval);
|
||||||
if (BLEinterval == 0) {
|
if (BLEinterval == 0) {
|
||||||
if(BTtoMQTT())// as BLEinterval is = to 0 we can launch the loop and the scan will execute immediately
|
if(BTtoMQTT())// as BLEinterval is = to 0 we can launch the loop and the scan will execute immediately
|
||||||
|
|||||||
Reference in new issue
Block a user