mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 02:52:11 +01:00
Added the ability to scan frequencies from remotes.
This commit is contained in:
parent
ea37fa0002
commit
a6c7601458
6 changed files with 10 additions and 8 deletions
|
|
@ -3,7 +3,7 @@
|
|||
#ifndef configsettings_h
|
||||
#define configsettings_h
|
||||
|
||||
#define FW_VERSION "v2.1.6"
|
||||
#define FW_VERSION "v2.1.7"
|
||||
enum DeviceStatus {
|
||||
DS_OK = 0,
|
||||
DS_ERROR = 1,
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
2.1.6
|
||||
2.1.7
|
||||
|
|
@ -3,11 +3,11 @@
|
|||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="main.css?v=2.1.6" type="text/css" />
|
||||
<link rel="stylesheet" href="widgets.css?v=2.1.6" type="text/css" />
|
||||
<link rel="stylesheet" href="icons.css?v=2.1.6" type="text/css" />
|
||||
<link rel="stylesheet" href="main.css?v=2.1.7" type="text/css" />
|
||||
<link rel="stylesheet" href="widgets.css?v=2.1.7" type="text/css" />
|
||||
<link rel="stylesheet" href="icons.css?v=2.1.7" type="text/css" />
|
||||
<link rel="icon" type="image/png" href="favicon.png" />
|
||||
<script type="text/javascript" src="index.js?v=2.1.6"></script>
|
||||
<script type="text/javascript" src="index.js?v=2.1.7"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="divContainer" class="container main" data-auth="false">
|
||||
|
|
|
|||
|
|
@ -1200,7 +1200,7 @@ var security = new Security();
|
|||
|
||||
class General {
|
||||
initialized = false;
|
||||
appVersion = 'v2.1.6';
|
||||
appVersion = 'v2.1.7';
|
||||
reloadApp = false;
|
||||
init() {
|
||||
if (this.initialized) return;
|
||||
|
|
@ -1962,8 +1962,10 @@ class Somfy {
|
|||
div.classList.add('prompt-message');
|
||||
let html = '<div class="sub-message">Frequency Scanning has started. Press and hold any button on your remote and ESPSomfy RTS will find the closest frequency to the remote.</div>';
|
||||
html += '<hr style="width:100%;margin:0px;"></hr>';
|
||||
html += '<div style="width:100%;text-align:center;">';
|
||||
html += '<div class="" style="font-size:20px;"><label style="padding-right:7px;display:inline-block;width:87px;">Scanning</label><span id="spanTestFreq" style="display:inline-block;width:4em;text-align:right;">433.00</span><span>MHz</span><label style="padding-left:12px;padding-right:7px;">RSSI</label><span id="spanTestRSSI">----</span><span>dBm</span></div>';
|
||||
html += '<div class="" style="font-size:20px;"><label style="padding-right:7px;display:inline-block;width:87px;">Frequency</label><span id="spanBestFreq" style="display:inline-block;width:4em;text-align:right;">---.--</span><span>MHz</span><label style="padding-left:12px;padding-right:7px;">RSSI</label><span id="spanBestRSSI">----</span><span>dBm</span></div>';
|
||||
html += '</div>';
|
||||
html += `<div class="button-container">`;
|
||||
html += `<button id="btnStopScanning" type="button" style="padding-left:20px;padding-right:20px;" onclick="somfy.stopScanningFrequency(true);">Stop Scanning</button>`;
|
||||
html += `<button id="btnRestartScanning" type="button" style="padding-left:20px;padding-right:20px;display:none;" onclick="somfy.scanFrequency(true);">Start Scanning</button>`;
|
||||
|
|
@ -2006,7 +2008,7 @@ class Somfy {
|
|||
let freq = parseFloat(div.getAttribute('data-frequency'));
|
||||
document.getElementById('btnStopScanning').style.display = 'none';
|
||||
document.getElementById('btnRestartScanning').style.display = '';
|
||||
if(typeof freq === 'number') document.getElementById('btnCopyFrequency').style.display = '';
|
||||
if (typeof freq === 'number' && !isNaN(freq)) document.getElementById('btnCopyFrequency').style.display = '';
|
||||
document.getElementById('btnCloseScanning').style.display = '';
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue