mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-10 18:24:27 +05:00
feat: added validation for BLE address
This commit is contained in:
@@ -241,7 +241,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<label for="indoor-sensor-ble-addresss">
|
<label for="indoor-sensor-ble-addresss">
|
||||||
BLE addresss
|
BLE addresss
|
||||||
<input type="text" class="indoor-sensor-ble-addresss" name="sensors[indoor][bleAddresss]" maxlength="17">
|
<input type="text" class="indoor-sensor-ble-addresss" name="sensors[indoor][bleAddresss]" pattern="([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}">
|
||||||
<small>ONLY for some ESP32 which support BLE</small>
|
<small>ONLY for some ESP32 which support BLE</small>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ struct Settings {
|
|||||||
// 1 - manual, 2 - ds18b20, 3 - ble
|
// 1 - manual, 2 - ds18b20, 3 - ble
|
||||||
byte type = 1;
|
byte type = 1;
|
||||||
byte pin = SENSOR_INDOOR_PIN_DEFAULT;
|
byte pin = SENSOR_INDOOR_PIN_DEFAULT;
|
||||||
char bleAddresss[18];
|
char bleAddresss[18] = "00:00:00:00:00:00";
|
||||||
float offset = 0.0f;
|
float offset = 0.0f;
|
||||||
} indoor;
|
} indoor;
|
||||||
} sensors;
|
} sensors;
|
||||||
|
|||||||
Reference in New Issue
Block a user