Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
df-aggregator
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Oleksandr Barabash
df-aggregator
Commits
09b0eda4
Commit
09b0eda4
authored
Dec 01, 2020
by
Corey Koval
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added auto-refresh
parent
c1cf0ef6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
README.md
README.md
+1
-0
receiver_configurator.js
static/receiver_configurator.js
+6
-0
No files found.
README.md
View file @
09b0eda4
...
@@ -16,6 +16,7 @@ Click the power button to enable/disable.
...
@@ -16,6 +16,7 @@ Click the power button to enable/disable.
-
Black is enabled, red is disabled.
-
Black is enabled, red is disabled.
-
If you lose connectivity to a receiver, that particular receiver will be disabled.
-
If you lose connectivity to a receiver, that particular receiver will be disabled.
Click the power button to try to reconnect.
Click the power button to try to reconnect.
-
Map refreshes every 5 seconds. Change
`refreshrate`
at the top of
`static/receiver_configurator.js`
to change the refresh rate.
## Dependencies:
## Dependencies:
-
Python >= 3.6
-
Python >= 3.6
...
...
static/receiver_configurator.js
View file @
09b0eda4
// Update Map ever 5 seconds
var
refreshrate
=
5000
;
var
autoRefresh
=
setInterval
(
function
()
{
updateParams
();
},
refreshrate
);
// *************************************************
// *************************************************
// * Gets Rx data from backend
// * Gets Rx data from backend
// *************************************************
// *************************************************
...
@@ -56,6 +60,7 @@ function editReceivers(rx_json, id) {
...
@@ -56,6 +60,7 @@ function editReceivers(rx_json, id) {
var
editButton
=
document
.
getElementById
(
id
+
"-edit"
);
var
editButton
=
document
.
getElementById
(
id
+
"-edit"
);
var
isMobileCheck
=
document
.
getElementById
(
"mobilerx_toggle_"
+
id
);
var
isMobileCheck
=
document
.
getElementById
(
"mobilerx_toggle_"
+
id
);
if
(
editButton
.
checked
)
{
if
(
editButton
.
checked
)
{
clearInterval
(
autoRefresh
);
let
isMobile
=
""
;
let
isMobile
=
""
;
if
(
receivers
[
id
].
mobile
)
isMobile
=
"checked"
;
if
(
receivers
[
id
].
mobile
)
isMobile
=
"checked"
;
document
.
getElementById
(
id
+
"-editicon"
).
innerHTML
=
"save"
;
document
.
getElementById
(
id
+
"-editicon"
).
innerHTML
=
"save"
;
...
@@ -77,6 +82,7 @@ function editReceivers(rx_json, id) {
...
@@ -77,6 +82,7 @@ function editReceivers(rx_json, id) {
// }
// }
// }
// }
}
else
{
}
else
{
autoRefresh
=
setInterval
(
function
()
{
updateParams
();
},
refreshrate
);
isMobileCheck
=
document
.
getElementById
(
"mobilerx_toggle_"
+
id
);
isMobileCheck
=
document
.
getElementById
(
"mobilerx_toggle_"
+
id
);
if
(
isMobileCheck
.
checked
)
{
if
(
isMobileCheck
.
checked
)
{
receivers
[
id
].
mobile
=
true
;
receivers
[
id
].
mobile
=
true
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment