update bookmarks
This commit is contained in:
parent
d9a818525d
commit
20023e3989
@ -8,13 +8,10 @@ function BookmarkBar() {
|
|||||||
var $bookmark = $(e.target).closest('.bookmark');
|
var $bookmark = $(e.target).closest('.bookmark');
|
||||||
me.$container.find('.bookmark').removeClass('selected');
|
me.$container.find('.bookmark').removeClass('selected');
|
||||||
var b = $bookmark.data();
|
var b = $bookmark.data();
|
||||||
if (!b || !b.frequency || (!b.modulation && !b.digital_modulation)) return;
|
if (!b || !b.frequency || !b.modulation) return;
|
||||||
me.getDemodulator().set_offset_frequency(b.frequency - center_freq);
|
me.getDemodulator().set_offset_frequency(b.frequency - center_freq);
|
||||||
if (b.modulation) {
|
if (b.modulation) {
|
||||||
me.getDemodulatorPanel().setMode(b.modulation);
|
me.getDemodulatorPanel().setMode(b.modulation);
|
||||||
} else if (b.digital_modulation) {
|
|
||||||
// TODO: update bookmarks so they don't contain digital_modulation
|
|
||||||
me.getDemodulatorPanel().setMode(b.digital_modulation);
|
|
||||||
}
|
}
|
||||||
$bookmark.addClass('selected');
|
$bookmark.addClass('selected');
|
||||||
});
|
});
|
||||||
|
@ -818,7 +818,7 @@ function on_ws_recv(evt) {
|
|||||||
var as_bookmarks = json['value'].map(function (d) {
|
var as_bookmarks = json['value'].map(function (d) {
|
||||||
return {
|
return {
|
||||||
name: d['mode'].toUpperCase(),
|
name: d['mode'].toUpperCase(),
|
||||||
digital_modulation: d['mode'],
|
modulation: d['mode'],
|
||||||
frequency: d['frequency']
|
frequency: d['frequency']
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user