Adjusted DSC display to show timestamps.
This commit is contained in:
parent
316d3167d9
commit
7893c5b005
|
|
@ -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 …</span>'
|
||||
/(.*)\|(.*)/, ' $1<span style="opacity:0.5;"> | $2 …</span>'
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue