Skip to content

Commit ce3d340

Browse files
author
Daisuke Baba
committed
Strip unused property
1 parent 2f0be19 commit ce3d340

File tree

3 files changed

+0
-25
lines changed

3 files changed

+0
-25
lines changed

src/generic-ble.html

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,6 @@
143143
<input type="checkbox" id="node-config-input-muteNotifyEvents" style="display: inline-block; width: auto; vertical-align: top;">
144144
<label for="node-config-input-muteNotifyEvents" style="width: 70%;" data-i18n="generic-ble.label.muteNotifyEvents"></label>
145145
</div>
146-
<div class='form-row'>
147-
<label for='node-config-input-operationTimeout'>
148-
<i class='fa fa-tag'></i>
149-
<span data-i18n='generic-ble.label.operationTimeout'></span>
150-
</label>
151-
<input type='text' id='node-config-input-operationTimeout' data-i18n='[placeholder]generic-ble.placeholder.operationTimeout'>
152-
</div>
153146
<div class='form-row node-config-input-characteristics-container-row'>
154147
<i class='fa fa-gear'></i> <span data-i18n='generic-ble.label.characteristics'></span>
155148
<ol id='node-config-input-characteristics-container'></ol>
@@ -158,8 +151,6 @@
158151

159152
<script type="text/javascript">
160153
'use strict';
161-
const MAX_MILLIS = 60 * 1000;
162-
const MIN_MILLIS = 300;
163154
const LIST_BLE_DEVICE_INTERVAL_MS = 10 * 1000;
164155
const LIST_BLE_DEVICE_DELAY_MS = 5 * 1000;
165156
var charBuff = [];
@@ -179,7 +170,6 @@
179170
address: { value: '', required: false },
180171
uuid: { value: '', required: false },
181172
muteNotifyEvents: { value: false, required: false },
182-
operationTimeout: { value: '', required: false },
183173
// characteristic
184174
// {
185175
// "uuid": "2a19",
@@ -208,18 +198,6 @@
208198
if (uuid) {
209199
$('#node-config-input-uuid').val(uuid.toLowerCase());
210200
}
211-
var operationTimeout = $('#node-config-input-operationTimeout').val();
212-
if (operationTimeout) {
213-
operationTimeout = parseInt(operationTimeout);
214-
if (operationTimeout < MIN_MILLIS) {
215-
operationTimeout = MIN_MILLIS;
216-
} else if (operationTimeout > MAX_MILLIS) {
217-
operationTimeout = MAX_MILLIS;
218-
} else if (isNaN(operationTimeout)){
219-
operationTimeout = '';
220-
}
221-
$('#node-config-input-operationTimeout').val(operationTimeout);
222-
}
223201
this.characteristics = charBuff;
224202
},
225203
oneditprepare: function() {

src/generic-ble.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,6 @@ module.exports = function (RED) {
357357
this.address = n.address;
358358
this.uuid = n.uuid;
359359
this.muteNotifyEvents = n.muteNotifyEvents;
360-
this.operationTimeout = n.operationTimeout;
361360
this.characteristics = [];
362361
const key = getAddressOrUUID(n);
363362
if (key) {

src/locales/en-US/generic-ble.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ generic-ble:
88
unnamed: (Unnamed)
99
address: MAC
1010
uuid: UUID
11-
operationTimeout: Operation Timeout
1211
characteristics: GATT Characteristics
1312
notAvailable: (not available)
1413
notification: Emit notify events
@@ -22,7 +21,6 @@ generic-ble:
2221
localName: BLE device name
2322
address: aa:11:bb:22:cc:33 (case insensitive)
2423
uuid: (optional, e.g. 46788f85-c8a9-4f57-a9b1-f1df906c1ad6)
25-
operationTimeout: (milliseconds, between 300 and 60000 millisecs)
2624
status:
2725
connected: connected
2826
disconnected: disconnected

0 commit comments

Comments
 (0)