mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 20:06:42 +01:00
Added subGhz fixed channel support to tag config, added line accident… (#301)
* Added subGhz fixed channel support to tag config, added line accidentally dropped in pr7 merge.
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -682,8 +682,8 @@
|
||||
"key": "fixedchannel",
|
||||
"name": "Fixed Channel",
|
||||
"desc": "What channel should the tag initially join?",
|
||||
"type": "select",
|
||||
"options": {
|
||||
"type": "chanselect",
|
||||
"chans": {
|
||||
"0": "-Auto",
|
||||
"11": "11",
|
||||
"15": "15",
|
||||
@@ -691,6 +691,21 @@
|
||||
"25": "25",
|
||||
"26": "26",
|
||||
"27": "27"
|
||||
},
|
||||
"subchans": {
|
||||
"0": "-Auto",
|
||||
"100": "100",
|
||||
"101": "101",
|
||||
"102": "102",
|
||||
"103": "103",
|
||||
"104": "104",
|
||||
"105": "105",
|
||||
"200": "200",
|
||||
"201": "201",
|
||||
"202": "202",
|
||||
"203": "203",
|
||||
"204": "204",
|
||||
"205": "205"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -297,6 +297,7 @@ function processTags(tagArray) {
|
||||
(async () => {
|
||||
const localTagmac = tagmac;
|
||||
const data = await getTagtype(element.hwType);
|
||||
div.dataset.usetemplate = data.usetemplate;
|
||||
if (data.usetemplate != 0) {
|
||||
const template = await getTagtype(data.usetemplate);
|
||||
}
|
||||
@@ -523,6 +524,7 @@ function loadContentCard(mac) {
|
||||
$('#cfglut').value = tagdata.lut;
|
||||
$('#cfginvert').value = tagdata.invert;
|
||||
$('#cfgmore').innerHTML = '▼';
|
||||
$('#cfgmac').dataset.ch = tagdata.ch;
|
||||
$('#configbox').showModal();
|
||||
})
|
||||
}
|
||||
@@ -969,13 +971,27 @@ function contentselected() {
|
||||
});
|
||||
break;
|
||||
case 'select':
|
||||
case 'chanselect':
|
||||
input = document.createElement("select");
|
||||
for (const key in element.options) {
|
||||
let options;
|
||||
if(element.type == 'chanselect') {
|
||||
if($('#cfgmac').dataset.ch < 100) {
|
||||
options = element.chans;
|
||||
}
|
||||
else {
|
||||
options = element.subchans;
|
||||
}
|
||||
}
|
||||
else {
|
||||
options = element.options
|
||||
}
|
||||
|
||||
for (const key in options) {
|
||||
const optionElement = document.createElement("option");
|
||||
optionElement.value = key;
|
||||
optionElement.text = element.options[key];
|
||||
if (element.options[key].substring(0, 1) == "-") {
|
||||
optionElement.text = element.options[key].substring(1);
|
||||
optionElement.text = options[key];
|
||||
if (options[key].substring(0, 1) == "-") {
|
||||
optionElement.text = options[key].substring(1);
|
||||
optionElement.selected = true;
|
||||
} else {
|
||||
optionElement.selected = false;
|
||||
|
||||
Reference in New Issue
Block a user