mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Fix BT CLI unsatisfied imports
This commit is contained in:
@@ -23,7 +23,7 @@ App(
|
||||
apptype=FlipperAppType.PLUGIN,
|
||||
entry_point="bt_cli_plugin_ep",
|
||||
requires=["cli"],
|
||||
sources=["bt_cli.c"],
|
||||
sources=["bt_cli.c", "bt_service/bt_settings_api.c"],
|
||||
)
|
||||
|
||||
App(
|
||||
|
||||
@@ -77,39 +77,3 @@ void bt_keys_storage_set_default_path(Bt* bt) {
|
||||
|
||||
bt_keys_storage_set_file_path(bt->keys_storage, BT_KEYS_STORAGE_PATH);
|
||||
}
|
||||
|
||||
/*
|
||||
* Private API for the Settings app
|
||||
*/
|
||||
|
||||
void bt_get_settings(Bt* bt, BtSettings* settings) {
|
||||
furi_assert(bt);
|
||||
furi_assert(settings);
|
||||
|
||||
BtMessage message = {
|
||||
.lock = api_lock_alloc_locked(),
|
||||
.type = BtMessageTypeGetSettings,
|
||||
.data.settings = settings,
|
||||
};
|
||||
|
||||
furi_check(
|
||||
furi_message_queue_put(bt->message_queue, &message, FuriWaitForever) == FuriStatusOk);
|
||||
|
||||
api_lock_wait_unlock_and_free(message.lock);
|
||||
}
|
||||
|
||||
void bt_set_settings(Bt* bt, const BtSettings* settings) {
|
||||
furi_assert(bt);
|
||||
furi_assert(settings);
|
||||
|
||||
BtMessage message = {
|
||||
.lock = api_lock_alloc_locked(),
|
||||
.type = BtMessageTypeSetSettings,
|
||||
.data.csettings = settings,
|
||||
};
|
||||
|
||||
furi_check(
|
||||
furi_message_queue_put(bt->message_queue, &message, FuriWaitForever) == FuriStatusOk);
|
||||
|
||||
api_lock_wait_unlock_and_free(message.lock);
|
||||
}
|
||||
|
||||
37
applications/services/bt/bt_service/bt_settings_api.c
Normal file
37
applications/services/bt/bt_service/bt_settings_api.c
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "bt_i.h"
|
||||
|
||||
/*
|
||||
* Private API for the Settings app
|
||||
*/
|
||||
|
||||
void bt_get_settings(Bt* bt, BtSettings* settings) {
|
||||
furi_assert(bt);
|
||||
furi_assert(settings);
|
||||
|
||||
BtMessage message = {
|
||||
.lock = api_lock_alloc_locked(),
|
||||
.type = BtMessageTypeGetSettings,
|
||||
.data.settings = settings,
|
||||
};
|
||||
|
||||
furi_check(
|
||||
furi_message_queue_put(bt->message_queue, &message, FuriWaitForever) == FuriStatusOk);
|
||||
|
||||
api_lock_wait_unlock_and_free(message.lock);
|
||||
}
|
||||
|
||||
void bt_set_settings(Bt* bt, const BtSettings* settings) {
|
||||
furi_assert(bt);
|
||||
furi_assert(settings);
|
||||
|
||||
BtMessage message = {
|
||||
.lock = api_lock_alloc_locked(),
|
||||
.type = BtMessageTypeSetSettings,
|
||||
.data.csettings = settings,
|
||||
};
|
||||
|
||||
furi_check(
|
||||
furi_message_queue_put(bt->message_queue, &message, FuriWaitForever) == FuriStatusOk);
|
||||
|
||||
api_lock_wait_unlock_and_free(message.lock);
|
||||
}
|
||||
@@ -4,4 +4,4 @@
|
||||
// Then, we still use the Header from original code as if nothing happened
|
||||
|
||||
// bt_get_settings(), bt_set_settings()
|
||||
#include <applications/services/bt/bt_service/bt_api.c>
|
||||
#include <applications/services/bt/bt_service/bt_settings_api.c>
|
||||
Reference in New Issue
Block a user