2017-03-14 07:24:04 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
|
|
|
|
* Copyright (C) 2016 Furrtek
|
|
|
|
*
|
|
|
|
* This file is part of PortaPack.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, Inc., 51 Franklin Street,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __UI_MICTX_H__
|
|
|
|
#define __UI_MICTX_H__
|
|
|
|
|
|
|
|
#include "ui.hpp"
|
|
|
|
#include "ui_widget.hpp"
|
|
|
|
#include "ui_navigation.hpp"
|
|
|
|
#include "ui_receiver.hpp"
|
|
|
|
#include "transmitter_model.hpp"
|
2017-11-09 20:02:34 +00:00
|
|
|
#include "tone_key.hpp"
|
|
|
|
#include "message.hpp"
|
2020-08-07 00:19:37 -03:00
|
|
|
#include "receiver_model.hpp"
|
2017-03-14 07:24:04 +00:00
|
|
|
|
|
|
|
namespace ui {
|
|
|
|
|
|
|
|
class MicTXView : public View {
|
|
|
|
public:
|
|
|
|
MicTXView(NavigationView& nav);
|
|
|
|
~MicTXView();
|
|
|
|
|
|
|
|
MicTXView(const MicTXView&) = delete;
|
|
|
|
MicTXView(MicTXView&&) = delete;
|
|
|
|
MicTXView& operator=(const MicTXView&) = delete;
|
|
|
|
MicTXView& operator=(MicTXView&&) = delete;
|
|
|
|
|
|
|
|
void focus() override;
|
|
|
|
|
|
|
|
// PTT: Enable through KeyEvent (only works with presses), disable by polling :(
|
2020-08-24 01:53:34 +08:00
|
|
|
// This is the old "RIGHT BUTTON" method.
|
|
|
|
/*
|
2017-03-14 07:24:04 +00:00
|
|
|
bool on_key(const KeyEvent key) {
|
2020-08-22 14:57:55 +08:00
|
|
|
if ((key == KeyEvent::Right) && (!va_enabled) && ptt_enabled) {
|
2017-03-14 07:24:04 +00:00
|
|
|
set_tx(true);
|
|
|
|
return true;
|
|
|
|
} else
|
|
|
|
return false;
|
|
|
|
};
|
2020-08-24 01:53:34 +08:00
|
|
|
*/
|
|
|
|
|
2022-04-26 23:09:24 +02:00
|
|
|
std::string title() const override { return "Microphone"; };
|
2017-03-14 07:24:04 +00:00
|
|
|
|
|
|
|
private:
|
2017-11-09 20:02:34 +00:00
|
|
|
static constexpr uint32_t sampling_rate = 1536000U;
|
2020-08-07 00:19:37 -03:00
|
|
|
static constexpr uint32_t lcd_frame_duration = (256 * 1000UL) / 60; // 1 frame @ 60fps in ms .8 fixed point /60
|
2017-11-09 20:02:34 +00:00
|
|
|
|
2017-03-14 07:24:04 +00:00
|
|
|
void update_vumeter();
|
|
|
|
void do_timing();
|
|
|
|
void set_tx(bool enable);
|
2020-08-23 17:41:31 +08:00
|
|
|
// void on_tuning_frequency_changed(rf::Frequency f);
|
2017-11-09 20:02:34 +00:00
|
|
|
void on_tx_progress(const bool done);
|
|
|
|
void configure_baseband();
|
2020-08-07 00:19:37 -03:00
|
|
|
|
|
|
|
void rxaudio(bool is_on);
|
|
|
|
void on_headphone_volume_changed(int32_t v);
|
2020-08-22 14:57:55 +08:00
|
|
|
|
|
|
|
void set_ptt_visibility(bool v);
|
2017-03-14 07:24:04 +00:00
|
|
|
|
|
|
|
bool transmitting { false };
|
2020-08-07 00:19:37 -03:00
|
|
|
bool va_enabled { false };
|
2020-08-22 14:57:55 +08:00
|
|
|
bool ptt_enabled { true };
|
2020-08-07 00:19:37 -03:00
|
|
|
bool rogerbeep_enabled { false };
|
2023-04-04 17:26:45 +02:00
|
|
|
bool bool_same_F_tx_rx_enabled { false };
|
2020-08-07 00:19:37 -03:00
|
|
|
bool rx_enabled { false };
|
2017-11-09 20:02:34 +00:00
|
|
|
uint32_t tone_key_index { };
|
2018-02-01 11:17:51 +00:00
|
|
|
float mic_gain { 1.0 };
|
2022-10-02 00:51:12 +02:00
|
|
|
uint8_t ak4951_alc_and_wm8731_boost_GUI { 0 };
|
2017-03-14 07:24:04 +00:00
|
|
|
uint32_t audio_level { 0 };
|
|
|
|
uint32_t va_level { };
|
|
|
|
uint32_t attack_ms { };
|
|
|
|
uint32_t decay_ms { };
|
|
|
|
uint32_t attack_timer { 0 };
|
|
|
|
uint32_t decay_timer { 0 };
|
2020-08-22 14:57:55 +08:00
|
|
|
int32_t tx_gain { 47 };
|
|
|
|
bool rf_amp { false };
|
|
|
|
int32_t rx_lna { 32 };
|
|
|
|
int32_t rx_vga { 32 };
|
|
|
|
bool rx_amp { false };
|
2020-08-23 17:41:31 +08:00
|
|
|
rf::Frequency tx_frequency { 0 };
|
|
|
|
rf::Frequency rx_frequency { 0 };
|
2020-08-24 01:53:34 +08:00
|
|
|
int32_t focused_ui { 2 };
|
2020-08-24 11:02:42 +08:00
|
|
|
bool button_touch { false };
|
2022-09-28 22:42:33 +02:00
|
|
|
uint8_t shift_bits_s16 {4} ; // shift bits factor to the captured ADC S16 audio sample.
|
2020-08-22 14:57:55 +08:00
|
|
|
|
2021-03-21 20:11:40 -05:00
|
|
|
//AM TX Stuff
|
|
|
|
bool enable_am { false };
|
|
|
|
bool enable_dsb { false };
|
|
|
|
bool enable_usb { false };
|
|
|
|
bool enable_lsb { false };
|
2022-10-16 19:01:05 +02:00
|
|
|
bool enable_wfm { false }; // added to distinguish in the FM mode , RX BW : NFM (8K5, 11K), FM (16K), WFM(200K)
|
2021-03-21 20:11:40 -05:00
|
|
|
|
2017-03-14 07:24:04 +00:00
|
|
|
|
2022-03-05 21:39:53 +01:00
|
|
|
Labels labels_WM8731 {
|
|
|
|
{ { 3 * 8, 1 * 8 }, "MIC-GAIN:", Color::light_grey() },
|
2022-09-28 22:42:33 +02:00
|
|
|
{ { 17 * 8, 1 * 8 }, "Boost", Color::light_grey() },
|
2020-08-24 01:53:34 +08:00
|
|
|
{ { 3 * 8, 3 * 8 }, "F:", Color::light_grey() },
|
2022-10-16 19:01:05 +02:00
|
|
|
{ { 15 * 8, 3 * 8 }, "FM TXBW: kHz", Color::light_grey() }, // to be more symetric and consistent to the below FM RXBW
|
2020-08-24 01:53:34 +08:00
|
|
|
{ { 3 * 8, 5 * 8 }, "GAIN:", Color::light_grey() },
|
|
|
|
{ {11 * 8, 5 * 8 }, "Amp:", Color::light_grey() },
|
2021-03-21 20:11:40 -05:00
|
|
|
{ { 18 * 8, (5 * 8) }, "Mode:", Color::light_grey() },
|
2020-08-24 01:53:34 +08:00
|
|
|
{ { 3 * 8, 8 * 8 }, "TX Activation:", Color::light_grey() },
|
|
|
|
{ { 4 * 8, 10 * 8 }, "LVL:", Color::light_grey() },
|
|
|
|
{ {12 * 8, 10 * 8 }, "ATT:", Color::light_grey() },
|
|
|
|
{ {20 * 8, 10 * 8 }, "DEC:", Color::light_grey() },
|
|
|
|
{ { 4 * 8, ( 13 * 8 ) - 2 }, "TONE KEY:", Color::light_grey() },
|
2022-03-05 21:39:53 +01:00
|
|
|
{ { 7 * 8, 23 * 8 }, "VOL:", Color::light_grey() },
|
2023-04-04 17:26:45 +02:00
|
|
|
{ {14 * 8, 23 * 8 }, "RXBW:", Color::light_grey() }, //we remove the label "FM" because we will display all MOD types RX_BW.
|
|
|
|
{ {20 * 8, 25 * 8 }, "SQ:", Color::light_grey() },
|
|
|
|
{ { 5 * 8, 25 * 8 }, "F_RX:", Color::light_grey() },
|
2020-08-24 01:53:34 +08:00
|
|
|
{ { 5 * 8, 27 * 8 }, "LNA:", Color::light_grey()},
|
|
|
|
{ {12 * 8, 27 * 8 }, "VGA:", Color::light_grey()},
|
|
|
|
{ {19 * 8, 27 * 8 }, "AMP:", Color::light_grey()}
|
2017-03-14 07:24:04 +00:00
|
|
|
};
|
2022-03-05 21:39:53 +01:00
|
|
|
Labels labels_AK4951 {
|
|
|
|
{ { 3 * 8, 1 * 8 }, "MIC-GAIN:", Color::light_grey() },
|
|
|
|
{ { 17 * 8, 1 * 8 }, "ALC", Color::light_grey() },
|
|
|
|
{ { 3 * 8, 3 * 8 }, "F:", Color::light_grey() },
|
2022-10-16 19:01:05 +02:00
|
|
|
{ { 15 * 8, 3 * 8 }, "FM TXBW: kHz", Color::light_grey() },
|
2022-03-05 21:39:53 +01:00
|
|
|
{ { 3 * 8, 5 * 8 }, "GAIN:", Color::light_grey() },
|
|
|
|
{ {11 * 8, 5 * 8 }, "Amp:", Color::light_grey() },
|
|
|
|
{ { 18 * 8, (5 * 8) }, "Mode:", Color::light_grey() },
|
|
|
|
{ { 3 * 8, 8 * 8 }, "TX Activation:", Color::light_grey() },
|
|
|
|
{ { 4 * 8, 10 * 8 }, "LVL:", Color::light_grey() },
|
|
|
|
{ {12 * 8, 10 * 8 }, "ATT:", Color::light_grey() },
|
|
|
|
{ {20 * 8, 10 * 8 }, "DEC:", Color::light_grey() },
|
|
|
|
{ { 4 * 8, ( 13 * 8 ) - 2 }, "TONE KEY:", Color::light_grey() },
|
2022-10-16 19:01:05 +02:00
|
|
|
{ { (6 * 8)+4, 23 * 8 }, "VOL:", Color::light_grey() },
|
2022-10-29 16:02:08 +02:00
|
|
|
{ {14 * 8, 23 * 8 }, "RXBW:", Color::light_grey() }, //we remove the label "FM" because we will display all MOD types RX_BW.
|
2023-04-04 17:26:45 +02:00
|
|
|
{ {20 * 8, 25 * 8 }, "SQ:", Color::light_grey() },
|
|
|
|
{ { 5 * 8, 25 * 8 }, "F_RX:", Color::light_grey() },
|
2022-03-05 21:39:53 +01:00
|
|
|
{ { 5 * 8, 27 * 8 }, "LNA:", Color::light_grey()},
|
|
|
|
{ {12 * 8, 27 * 8 }, "VGA:", Color::light_grey()},
|
|
|
|
{ {19 * 8, 27 * 8 }, "AMP:", Color::light_grey()}
|
|
|
|
};
|
|
|
|
|
2017-03-14 07:24:04 +00:00
|
|
|
VuMeter vumeter {
|
2020-08-07 00:19:37 -03:00
|
|
|
{ 0 * 8, 1 * 8, 2 * 8, 33 * 8 },
|
|
|
|
12,
|
|
|
|
true
|
2017-03-14 07:24:04 +00:00
|
|
|
};
|
2020-08-24 01:53:34 +08:00
|
|
|
|
2017-03-14 07:24:04 +00:00
|
|
|
|
|
|
|
OptionsField options_gain {
|
2022-03-05 21:39:53 +01:00
|
|
|
{ 12 * 8, 1 * 8 },
|
2017-03-14 07:24:04 +00:00
|
|
|
4,
|
|
|
|
{
|
|
|
|
{ "x0.5", 5 },
|
|
|
|
{ "x1.0", 10 },
|
|
|
|
{ "x1.5", 15 },
|
|
|
|
{ "x2.0", 20 }
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2022-03-05 21:39:53 +01:00
|
|
|
OptionsField options_ak4951_alc_mode {
|
|
|
|
{ 20 * 8, 1 * 8 }, // Coordinates are: int:x (px), int:y (px)
|
|
|
|
11,
|
|
|
|
{
|
2022-05-28 22:29:10 +02:00
|
|
|
{ " OFF-12kHz", 0 }, // Nothing changed from ORIGINAL,keeping ALL programmable AK4951 Digital Block->OFF, sampling 24Khz)
|
2022-03-05 21:39:53 +01:00
|
|
|
{ "+12dB-6kHz", 1 }, // ALC-> on, (+12dB's) Auto Vol max + Wind Noise cancel + LPF 6kHz + Pre-amp Mic (+21dB=original)
|
|
|
|
{ "+09dB-6kHz", 2 }, // ALC-> on, (+09dB's) Auto Vol max + Wind Noise cancel + LPF 6kHz + Pre-amp Mic (+21dB=original)
|
|
|
|
{ "+06dB-6kHz", 3 }, // ALC-> on, (+06dB's) Auto Vol max + Wind Noise cancel + LPF 6kHz + Pre-amp Mic (+21dB=original)
|
|
|
|
{ "+03dB-2kHz", 4 }, // ALC-> on, (+03dB's) Auto Vol max + Wind Noise cancel + LPF 3,5k + Pre-amp Mic (+21dB=original)+ EQ boosting ~<2kHz (f0~1k1,fb:1,7K, k=1,8)
|
|
|
|
{ "+03dB-4kHz", 5 }, // ALC-> on, (+03dB's) Auto Vol max + Wind Noise cancel + LPF 4kHz + Pre-amp Mic (+21dB=original)+ EQ boosting ~<3kHz (f0~1k4,fb~2,4k, k=1,8)
|
|
|
|
{ "+03dB-6kHz", 6 }, // ALC-> on, (+03dB's) Auto Vol max + Wind Noise cancel + LPF 6kHz + Pre-amp Mic (+21dB=original)
|
|
|
|
{ "+00dB-6kHz", 7 }, // ALC-> on, (+00dB's) Auto Vol max + Wind Noise cancel + LPF 6kHz + Pre-amp Mic (+21dB=original)
|
|
|
|
{ "-03dB-6kHz", 8 }, // ALC-> on, (-03dB's) Auto Vol max + Wind Noise cancel + LPF 6kHz + Pre-amp Mic (+21dB=original)
|
|
|
|
{ "-06dB-6kHz", 9 }, // ALC-> on, (-06dB's) Auto Vol max + Wind Noise cancel + LPF 6kHz + Pre-amp Mic (+21dB=original)
|
|
|
|
{ "-09dB-6kHz", 10 }, // ALC-> on, (-09dB's) Auto Vol max + Wind Noise cancel + LPF 6kHz - Pre-amp MIC -3dB (18dB's)
|
|
|
|
{ "-12dB-6kHz", 11 }, // ALC-> on, (-12dB's) Auto Vol max + Wind Noise cancel + LPF 6kHz - Pre-amp MIC -6dB (15dB's)
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2022-09-28 22:42:33 +02:00
|
|
|
OptionsField options_wm8731_boost_mode {
|
|
|
|
{ 22 * 8, 1 * 8 }, // Coordinates are: int:x (px), int:y (px)
|
2022-10-02 00:51:12 +02:00
|
|
|
5,
|
2022-09-28 22:42:33 +02:00
|
|
|
{
|
2022-10-02 00:51:12 +02:00
|
|
|
{ "ON +12dB", 0 }, // WM8731 Mic Boost ON ,original+12dBs condition, easy to saturate ADC sat in high voice ,relative G = +12 dB's respect ref level
|
|
|
|
{ "ON +06dB", 1 }, // WM8731 Mic Boost ON ,original+6 dBs condition, easy to saturate ADC sat in high voice ,relative G = +06 dB's respect ref level
|
|
|
|
{ "OFF+04dB", 2 }, // WM8731 Mic Boost OFF to avoid ADC sat in high voice ,relative G = +04 dB's (respect ref level) , always effective sampling 24khz
|
|
|
|
{ "OFF-02dB", 3 }, // WM8731 Mic Boost OFF to avoid ADC sat in high voice ,relative G = -02 dB's (respect ref level)
|
|
|
|
{ "OFF-08dB", 4 }, // WM8731 Mic Boost OFF to avoid ADC sat in high voice ,relative G = -12 dB's (respect ref level)
|
2022-09-28 22:42:33 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-11-09 20:02:34 +00:00
|
|
|
FrequencyField field_frequency {
|
2020-08-24 01:53:34 +08:00
|
|
|
{ 5 * 8, 3 * 8 },
|
2017-11-09 20:02:34 +00:00
|
|
|
};
|
|
|
|
NumberField field_bw {
|
2022-10-16 19:01:05 +02:00
|
|
|
{ 23 * 8, 3 * 8 },
|
2017-11-09 20:02:34 +00:00
|
|
|
3,
|
|
|
|
{ 0, 150 },
|
|
|
|
1,
|
|
|
|
' '
|
|
|
|
};
|
|
|
|
|
2020-08-21 23:18:53 +08:00
|
|
|
NumberField field_rfgain {
|
2020-08-24 01:53:34 +08:00
|
|
|
{ 8 * 8, 5 * 8 },
|
2020-08-21 23:18:53 +08:00
|
|
|
2,
|
|
|
|
{ 0, 47 },
|
|
|
|
1,
|
|
|
|
' '
|
|
|
|
};
|
|
|
|
NumberField field_rfamp {
|
2020-08-24 01:53:34 +08:00
|
|
|
{ 15 * 8, 5 * 8 },
|
2020-08-21 23:18:53 +08:00
|
|
|
2,
|
|
|
|
{ 0, 14 },
|
|
|
|
14,
|
|
|
|
' '
|
|
|
|
};
|
2021-03-21 20:11:40 -05:00
|
|
|
|
|
|
|
OptionsField options_mode {
|
|
|
|
{ 24 * 8, 5 * 8 },
|
2022-10-16 19:01:05 +02:00
|
|
|
4,
|
2021-03-21 20:11:40 -05:00
|
|
|
{
|
2022-10-16 19:01:05 +02:00
|
|
|
{ "NFM/FM", 0 },
|
|
|
|
{ " WFM ", 1 },
|
2022-10-29 16:02:08 +02:00
|
|
|
{ " AM ", 2 }, // in fact that TX mode = AM -DSB with carrier .
|
2022-10-16 19:01:05 +02:00
|
|
|
{ " USB ", 3 },
|
|
|
|
{ " LSB ", 4 },
|
2022-10-29 16:02:08 +02:00
|
|
|
{ "DSB-SC", 5 } // We are TX Double Side AM Band with suppressed carrier, and allowing in RX both indep SSB lateral band (USB/LSB).
|
2021-03-21 20:11:40 -05:00
|
|
|
}
|
|
|
|
};
|
2020-08-22 14:57:55 +08:00
|
|
|
/*
|
2017-03-14 07:24:04 +00:00
|
|
|
Checkbox check_va {
|
2020-08-21 23:18:53 +08:00
|
|
|
{ 3 * 8, (10 * 8) - 4 },
|
2017-03-14 07:24:04 +00:00
|
|
|
7,
|
2017-11-09 20:02:34 +00:00
|
|
|
"Voice activation",
|
2017-03-14 07:24:04 +00:00
|
|
|
false
|
|
|
|
};
|
2020-08-22 14:57:55 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
OptionsField field_va {
|
2020-08-24 01:53:34 +08:00
|
|
|
{ 17 * 8, 8 * 8 },
|
2020-08-22 14:57:55 +08:00
|
|
|
3,
|
|
|
|
{
|
|
|
|
{" OFF", 0},
|
|
|
|
{" PTT", 1},
|
|
|
|
{"AUTO", 2}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-03-14 07:24:04 +00:00
|
|
|
NumberField field_va_level {
|
2020-08-24 01:53:34 +08:00
|
|
|
{ 8 * 8, 10 * 8 },
|
2017-03-14 07:24:04 +00:00
|
|
|
3,
|
|
|
|
{ 0, 255 },
|
|
|
|
2,
|
|
|
|
' '
|
|
|
|
};
|
|
|
|
NumberField field_va_attack {
|
2020-08-24 01:53:34 +08:00
|
|
|
{ 16 * 8, 10 * 8 },
|
2017-03-14 07:24:04 +00:00
|
|
|
3,
|
|
|
|
{ 0, 999 },
|
|
|
|
20,
|
|
|
|
' '
|
|
|
|
};
|
|
|
|
NumberField field_va_decay {
|
2020-08-24 01:53:34 +08:00
|
|
|
{ 24 * 8, 10 * 8 },
|
2017-03-14 07:24:04 +00:00
|
|
|
4,
|
|
|
|
{ 0, 9999 },
|
|
|
|
100,
|
|
|
|
' '
|
|
|
|
};
|
|
|
|
|
2017-11-09 20:02:34 +00:00
|
|
|
OptionsField options_tone_key {
|
2020-08-24 01:53:34 +08:00
|
|
|
{ 10 * 8, ( 15 * 8 ) - 2 },
|
2017-11-09 20:02:34 +00:00
|
|
|
23,
|
2017-03-14 07:24:04 +00:00
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
|
|
|
Checkbox check_rogerbeep {
|
2023-04-04 17:26:45 +02:00
|
|
|
{ 3 * 8, ( 16 * 8 ) + 7 },
|
2017-03-14 07:24:04 +00:00
|
|
|
10,
|
|
|
|
"Roger beep",
|
|
|
|
false
|
|
|
|
};
|
2020-08-07 00:19:37 -03:00
|
|
|
|
|
|
|
Checkbox check_rxactive {
|
2020-08-24 01:53:34 +08:00
|
|
|
{ 3 * 8, ( 21 * 8 ) - 4 },
|
2023-04-04 17:26:45 +02:00
|
|
|
18, // it was 8, but if it is string size should be 18
|
2020-08-07 00:19:37 -03:00
|
|
|
"RX audio listening",
|
|
|
|
false
|
|
|
|
};
|
|
|
|
|
2023-04-04 17:26:45 +02:00
|
|
|
Checkbox check_common_freq_tx_rx {
|
|
|
|
{ 18 * 8, ( 16* 8 ) + 7 },
|
|
|
|
8,
|
|
|
|
"F = F_RX",
|
|
|
|
false
|
|
|
|
};
|
|
|
|
|
2020-08-07 00:19:37 -03:00
|
|
|
NumberField field_volume {
|
2022-03-05 21:39:53 +01:00
|
|
|
{ 11* 8, 23 * 8 },
|
2020-08-07 00:19:37 -03:00
|
|
|
2,
|
|
|
|
{ 0, 99 },
|
|
|
|
1,
|
|
|
|
' ',
|
|
|
|
};
|
2017-03-14 07:24:04 +00:00
|
|
|
|
2021-03-21 20:11:40 -05:00
|
|
|
OptionsField field_rxbw {
|
2022-10-29 16:02:08 +02:00
|
|
|
{ 19* 8, 23 * 8},
|
2021-03-21 20:11:40 -05:00
|
|
|
3,
|
|
|
|
{
|
2022-10-29 16:02:08 +02:00
|
|
|
{" NFM1:8k5 ", 0},
|
|
|
|
{" NFM2:11k ", 1},
|
|
|
|
{" FM :16k ", 2},
|
2022-10-16 19:01:05 +02:00
|
|
|
}
|
2021-03-21 20:11:40 -05:00
|
|
|
};
|
|
|
|
|
2020-08-07 00:19:37 -03:00
|
|
|
NumberField field_squelch {
|
2023-04-04 17:26:45 +02:00
|
|
|
{ 23 * 8, 25 * 8 },
|
2020-08-07 00:19:37 -03:00
|
|
|
2,
|
|
|
|
{ 0, 99 },
|
|
|
|
1,
|
|
|
|
' ',
|
|
|
|
};
|
|
|
|
|
2020-08-23 17:41:31 +08:00
|
|
|
FrequencyField field_rxfrequency {
|
2023-04-04 17:26:45 +02:00
|
|
|
{ 10 * 8, 25 * 8 },
|
2020-08-23 17:41:31 +08:00
|
|
|
};
|
|
|
|
|
2020-08-22 14:57:55 +08:00
|
|
|
NumberField field_rxlna {
|
2020-08-24 01:53:34 +08:00
|
|
|
{ 9 * 8, 27 * 8 },
|
2020-08-22 14:57:55 +08:00
|
|
|
2,
|
|
|
|
{ 0, 40 },
|
|
|
|
8,
|
|
|
|
' ',
|
|
|
|
};
|
|
|
|
|
|
|
|
NumberField field_rxvga {
|
2020-08-24 01:53:34 +08:00
|
|
|
{ 16 * 8, 27 * 8 },
|
2020-08-22 14:57:55 +08:00
|
|
|
2,
|
|
|
|
{ 0, 62 },
|
|
|
|
2,
|
|
|
|
' ',
|
|
|
|
};
|
|
|
|
|
|
|
|
NumberField field_rxamp {
|
2023-04-04 17:26:45 +02:00
|
|
|
{ 24 * 8, 27 * 8 },
|
2020-08-23 17:41:31 +08:00
|
|
|
1,
|
|
|
|
{ 0, 1 },
|
|
|
|
1,
|
2020-08-22 14:57:55 +08:00
|
|
|
' ',
|
|
|
|
};
|
|
|
|
|
2020-08-24 11:02:42 +08:00
|
|
|
Button tx_button {
|
2020-08-24 01:53:34 +08:00
|
|
|
{ 10 * 8, 30 * 8, 10 * 8, 5 * 8 },
|
2020-08-24 11:02:42 +08:00
|
|
|
"TX",
|
|
|
|
true
|
2017-03-14 07:24:04 +00:00
|
|
|
};
|
2020-08-07 00:19:37 -03:00
|
|
|
|
|
|
|
|
2017-03-14 07:24:04 +00:00
|
|
|
MessageHandlerRegistration message_handler_lcd_sync {
|
|
|
|
Message::ID::DisplayFrameSync,
|
|
|
|
[this](const Message* const) {
|
|
|
|
this->do_timing();
|
2020-08-07 00:19:37 -03:00
|
|
|
this->update_vumeter();
|
2017-03-14 07:24:04 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
MessageHandlerRegistration message_handler_audio_level {
|
2017-08-29 09:42:04 +01:00
|
|
|
Message::ID::AudioLevelReport,
|
2017-03-14 07:24:04 +00:00
|
|
|
[this](const Message* const p) {
|
2017-08-29 09:42:04 +01:00
|
|
|
const auto message = static_cast<const AudioLevelReportMessage*>(p);
|
2017-03-14 07:24:04 +00:00
|
|
|
this->audio_level = message->value;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-09-24 20:05:42 +01:00
|
|
|
MessageHandlerRegistration message_handler_tx_progress {
|
|
|
|
Message::ID::TXProgress,
|
2017-03-14 07:24:04 +00:00
|
|
|
[this](const Message* const p) {
|
2017-09-24 20:05:42 +01:00
|
|
|
const auto message = *reinterpret_cast<const TXProgressMessage*>(p);
|
2017-11-09 20:02:34 +00:00
|
|
|
this->on_tx_progress(message.done);
|
2017-03-14 07:24:04 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace ui */
|
|
|
|
|
|
|
|
#endif/*__UI_MICTX_H__*/
|