mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-11 16:54:21 -05:00
FrequencyStepView field in TransmitterView class
This commit is contained in:
parent
bf0b9b9881
commit
97f3f773fb
@ -103,6 +103,7 @@ void TransmitterView::set_transmitting(const bool transmitting) {
|
|||||||
|
|
||||||
void TransmitterView::on_show() {
|
void TransmitterView::on_show() {
|
||||||
field_frequency.set_value(transmitter_model.tuning_frequency());
|
field_frequency.set_value(transmitter_model.tuning_frequency());
|
||||||
|
field_frequency_step.set_by_value(receiver_model.frequency_step());
|
||||||
|
|
||||||
field_gain.set_value(transmitter_model.tx_gain());
|
field_gain.set_value(transmitter_model.tx_gain());
|
||||||
field_amp.set_value(transmitter_model.rf_amp() ? 14 : 0);
|
field_amp.set_value(transmitter_model.rf_amp() ? 14 : 0);
|
||||||
@ -122,6 +123,7 @@ TransmitterView::TransmitterView(
|
|||||||
|
|
||||||
add_children({
|
add_children({
|
||||||
&field_frequency,
|
&field_frequency,
|
||||||
|
&field_frequency_step,
|
||||||
&text_gain,
|
&text_gain,
|
||||||
&field_gain,
|
&field_gain,
|
||||||
&button_start,
|
&button_start,
|
||||||
@ -157,6 +159,10 @@ TransmitterView::TransmitterView(
|
|||||||
if (on_edit_frequency)
|
if (on_edit_frequency)
|
||||||
on_edit_frequency();
|
on_edit_frequency();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
field_frequency_step.on_change = [this](size_t, OptionsField::value_t v) {
|
||||||
|
this->field_frequency.set_step(v);
|
||||||
|
};
|
||||||
|
|
||||||
field_gain.on_change = [this](uint32_t tx_gain) {
|
field_gain.on_change = [this](uint32_t tx_gain) {
|
||||||
on_tx_gain_changed(tx_gain);
|
on_tx_gain_changed(tx_gain);
|
||||||
|
Loading…
Reference in New Issue
Block a user