Trigger stop function on press of RTN

This commit is contained in:
Peter Feerick
2021-09-17 10:44:24 +02:00
committed by Raphael Coeffic
parent de680aea3f
commit 0311c65dda
2 changed files with 11 additions and 0 deletions
@@ -206,6 +206,16 @@ RadioSpectrumAnalyser::RadioSpectrumAnalyser(uint8_t moduleIdx) :
start();
}
#if defined(HARDWARE_KEYS)
void RadioSpectrumAnalyser::onEvent(event_t event)
{
if (event == EVT_KEY_LONG(KEY_EXIT) || event == EVT_KEY_BREAK(KEY_EXIT)) {
stop();
}
Page::onEvent(event);
}
#endif
void RadioSpectrumAnalyser::buildHeader(Window * window)
{
new StaticText(window, {PAGE_TITLE_LEFT, PAGE_TITLE_TOP + 10, LCD_W - PAGE_TITLE_LEFT, PAGE_LINE_HEIGHT}, STR_MENU_SPECTRUM_ANALYSER, 0, COLOR_THEME_SECONDARY1);
@@ -27,6 +27,7 @@ class RadioSpectrumAnalyser: public Page
{
public:
explicit RadioSpectrumAnalyser(uint8_t moduleIdx);
void onEvent(event_t event) override;
protected:
uint8_t moduleIdx;