mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-08 06:32:35 -04:00
Merged TxButton and Button & minor bug fix
This commit is contained in:
parent
d7568b820d
commit
911eb36210
4 changed files with 38 additions and 140 deletions
|
@ -362,42 +362,42 @@ MicTXView::MicTXView(
|
|||
rx_lna = receiver_model.lna();
|
||||
field_rxlna.on_change = [this](int32_t v) {
|
||||
rx_lna = v;
|
||||
receiver_model.set_lna(v);
|
||||
if(rx_enabled)
|
||||
receiver_model.set_lna(v);
|
||||
};
|
||||
field_rxlna.set_value(rx_lna);
|
||||
|
||||
rx_vga = receiver_model.vga();
|
||||
field_rxvga.on_change = [this](int32_t v) {
|
||||
rx_vga = v;
|
||||
receiver_model.set_vga(v);
|
||||
if(rx_enabled)
|
||||
receiver_model.set_vga(v);
|
||||
};
|
||||
field_rxvga.set_value(rx_vga);
|
||||
|
||||
rx_amp = receiver_model.rf_amp();
|
||||
field_rxamp.on_change = [this](int32_t v) {
|
||||
rx_amp = v;
|
||||
receiver_model.set_rf_amp(rx_amp);
|
||||
if(rx_enabled)
|
||||
receiver_model.set_rf_amp(rx_amp);
|
||||
};
|
||||
field_rxamp.set_value(rx_amp);
|
||||
|
||||
tx_button.on_select = [this](TxButton&) {
|
||||
tx_button.on_select = [this](Button&) {
|
||||
if(ptt_enabled && !transmitting) {
|
||||
button_touch = true;
|
||||
set_tx(true);
|
||||
}
|
||||
};
|
||||
|
||||
tx_button.on_release = [this](TxButton&) {
|
||||
tx_button.on_touch_release = [this](Button&) {
|
||||
if(button_touch) {
|
||||
button_touch = false;
|
||||
set_tx(false);
|
||||
}
|
||||
};
|
||||
|
||||
tx_button.on_buttonpress = [this](TxButton&) {
|
||||
if(ptt_enabled && !transmitting) {
|
||||
set_tx(true);
|
||||
}
|
||||
tx_button.on_touch_press = [this](Button&) {
|
||||
button_touch = true;
|
||||
};
|
||||
|
||||
transmitter_model.set_sampling_rate(sampling_rate);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue