Morse TX loops

This commit is contained in:
Белоусов Олег 2020-09-22 16:12:46 +03:00
parent a5a3ba184a
commit 25ba2f1391
2 changed files with 72 additions and 3 deletions

View file

@ -54,11 +54,13 @@ public:
void paint(Painter& painter) override;
void on_tx_progress(const uint32_t progress, const bool done);
void on_loop_progress(const uint32_t progress, const bool done);
std::string title() const override { return "Morse TX"; };
uint32_t time_unit_ms { 0 };
size_t symbol_count { 0 };
uint32_t loop { 0 };
private:
NavigationView& nav_;
std::string buffer { "PORTAPACK" };
@ -77,12 +79,15 @@ private:
void set_foxhunt(size_t i);
Thread * ookthread { nullptr };
Thread * loopthread { nullptr };
bool foxhunt_mode { false };
bool run { false };
Labels labels {
{ { 4 * 8, 6 * 8 }, "Speed: wps", Color::light_grey() },
{ { 4 * 8, 8 * 8 }, "Tone: Hz", Color::light_grey() },
{ { 4 * 8, 10 * 8 }, "Modulation:", Color::light_grey() },
{ { 4 * 8, 12 * 8 }, "Loop:", Color::light_grey() },
{ { 1 * 8, 25 * 8 }, "TX will last", Color::light_grey() }
};
@ -133,6 +138,20 @@ private:
{ "FM", 1 }
}
};
OptionsField options_loop {
{ 9 * 8, 12 * 8 },
6,
{
{ "Off", 0 },
{ "5 sec", 5 },
{ "10 sec", 10 },
{ "30 sec", 30 },
{ "1 min", 60 },
{ "3 min", 180 },
{ "5 min", 300 }
}
};
Text text_tx_duration {
{ 14 * 8, 25 * 8, 4 * 8, 16 },