mirror of
https://github.com/ha7ilm/openwebrx.git
synced 2026-01-23 16:50:24 +01:00
add timestamp display
This commit is contained in:
parent
87afa13b46
commit
47a5ba7634
|
|
@ -25,7 +25,6 @@ class MetaProcessor(PickleModule):
|
|||
result = {}
|
||||
for key, value in data.items():
|
||||
if key == "coarse_frequency_shift":
|
||||
value = int(value)
|
||||
if value > 0:
|
||||
self.shift += random() * self.coarse_increment
|
||||
else:
|
||||
|
|
@ -33,7 +32,6 @@ class MetaProcessor(PickleModule):
|
|||
logger.debug("coarse adjustment - new shift: %f", self.shift)
|
||||
self.shifter.setRate(self.shift)
|
||||
elif key == "fine_frequency_shift":
|
||||
value = float(value)
|
||||
if abs(value) > 10:
|
||||
self.shift += self.fine_increment * value
|
||||
logger.debug("ffs: %f", value)
|
||||
|
|
|
|||
|
|
@ -1391,6 +1391,8 @@ img.openwebrx-mirror-img
|
|||
|
||||
.dab-container > * {
|
||||
margin: 2px 0;
|
||||
text-align: center;
|
||||
overflow: hidden auto;
|
||||
}
|
||||
|
||||
.dab-container label {
|
||||
|
|
|
|||
|
|
@ -564,6 +564,7 @@ function DabMetaPanel(el) {
|
|||
'<div class="dab-container">' +
|
||||
'<div class="dab-auto-clear dab-ensemble-id"></div>' +
|
||||
'<div class="dab-auto-clear dab-ensemble-label"></div>' +
|
||||
'<div class="dab-auto-clear dab-timestamp"></div>' +
|
||||
'<label for="dab-service-id">DAB Service:</label>' +
|
||||
'</div>'
|
||||
);
|
||||
|
|
@ -583,13 +584,18 @@ DabMetaPanel.prototype.update = function(data) {
|
|||
if (!this.isSupported(data)) return;
|
||||
|
||||
if ('ensemble_id' in data) {
|
||||
$(this.el).find('.dab-ensemble-id').text('0x' + parseInt(data.ensemble_id).toString(16));
|
||||
$(this.el).find('.dab-ensemble-id').text('0x' + data.ensemble_id.toString(16));
|
||||
}
|
||||
|
||||
if ('ensemble_label' in data) {
|
||||
$(this.el).find('.dab-ensemble-label').text(data.ensemble_label);
|
||||
}
|
||||
|
||||
if ('timestamp' in data) {
|
||||
var date = new Date(data.timestamp * 1000);
|
||||
$(this.el).find('.dab-timestamp').text(date.toLocaleString([], {dateStyle: 'short', timeStyle: 'medium'}));
|
||||
}
|
||||
|
||||
if ('programmes' in data) {
|
||||
var options = Object.entries(data.programmes).map(function(e) {
|
||||
return '<option value="' + e[0] + '">' + e[1] + '</option>';
|
||||
|
|
|
|||
Loading…
Reference in a new issue