mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 08:08:35 -07:00
Revert some settings handling to how they work in OFW
This commit is contained in:
@@ -14,7 +14,7 @@ App(
|
||||
],
|
||||
stack_size=1 * 1024,
|
||||
order=1000,
|
||||
sdk_headers=["bt_service/bt.h", "bt_service/bt_keys_storage.h", "bt_settings.h"],
|
||||
sdk_headers=["bt_service/bt.h", "bt_service/bt_keys_storage.h"],
|
||||
)
|
||||
|
||||
App(
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <ble/ble.h>
|
||||
#include "bt_settings.h"
|
||||
#include "bt_service/bt_i.h"
|
||||
#include "bt_service/bt.h"
|
||||
#include <profiles/serial_profile.h>
|
||||
|
||||
static void bt_cli_command_hci_info(Cli* cli, FuriString* args, void* context) {
|
||||
@@ -181,10 +181,12 @@ static void bt_cli_print_usage(void) {
|
||||
|
||||
static void bt_cli(Cli* cli, FuriString* args, void* context) {
|
||||
UNUSED(context);
|
||||
Bt* bt = furi_record_open(RECORD_BT);
|
||||
furi_record_open(RECORD_BT);
|
||||
|
||||
FuriString* cmd;
|
||||
cmd = furi_string_alloc();
|
||||
BtSettings bt_settings;
|
||||
bt_settings_load(&bt_settings);
|
||||
|
||||
do {
|
||||
if(!args_read_string_and_trim(args, cmd)) {
|
||||
@@ -217,7 +219,7 @@ static void bt_cli(Cli* cli, FuriString* args, void* context) {
|
||||
bt_cli_print_usage();
|
||||
} while(false);
|
||||
|
||||
if(bt->bt_settings.enabled) {
|
||||
if(bt_settings.enabled) {
|
||||
furi_hal_bt_start_advertising();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <bt/bt_settings.h>
|
||||
#include <bt/bt_service/bt_keys_storage.h>
|
||||
|
||||
#define BT_KEYS_STORAGE_PATH CFG_PATH("bt.keys")
|
||||
#include "bt_keys_filename.h"
|
||||
|
||||
typedef enum {
|
||||
BtMessageTypeUpdateStatus,
|
||||
|
||||
5
applications/services/bt/bt_service/bt_keys_filename.h
Normal file
5
applications/services/bt/bt_service/bt_keys_filename.h
Normal file
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#define BT_KEYS_STORAGE_FILE_NAME ".bt.keys"
|
||||
|
||||
#define BT_KEYS_STORAGE_PATH INT_PATH(BT_KEYS_STORAGE_FILE_NAME)
|
||||
@@ -6,8 +6,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define BT_SETTINGS_PATH CFG_PATH("bt.settings")
|
||||
|
||||
typedef struct {
|
||||
bool enabled;
|
||||
} BtSettings;
|
||||
|
||||
5
applications/services/bt/bt_settings_filename.h
Normal file
5
applications/services/bt/bt_settings_filename.h
Normal file
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#define BT_SETTINGS_FILE_NAME ".bt.settings"
|
||||
|
||||
#define BT_SETTINGS_PATH INT_PATH(BT_SETTINGS_FILE_NAME)
|
||||
Reference in New Issue
Block a user