Adjusted DSC display to show timestamps.

This commit is contained in:
Marat Fayzullin 2024-03-04 20:11:51 -05:00
parent 316d3167d9
commit 7893c5b005
2 changed files with 4 additions and 5 deletions

View File

@ -571,14 +571,14 @@ DscMessagePanel.prototype.pushMessage = function(msg) {
// Format timestamp
var timestamp =
msg.time? '<b>' + msg.time + '</b>'
: msg.timestamp? Utils.HHMMSS(new Date(msg.timestamp))
: Utils.HHMMSS(new Date());
: msg.timestamp? Utils.HHMMSS(new Date(msg.timestamp * 1000))
: '';
// Format debugging data
var symbols = '';
if (msg.data) {
symbols = msg.data.replace(
/(.*)\|(.*)/, ' $1<span style="opacity:0.5;">|$2 &hellip;</span>'
/(.*)\|(.*)/, ' $1<span style="opacity:0.5;"> | $2 &hellip;</span>'
);
}

View File

@ -26,8 +26,7 @@ class DscParser(TextParser):
# Expect JSON data in text form
out = json.loads(msg)
# Add mode name, time stamp, frequency, and color to identify sender
out["mode"] = "DSC"
out["timestamp"] = self.getUtcTime()
out["mode"] = "DSC"
if self.frequency != 0:
out["frequency"] = self.frequency
if "src" in out: