diff --git a/button.h b/button.h new file mode 100644 index 0000000..43d6bef --- /dev/null +++ b/button.h @@ -0,0 +1,9 @@ +#pragma once + +struct Button { + int x, y, w, h; + unsigned int id; + char text[5]; + char morse; + void (*morse_status)(int8_t* val_out);//-1 if a low tone should play, +1 if a high tone should play +}; \ No newline at end of file diff --git a/ubitx_ui.cpp b/ubitx_ui.cpp index 4e0b0b8..e58b3bb 100644 --- a/ubitx_ui.cpp +++ b/ubitx_ui.cpp @@ -1,4 +1,5 @@ #include +#include "button.h" #include "morse.h" #include "nano_gui.h" #include "settings.h" @@ -79,14 +80,6 @@ enum btn_set_e { BUTTON_TOTAL }; -struct Button { - int x, y, w, h; - unsigned int id; - char text[5]; - char morse; - void (*morse_status)(int8_t* val_out);//-1 if a low tone should play, +1 if a high tone should play -}; - void msVfoA(int8_t* val_out){ *val_out = (Vfo_e::VFO_A == globalSettings.activeVfo) ? 1 : -1; }