mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 05:06:39 +01:00
Default tag alias to tag serial number rather than MAC for Chroma tags (#318)
This commit is contained in:
@@ -285,7 +285,18 @@ function processTags(tagArray) {
|
||||
$('#tag' + tagmac + ' .mac').innerHTML = tagmac;
|
||||
}
|
||||
let alias = element.alias;
|
||||
if (!alias) alias = tagmac.replace(/^0{1,4}/, '');
|
||||
if (!alias) {
|
||||
alias = tagmac.replace(/^0{1,4}/, '');
|
||||
if (alias.match(/^4467/)) {
|
||||
let macdigit = Number.parseInt(alias.substr(4,2),16) & 0x1f;
|
||||
let model = String.fromCharCode(macdigit + 65);
|
||||
if (model == 'J' || model == 'M') {
|
||||
macdigit = Number.parseInt(alias.substr(6,2),16) & 0x1f;
|
||||
model += String.fromCharCode(macdigit + 65);
|
||||
alias = model + alias.substr(8,8) + 'x'
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($('#tag' + tagmac + ' .alias').innerHTML != alias) {
|
||||
$('#tag' + tagmac + ' .alias').innerHTML = alias;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user