2020-02-10 01:01:52 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "button.h"
|
2020-02-10 02:04:47 +01:00
|
|
|
#include "menu.h"
|
2020-02-10 01:01:52 +01:00
|
|
|
|
|
|
|
//Returns true if submenu was run, false otherwise
|
|
|
|
bool runSubmenu(Menu_t* current_menu,
|
|
|
|
void(*const redraw_callback)(),
|
|
|
|
const ButtonPress_e tuner_button,
|
|
|
|
const ButtonPress_e touch_button,
|
|
|
|
const Point touch_point,
|
|
|
|
const int16_t knob);
|
|
|
|
|
2020-02-10 01:16:57 +01:00
|
|
|
//Returns true if button was found, false otherwise
|
|
|
|
bool findPressedButton(const Button *const buttons,
|
|
|
|
const uint8_t num_buttons,
|
|
|
|
Button *const button_out,
|
2020-02-10 02:04:47 +01:00
|
|
|
const Point touch_point);
|
|
|
|
|
|
|
|
enum MorsePlaybackType_e : uint8_t {
|
|
|
|
PlayChar,
|
|
|
|
PlayText
|
|
|
|
};
|
|
|
|
void initSelector(int16_t *const raw_select_val_in_out,
|
|
|
|
const Button *const buttons,
|
|
|
|
const uint8_t num_buttons,
|
|
|
|
const MorsePlaybackType_e);
|
|
|
|
|
|
|
|
void adjustSelector(int16_t *const raw_select_val_in_out,
|
|
|
|
int16_t knob,
|
|
|
|
const Button *const buttons,
|
|
|
|
const uint8_t num_buttons,
|
|
|
|
const MorsePlaybackType_e);
|