Skip to content

Commit

Permalink
add tooltip in lora for the default APP_EUI
Browse files Browse the repository at this point in the history
+ fix configuration reading in case of None string
  • Loading branch information
ftylitak committed May 31, 2024
1 parent b7f2ff9 commit f4f2c44
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion insighioNode/lib/networking/lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def join(cfg, lora_keys):

modem.set_dev_eui(lora_keys[0])

if lora_keys[1]:
if lora_keys[1] and lora_keys[1] != "None":
modem.set_app_eui(lora_keys[1])
else:
_DEFAULT_APP_EUI = "0000000000000001"
Expand Down
2 changes: 2 additions & 0 deletions insighioNode/lib/utils/configuration_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ def get_config_values(fillWithUndefinedIfNotExists=True, prepareForInternalUse=F
value = getattr(cfg, key)
if isinstance(value, (int, float, str)):
configKeyValues[webUIKey] = str(value)
if configKeyValues[webUIKey] == "None":
configKeyValues[webUIKey] = ""
elif isinstance(value, bool):
configKeyValues[webUIKey] = str(value).lower()
elif isinstance(value, NoneType):
Expand Down
11 changes: 10 additions & 1 deletion insighioNode/www/step-4-keys-lora.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,16 @@
<br />
<br />
<div class="col-3 col-sm-12">
<label class="form-label" for="input-app-eui">APP_EUI</label>
<label class="form-label" for="input-app-eui">APP_EUI<div class="popover popover-bottom">
<button class="btn btn-link">(Optional)</button>
<div class="popover-container">
<div class="card">
<div class="card-body">
If left blank, default value "0000000000000001" will be used
</div>
</div>
</div>
</div></label>
</div>
<div class="col-9 col-sm-12">
<input class="form-input constr-field" type="text" id="input-app-eui" />
Expand Down

0 comments on commit f4f2c44

Please sign in to comment.