mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-25 07:19:28 -05:00
fix wrong cast in morse app (#2436)
* fix wrong cast * sorry, forgot to use enum
This commit is contained in:
parent
84dcfe29a7
commit
55525ed4ad
@ -232,9 +232,8 @@ MorseView::MorseView(
|
|||||||
set_foxhunt(foxhunt_code);
|
set_foxhunt(foxhunt_code);
|
||||||
};
|
};
|
||||||
|
|
||||||
options_modulation.on_change = [this](size_t i, int32_t value) {
|
options_modulation.on_change = [this](size_t, OptionsField::value_t v) {
|
||||||
(void)i; // avoid unused warning
|
mode_cw = (bool)v;
|
||||||
mode_cw = (bool)value;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
options_loop.on_change = [this](size_t i, uint32_t value) {
|
options_loop.on_change = [this](size_t i, uint32_t value) {
|
||||||
|
@ -41,6 +41,11 @@ using namespace morse;
|
|||||||
|
|
||||||
namespace ui::external_app::morse_tx {
|
namespace ui::external_app::morse_tx {
|
||||||
|
|
||||||
|
enum Modulation {
|
||||||
|
FM = 0,
|
||||||
|
CW = 1
|
||||||
|
};
|
||||||
|
|
||||||
class MorseView : public View {
|
class MorseView : public View {
|
||||||
public:
|
public:
|
||||||
MorseView(NavigationView& nav);
|
MorseView(NavigationView& nav);
|
||||||
@ -137,8 +142,8 @@ class MorseView : public View {
|
|||||||
OptionsField options_modulation{
|
OptionsField options_modulation{
|
||||||
{15 * 8, 10 * 8},
|
{15 * 8, 10 * 8},
|
||||||
2,
|
2,
|
||||||
{{"CW", true},
|
{{"CW", Modulation::CW},
|
||||||
{"FM", false}}};
|
{"FM", Modulation::FM}}};
|
||||||
|
|
||||||
OptionsField options_loop{
|
OptionsField options_loop{
|
||||||
{9 * 8, 12 * 8},
|
{9 * 8, 12 * 8},
|
||||||
|
Loading…
Reference in New Issue
Block a user