diff --git a/Core/Inc/git_rev.h b/Core/Inc/git_rev.h index bc979d1..6303431 100644 --- a/Core/Inc/git_rev.h +++ b/Core/Inc/git_rev.h @@ -7,6 +7,6 @@ // Auto generated header file containing the last git revision -#define GIT_HASH "b7b396d" +#define GIT_HASH "5f98ee9" #endif //FLOATPUMP_GIT_REVISION_TEMPLATE_H \ No newline at end of file diff --git a/Core/Src/main.cpp b/Core/Src/main.cpp index 1d3aed9..1eb5992 100644 --- a/Core/Src/main.cpp +++ b/Core/Src/main.cpp @@ -173,8 +173,8 @@ int main(void) { Menu mainmenu("Hauptmenu"); - mainmenu.addSubmenu(&tankmenu); - mainmenu.addSubmenu(&refillmenu); + mainmenu.addSubmenu(tankmenu); + mainmenu.addSubmenu(refillmenu); diff --git a/Middlewares/floatpump/Inc/Menu.h b/Middlewares/floatpump/Inc/Menu.h index 82d991d..8be31d7 100644 --- a/Middlewares/floatpump/Inc/Menu.h +++ b/Middlewares/floatpump/Inc/Menu.h @@ -143,9 +143,8 @@ namespace floatpump { } - auto addSubmenu(Menu *submenu) -> void { - submenu->m_parent = this; - m_submenus.push_back(submenu); + auto addSubmenu(Menu &menu) -> void { + m_submenus.emplace_back(std::make_unique