mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-18 10:51:54 +03:00
23ff6723cf
* bt: update connection parameters * bt: set correct connection latency and timeout * gui popup: add clean method * furi_hal_bt: add connection parameters request, clear database * bt: add forget bonded devices API * bt_settings: add forget bonded devices GUI * bt: rework pin code show with view port to hide view * bt: support conn parameters for different profiles * furi_hal_bt: sync f6 target * target f6: fix build * bt: format sources * furi_hal_bt: update connection parameters * bt: update connection params, fix GUI * FuriHal: fix spelling * Refactoring: rename _clean to _reset Co-authored-by: あく <alleteam@gmail.com>
34 lines
671 B
C++
34 lines
671 B
C++
#include "submenu_vm.h"
|
|
|
|
SubmenuVM::SubmenuVM() {
|
|
submenu = submenu_alloc();
|
|
}
|
|
|
|
SubmenuVM::~SubmenuVM() {
|
|
submenu_free(submenu);
|
|
}
|
|
|
|
View* SubmenuVM::get_view() {
|
|
return submenu_get_view(submenu);
|
|
}
|
|
|
|
void SubmenuVM::clean() {
|
|
submenu_reset(submenu);
|
|
}
|
|
|
|
void SubmenuVM::add_item(
|
|
const char* label,
|
|
uint32_t index,
|
|
SubmenuItemCallback callback,
|
|
void* callback_context) {
|
|
submenu_add_item(submenu, label, index, callback, callback_context);
|
|
}
|
|
|
|
void SubmenuVM::set_selected_item(uint32_t index) {
|
|
submenu_set_selected_item(submenu, index);
|
|
}
|
|
|
|
void SubmenuVM::set_header(const char* header) {
|
|
submenu_set_header(submenu, header);
|
|
}
|