update bookmarks

This commit is contained in:
Jakob Ketterl 2020-05-02 01:10:41 +02:00
parent d9a818525d
commit 20023e3989
2 changed files with 2 additions and 5 deletions

View File

@ -8,13 +8,10 @@ function BookmarkBar() {
var $bookmark = $(e.target).closest('.bookmark');
me.$container.find('.bookmark').removeClass('selected');
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);
if (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');
});

View File

@ -818,7 +818,7 @@ function on_ws_recv(evt) {
var as_bookmarks = json['value'].map(function (d) {
return {
name: d['mode'].toUpperCase(),
digital_modulation: d['mode'],
modulation: d['mode'],
frequency: d['frequency']
};
});