Add TXGainField user interface element.

This commit is contained in:
Jared Boone 2016-08-03 16:14:34 -07:00
parent ef9b4051b7
commit 447a7a5661
2 changed files with 34 additions and 0 deletions

View file

@ -353,4 +353,29 @@ void VGAGainField::on_focus() {
}
}
/* TXGainField **********************************************************/
TXGainField::TXGainField(
Point parent_pos
) : NumberField {
parent_pos, 2,
{ max2837::tx::gain_db_range.minimum, max2837::tx::gain_db_range.maximum },
max2837::tx::gain_db_step,
' ',
}
{
set_value(receiver_model.tx_gain());
on_change = [](int32_t v) {
receiver_model.set_tx_gain(v);
};
}
void TXGainField::on_focus() {
//Widget::on_focus();
if( on_show_options ) {
on_show_options();
}
}
} /* namespace ui */