dial frequencies as bookmarks

This commit is contained in:
Jakob Ketterl
2019-10-12 17:14:28 +02:00
parent 378c574eed
commit 98217b1745
3 changed files with 22 additions and 2 deletions

View File

@ -8,9 +8,13 @@ function BookmarkBar() {
var $bookmark = $(e.target).closest('.bookmark');
me.$container.find('.bookmark').removeClass('selected');
var b = $bookmark.data();
if (!b || !b.frequency || !b.modulation) return;
if (!b || !b.frequency || (!b.modulation && !b.digital_modulation)) return;
demodulator_set_offset_frequency(0, b.frequency - center_freq);
demodulator_analog_replace(b.modulation);
if (b.modulation) {
demodulator_analog_replace(b.modulation);
} else if (b.digital_modulation) {
demodulator_digital_replace(b.digital_modulation);
}
$bookmark.addClass('selected');
});