2017-03-14 03:24:04 -04:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
|
|
|
|
* Copyright (C) 2016 Furrtek
|
2024-02-10 10:56:50 -05:00
|
|
|
* Copyright (C) 2024 Mark Thompson
|
2017-03-14 03:24:04 -04:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2023-07-04 19:26:26 -04:00
|
|
|
// TODO: Consolidate Modulation/Bandwidth modes/settings with freqman/receiver_model.
|
|
|
|
|
2017-03-14 03:24:04 -04:00
|
|
|
#ifndef __UI_MICTX_H__
|
|
|
|
#define __UI_MICTX_H__
|
|
|
|
|
2023-06-11 14:47:13 -04:00
|
|
|
#include "app_settings.hpp"
|
2023-06-14 03:57:20 -04:00
|
|
|
#include "radio_state.hpp"
|
2017-03-14 03:24:04 -04:00
|
|
|
#include "ui.hpp"
|
|
|
|
#include "ui_widget.hpp"
|
|
|
|
#include "ui_navigation.hpp"
|
|
|
|
#include "ui_receiver.hpp"
|
|
|
|
#include "transmitter_model.hpp"
|
2017-11-09 15:02:34 -05:00
|
|
|
#include "message.hpp"
|
2020-08-06 23:19:37 -04:00
|
|
|
#include "receiver_model.hpp"
|
2023-05-17 06:26:14 -04:00
|
|
|
#include "ui_transmitter.hpp"
|
2017-03-14 03:24:04 -04:00
|
|
|
|
|
|
|
namespace ui {
|
|
|
|
|
|
|
|
class MicTXView : public View {
|
2023-05-18 16:16:05 -04:00
|
|
|
public:
|
|
|
|
MicTXView(NavigationView& nav);
|
2023-07-04 19:26:26 -04:00
|
|
|
MicTXView(NavigationView& nav, ReceiverModel::settings_t override);
|
2023-05-18 16:16:05 -04:00
|
|
|
~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 :(
|
|
|
|
// This is the old "RIGHT BUTTON" method.
|
|
|
|
/*
|
|
|
|
bool on_key(const KeyEvent key) {
|
|
|
|
if ((key == KeyEvent::Right) && (!va_enabled) && ptt_enabled) {
|
|
|
|
set_tx(true);
|
|
|
|
return true;
|
|
|
|
} else
|
|
|
|
return false;
|
|
|
|
};
|
|
|
|
*/
|
|
|
|
|
|
|
|
std::string title() const override { return "Microphone"; };
|
|
|
|
|
|
|
|
private:
|
|
|
|
static constexpr uint32_t sampling_rate = 1536000U;
|
|
|
|
static constexpr uint32_t lcd_frame_duration = (256 * 1000UL) / 60; // 1 frame @ 60fps in ms .8 fixed point /60
|
|
|
|
|
|
|
|
void update_vumeter();
|
2023-10-31 18:31:10 -04:00
|
|
|
bool tx_button_held();
|
2023-05-18 16:16:05 -04:00
|
|
|
void do_timing();
|
|
|
|
void set_tx(bool enable);
|
|
|
|
void on_tx_progress(const bool done);
|
2023-10-31 18:31:10 -04:00
|
|
|
void update_tx_icon();
|
|
|
|
uint8_t shift_bits(void);
|
2023-05-18 16:16:05 -04:00
|
|
|
void configure_baseband();
|
2023-10-31 18:31:10 -04:00
|
|
|
void set_rxbw_options(void);
|
|
|
|
void set_rxbw_defaults(bool use_app_settings);
|
|
|
|
void update_receiver_rxbw(void);
|
2023-05-18 16:16:05 -04:00
|
|
|
void rxaudio(bool is_on);
|
|
|
|
|
2023-06-14 03:57:20 -04:00
|
|
|
RxRadioState rx_radio_state_{};
|
|
|
|
TxRadioState tx_radio_state_{
|
2023-10-14 12:33:52 -04:00
|
|
|
0 /* frequency */,
|
2023-06-14 03:57:20 -04:00
|
|
|
1750000 /* bandwidth */,
|
|
|
|
sampling_rate /* sampling rate */
|
|
|
|
};
|
2023-06-11 14:47:13 -04:00
|
|
|
|
2023-10-31 18:31:10 -04:00
|
|
|
enum Mic_Modulation : uint32_t {
|
|
|
|
MIC_MOD_NFM = 0,
|
|
|
|
MIC_MOD_WFM = 1,
|
|
|
|
MIC_MOD_AM = 2,
|
|
|
|
MIC_MOD_USB = 3,
|
|
|
|
MIC_MOD_LSB = 4,
|
|
|
|
MIC_MOD_DSB = 5,
|
|
|
|
};
|
|
|
|
|
|
|
|
// Settings
|
|
|
|
uint32_t mic_mod_index{0};
|
|
|
|
uint32_t rxbw_index{0};
|
2023-05-18 16:16:05 -04:00
|
|
|
bool va_enabled{false};
|
|
|
|
bool rogerbeep_enabled{false};
|
2023-10-20 19:43:22 -04:00
|
|
|
bool mic_to_HP_enabled{false};
|
2023-05-18 16:16:05 -04:00
|
|
|
bool bool_same_F_tx_rx_enabled{false};
|
2023-10-31 18:31:10 -04:00
|
|
|
rf::Frequency rx_frequency{0};
|
2023-05-18 16:16:05 -04:00
|
|
|
bool rx_enabled{false};
|
2023-10-31 18:31:10 -04:00
|
|
|
uint32_t tone_key_index{0};
|
|
|
|
uint32_t mic_gain_x10{1};
|
2023-05-18 16:16:05 -04:00
|
|
|
uint8_t ak4951_alc_and_wm8731_boost_GUI{0};
|
2023-10-31 18:31:10 -04:00
|
|
|
uint32_t va_level{40};
|
|
|
|
uint32_t attack_ms{500};
|
|
|
|
uint32_t decay_ms{1000};
|
2024-02-03 18:57:45 -05:00
|
|
|
uint8_t iq_phase_calibration_value{15};
|
2023-10-31 18:31:10 -04:00
|
|
|
app_settings::SettingsManager settings_{
|
|
|
|
"tx_mic",
|
|
|
|
app_settings::Mode::RX_TX,
|
|
|
|
{
|
|
|
|
{"mic_mod_index"sv, &mic_mod_index},
|
|
|
|
{"rxbw_index"sv, &rxbw_index},
|
|
|
|
{"same_F_tx_rx"sv, &bool_same_F_tx_rx_enabled},
|
|
|
|
{"mic_rx_frequency"sv, &rx_frequency},
|
|
|
|
{"rx_enabled"sv, &rx_enabled},
|
|
|
|
{"mic_gain_x10"sv, &mic_gain_x10},
|
|
|
|
{"mic_to_HP"sv, &mic_to_HP_enabled},
|
|
|
|
{"alc_and_boost"sv, &ak4951_alc_and_wm8731_boost_GUI},
|
|
|
|
{"va_level"sv, &va_level},
|
|
|
|
{"attack_ms"sv, &attack_ms},
|
|
|
|
{"decay_ms"sv, &decay_ms},
|
|
|
|
{"vox"sv, &va_enabled},
|
|
|
|
{"rogerbeep"sv, &rogerbeep_enabled},
|
|
|
|
{"tone_key_index"sv, &tone_key_index},
|
2024-02-03 18:57:45 -05:00
|
|
|
{"iq_phase_calibration"sv, &iq_phase_calibration_value},
|
2023-10-31 18:31:10 -04:00
|
|
|
}};
|
|
|
|
|
|
|
|
rf::Frequency tx_frequency{0};
|
|
|
|
bool transmitting{false};
|
2023-05-18 16:16:05 -04:00
|
|
|
uint32_t audio_level{0};
|
|
|
|
uint32_t attack_timer{0};
|
|
|
|
uint32_t decay_timer{0};
|
|
|
|
int32_t tx_gain{47};
|
|
|
|
bool rf_amp{false};
|
|
|
|
int32_t focused_ui{2};
|
|
|
|
bool button_touch{false};
|
|
|
|
|
2023-10-31 18:31:10 -04:00
|
|
|
Labels labels_both{
|
2023-05-18 16:16:05 -04:00
|
|
|
{{3 * 8, 1 * 8}, "MIC-GAIN:", Color::light_grey()},
|
|
|
|
{{3 * 8, 3 * 8}, "F:", Color::light_grey()},
|
|
|
|
{{15 * 8, 3 * 8}, "FM TXBW: kHz", Color::light_grey()}, // to be more symetric and consistent to the below FM RXBW
|
2023-07-04 19:26:26 -04:00
|
|
|
{{18 * 8, (5 * 8)}, "Mode:", Color::light_grey()}, // now, no need to handle GAIN, Amp here It is handled by ui_transmitter.cpp
|
2023-05-18 16:16:05 -04:00
|
|
|
{{4 * 8, 10 * 8}, "LVL:", Color::light_grey()}, // we delete { {11 * 8, 5 * 8 }, "Amp:", Color::light_grey() },
|
|
|
|
{{12 * 8, 10 * 8}, "ATT:", Color::light_grey()},
|
|
|
|
{{20 * 8, 10 * 8}, "DEC:", Color::light_grey()},
|
2023-05-27 12:13:17 -04:00
|
|
|
{{3 * 8, (13 * 8) - 5}, "TONE KEY:", Color::light_grey()},
|
|
|
|
{{3 * 8, (18 * 8) - 1}, "======== Receiver ========", Color::green()},
|
|
|
|
{{5 * 8, (23 * 8) + 2}, "VOL:", Color::light_grey()},
|
|
|
|
{{14 * 8, (23 * 8) + 2}, "RXBW:", Color::light_grey()}, // we remove the label "FM" because we will display all MOD types RX_BW.
|
|
|
|
{{20 * 8, (25 * 8) + 2}, "SQ:", Color::light_grey()},
|
|
|
|
{{5 * 8, (25 * 8) + 2}, "F_RX:", Color::light_grey()},
|
|
|
|
{{5 * 8, (27 * 8) + 2}, "LNA:", Color::light_grey()},
|
|
|
|
{{12 * 8, (27 * 8) + 2}, "VGA:", Color::light_grey()},
|
2024-02-03 18:57:45 -05:00
|
|
|
{{19 * 8, (27 * 8) + 2}, "AMP:", Color::light_grey()},
|
|
|
|
{{21 * 8, (31 * 8)}, "TX-IQ-CAL:", Color::light_grey()}};
|
2023-10-31 18:31:10 -04:00
|
|
|
Labels labels_WM8731{
|
|
|
|
{{17 * 8, 1 * 8}, "Boost", Color::light_grey()}};
|
2023-05-18 16:16:05 -04:00
|
|
|
Labels labels_AK4951{
|
2023-10-31 18:31:10 -04:00
|
|
|
{{17 * 8, 1 * 8}, "ALC", Color::light_grey()}};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
VuMeter vumeter{
|
|
|
|
{0 * 8, 1 * 8, 2 * 8, 33 * 8},
|
|
|
|
12,
|
|
|
|
true};
|
|
|
|
|
|
|
|
OptionsField options_gain{
|
|
|
|
{12 * 8, 1 * 8},
|
|
|
|
4,
|
|
|
|
{{"x0.5", 5},
|
|
|
|
{"x1.0", 10},
|
|
|
|
{"x1.5", 15},
|
|
|
|
{"x2.0", 20}}};
|
|
|
|
|
|
|
|
OptionsField options_ak4951_alc_mode{
|
2023-07-04 19:26:26 -04:00
|
|
|
{20 * 8, 1 * 8},
|
2023-07-17 10:29:24 -04:00
|
|
|
10, // Label has 10 chars
|
2023-05-18 16:16:05 -04:00
|
|
|
{
|
2023-07-04 19:26:26 -04:00
|
|
|
{" OFF-12kHz", 0}, // Nothing changed from ORIGINAL, keeping ALL programmable AK4951 Digital Block->OFF, sampling 24Khz)
|
2023-05-18 16:16:05 -04: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)
|
2023-07-04 19:26:26 -04:00
|
|
|
{"+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)
|
2023-05-18 16:16:05 -04:00
|
|
|
{"+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)
|
|
|
|
}};
|
|
|
|
|
|
|
|
OptionsField options_wm8731_boost_mode{
|
2023-07-04 19:26:26 -04:00
|
|
|
{22 * 8, 1 * 8},
|
2023-07-17 10:29:24 -04:00
|
|
|
8, // Label has 8 chars
|
2023-05-18 16:16:05 -04:00
|
|
|
{
|
2023-07-04 19:26:26 -04: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)
|
2023-05-18 16:16:05 -04:00
|
|
|
}};
|
|
|
|
|
2023-06-18 15:11:04 -04:00
|
|
|
// TODO: Use TxFrequencyField
|
2023-05-18 16:16:05 -04:00
|
|
|
FrequencyField field_frequency{
|
|
|
|
{5 * 8, 3 * 8},
|
|
|
|
};
|
|
|
|
NumberField field_bw{
|
|
|
|
{23 * 8, 3 * 8},
|
|
|
|
3,
|
|
|
|
{0, 150},
|
|
|
|
1,
|
|
|
|
' '};
|
|
|
|
|
|
|
|
TransmitterView2 tx_view{
|
2023-09-18 17:22:46 -04:00
|
|
|
{3 * 8, 5 * 8},
|
|
|
|
/*short_ui*/ false};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
OptionsField options_mode{
|
|
|
|
{24 * 8, 5 * 8},
|
2023-05-27 12:13:17 -04:00
|
|
|
6,
|
2023-05-18 16:16:05 -04:00
|
|
|
{
|
2023-10-31 18:31:10 -04:00
|
|
|
{"NFM/FM", MIC_MOD_NFM},
|
|
|
|
{" WFM ", MIC_MOD_WFM},
|
|
|
|
{" AM ", MIC_MOD_AM}, // in fact that TX mode = AM -DSB with carrier.
|
|
|
|
{" USB ", MIC_MOD_USB},
|
|
|
|
{" LSB ", MIC_MOD_LSB},
|
|
|
|
{"DSB-SC", MIC_MOD_DSB} // We are TX Double Side AM Band with suppressed carrier, and allowing in RX both indep SSB lateral band (USB/LSB).
|
2023-05-18 16:16:05 -04:00
|
|
|
}};
|
|
|
|
|
2023-10-31 18:31:10 -04:00
|
|
|
Checkbox check_va{
|
|
|
|
{3 * 8, 8 * 7},
|
|
|
|
10,
|
|
|
|
"VOX enable",
|
|
|
|
false};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
NumberField field_va_level{
|
|
|
|
{8 * 8, 10 * 8},
|
|
|
|
3,
|
|
|
|
{0, 255},
|
|
|
|
2,
|
|
|
|
' '};
|
|
|
|
NumberField field_va_attack{
|
|
|
|
{16 * 8, 10 * 8},
|
|
|
|
3,
|
|
|
|
{0, 999},
|
|
|
|
20,
|
|
|
|
' '};
|
|
|
|
NumberField field_va_decay{
|
|
|
|
{24 * 8, 10 * 8},
|
|
|
|
4,
|
|
|
|
{0, 9999},
|
|
|
|
100,
|
|
|
|
' '};
|
|
|
|
|
|
|
|
OptionsField options_tone_key{
|
2023-05-27 12:13:17 -04:00
|
|
|
{12 * 8, (13 * 8) - 5},
|
2023-07-02 19:53:51 -04:00
|
|
|
18,
|
2023-05-18 16:16:05 -04:00
|
|
|
{}};
|
|
|
|
|
|
|
|
Checkbox check_rogerbeep{
|
2023-05-27 12:13:17 -04:00
|
|
|
{3 * 8, (14 * 8) + 4},
|
2023-05-18 16:16:05 -04:00
|
|
|
10,
|
|
|
|
"Roger beep",
|
|
|
|
false};
|
|
|
|
|
2023-10-20 19:43:22 -04:00
|
|
|
Checkbox check_mic_to_HP{
|
|
|
|
{18 * 8, (14 * 8) + 4},
|
|
|
|
10,
|
|
|
|
"Hear Mic",
|
|
|
|
false};
|
|
|
|
|
2023-05-18 16:16:05 -04:00
|
|
|
Checkbox check_rxactive{
|
2023-05-27 12:13:17 -04:00
|
|
|
{3 * 8, (21 * 8) - 7},
|
|
|
|
8, // it was 18, but if it is string size should be 8
|
|
|
|
"RX audio",
|
2023-05-18 16:16:05 -04:00
|
|
|
false};
|
|
|
|
|
|
|
|
Checkbox check_common_freq_tx_rx{
|
2023-05-27 12:13:17 -04:00
|
|
|
{18 * 8, (21 * 8) - 7},
|
2023-05-18 16:16:05 -04:00
|
|
|
8,
|
2023-10-31 18:31:10 -04:00
|
|
|
"F RX=TX",
|
2023-05-18 16:16:05 -04:00
|
|
|
false};
|
|
|
|
|
2023-06-04 15:56:46 -04:00
|
|
|
AudioVolumeField field_volume{
|
|
|
|
{9 * 8, (23 * 8) + 2}};
|
2023-05-18 16:16:05 -04:00
|
|
|
|
|
|
|
OptionsField field_rxbw{
|
2023-05-27 12:13:17 -04:00
|
|
|
{19 * 8, (23 * 8) + 2},
|
2023-07-17 10:29:24 -04:00
|
|
|
7,
|
2023-05-18 16:16:05 -04:00
|
|
|
{
|
2023-07-17 10:29:24 -04:00
|
|
|
{" 8k5 ", 0}, // Initial dynamic values when we start Mic App.
|
|
|
|
{" 11k ", 1},
|
|
|
|
{" 16k ", 2},
|
2023-05-18 16:16:05 -04:00
|
|
|
}};
|
|
|
|
|
|
|
|
NumberField field_squelch{
|
2023-05-27 12:13:17 -04:00
|
|
|
{23 * 8, (25 * 8) + 2},
|
2023-05-18 16:16:05 -04:00
|
|
|
2,
|
|
|
|
{0, 99},
|
|
|
|
1,
|
|
|
|
' ',
|
|
|
|
};
|
|
|
|
|
2023-06-18 15:11:04 -04:00
|
|
|
// TODO: Use RxFrequencyField
|
2023-05-18 16:16:05 -04:00
|
|
|
FrequencyField field_rxfrequency{
|
2023-05-27 12:13:17 -04:00
|
|
|
{10 * 8, (25 * 8) + 2},
|
2023-05-18 16:16:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
NumberField field_rxlna{
|
2023-05-27 12:13:17 -04:00
|
|
|
{9 * 8, (27 * 8) + 2},
|
2023-05-18 16:16:05 -04:00
|
|
|
2,
|
|
|
|
{0, 40},
|
|
|
|
8,
|
|
|
|
' ',
|
|
|
|
};
|
|
|
|
|
|
|
|
NumberField field_rxvga{
|
2023-05-27 12:13:17 -04:00
|
|
|
{16 * 8, (27 * 8) + 2},
|
2023-05-18 16:16:05 -04:00
|
|
|
2,
|
|
|
|
{0, 62},
|
|
|
|
2,
|
|
|
|
' ',
|
|
|
|
};
|
|
|
|
|
|
|
|
NumberField field_rxamp{
|
2023-05-27 12:13:17 -04:00
|
|
|
{24 * 8, (27 * 8) + 2},
|
2023-05-18 16:16:05 -04:00
|
|
|
1,
|
|
|
|
{0, 1},
|
|
|
|
1,
|
|
|
|
' ',
|
|
|
|
};
|
|
|
|
|
2024-03-09 18:36:48 -05:00
|
|
|
NumberField field_tx_iq_phase_cal{
|
2024-02-03 18:57:45 -05:00
|
|
|
{24 * 8, (33 * 8)},
|
|
|
|
2,
|
2024-03-09 18:36:48 -05:00
|
|
|
{0, 63}, // 5 or 6 bits IQ CAL phase adjustment (range updated later)
|
2024-02-03 18:57:45 -05:00
|
|
|
1,
|
|
|
|
' ',
|
|
|
|
};
|
|
|
|
|
2023-05-18 16:16:05 -04:00
|
|
|
Button tx_button{
|
|
|
|
{10 * 8, 30 * 8, 10 * 8, 5 * 8},
|
2023-10-31 18:31:10 -04:00
|
|
|
"PTT TX",
|
2023-05-18 16:16:05 -04:00
|
|
|
true};
|
|
|
|
|
2023-10-31 18:31:10 -04:00
|
|
|
Image tx_icon{
|
|
|
|
{6 * 8, 31 * 8 + 4, 16, 16},
|
|
|
|
&bitmap_icon_microphone,
|
|
|
|
Color::black(),
|
|
|
|
Color::black()};
|
|
|
|
|
2023-05-18 16:16:05 -04:00
|
|
|
MessageHandlerRegistration message_handler_lcd_sync{
|
|
|
|
Message::ID::DisplayFrameSync,
|
|
|
|
[this](const Message* const) {
|
|
|
|
this->do_timing();
|
|
|
|
this->update_vumeter();
|
|
|
|
}};
|
|
|
|
|
|
|
|
MessageHandlerRegistration message_handler_audio_level{
|
|
|
|
Message::ID::AudioLevelReport,
|
|
|
|
[this](const Message* const p) {
|
|
|
|
const auto message = static_cast<const AudioLevelReportMessage*>(p);
|
|
|
|
this->audio_level = message->value;
|
|
|
|
}};
|
|
|
|
|
|
|
|
MessageHandlerRegistration message_handler_tx_progress{
|
|
|
|
Message::ID::TXProgress,
|
|
|
|
[this](const Message* const p) {
|
|
|
|
const auto message = *reinterpret_cast<const TXProgressMessage*>(p);
|
|
|
|
this->on_tx_progress(message.done);
|
|
|
|
}};
|
2017-03-14 03:24:04 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace ui */
|
|
|
|
|
2023-05-18 16:16:05 -04:00
|
|
|
#endif /*__UI_MICTX_H__*/
|