- // Channel menu
- channels = new AltosChannelMenu(AltosPreferences.channel(serial));
- channels.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- int channel = channels.getSelectedIndex();
- thread.set_channel(channel);
- }
+ // Frequency menu
+ frequencies = new AltosFreqList(AltosUIPreferences.frequency(serial));
+ frequencies.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ double frequency = frequencies.frequency();
+ thread.set_frequency(frequency);
+ AltosUIPreferences.set_frequency(device.getSerial(),
+ frequency);
+ }