Merge branch 'ofw_dev' into dev
@ -367,13 +367,13 @@ static void bt_change_profile(Bt* bt, BtMessage* message) {
|
||||
*message->result = false;
|
||||
}
|
||||
}
|
||||
furi_event_flag_set(bt->api_event, BT_API_UNLOCK_EVENT);
|
||||
api_lock_unlock(message->lock);
|
||||
}
|
||||
|
||||
static void bt_close_connection(Bt* bt) {
|
||||
static void bt_close_connection(Bt* bt, BtMessage* message) {
|
||||
bt_close_rpc_connection(bt);
|
||||
furi_hal_bt_stop_advertising();
|
||||
furi_event_flag_set(bt->api_event, BT_API_UNLOCK_EVENT);
|
||||
api_lock_unlock(message->lock);
|
||||
}
|
||||
|
||||
static inline FuriHalBtProfile get_hal_bt_profile(BtProfile profile) {
|
||||
@ -520,7 +520,7 @@ int32_t bt_srv(void* p) {
|
||||
} else if(message.type == BtMessageTypeSetProfile) {
|
||||
bt_change_profile(bt, &message);
|
||||
} else if(message.type == BtMessageTypeDisconnect) {
|
||||
bt_close_connection(bt);
|
||||
bt_close_connection(bt, &message);
|
||||
} else if(message.type == BtMessageTypeForgetBondedDevices) {
|
||||
bt_keys_storage_delete(bt->keys_storage);
|
||||
}
|
||||
|
@ -6,11 +6,14 @@ bool bt_set_profile(Bt* bt, BtProfile profile) {
|
||||
// Send message
|
||||
bool result = false;
|
||||
BtMessage message = {
|
||||
.type = BtMessageTypeSetProfile, .data.profile = profile, .result = &result};
|
||||
.lock = api_lock_alloc_locked(),
|
||||
.type = BtMessageTypeSetProfile,
|
||||
.data.profile = profile,
|
||||
.result = &result};
|
||||
furi_check(
|
||||
furi_message_queue_put(bt->message_queue, &message, FuriWaitForever) == FuriStatusOk);
|
||||
// Wait for unlock
|
||||
furi_event_flag_wait(bt->api_event, BT_API_UNLOCK_EVENT, FuriFlagWaitAny, FuriWaitForever);
|
||||
api_lock_wait_unlock_and_free(message.lock);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -19,11 +22,11 @@ void bt_disconnect(Bt* bt) {
|
||||
furi_assert(bt);
|
||||
|
||||
// Send message
|
||||
BtMessage message = {.type = BtMessageTypeDisconnect};
|
||||
BtMessage message = {.lock = api_lock_alloc_locked(), .type = BtMessageTypeDisconnect};
|
||||
furi_check(
|
||||
furi_message_queue_put(bt->message_queue, &message, FuriWaitForever) == FuriStatusOk);
|
||||
// Wait for unlock
|
||||
furi_event_flag_wait(bt->api_event, BT_API_UNLOCK_EVENT, FuriFlagWaitAny, FuriWaitForever);
|
||||
api_lock_wait_unlock_and_free(message.lock);
|
||||
}
|
||||
|
||||
void bt_set_status_changed_callback(Bt* bt, BtStatusChangedCallback callback, void* context) {
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
#include <api_lock.h>
|
||||
|
||||
#include <gui/gui.h>
|
||||
#include <gui/view_port.h>
|
||||
@ -22,8 +23,6 @@
|
||||
|
||||
#define BT_KEYS_STORAGE_PATH INT_PATH(BT_KEYS_STORAGE_FILE_NAME)
|
||||
|
||||
#define BT_API_UNLOCK_EVENT (1UL << 0)
|
||||
|
||||
typedef enum {
|
||||
BtMessageTypeUpdateStatus,
|
||||
BtMessageTypeUpdateBatteryLevel,
|
||||
@ -48,6 +47,7 @@ typedef union {
|
||||
} BtMessageData;
|
||||
|
||||
typedef struct {
|
||||
FuriApiLock lock;
|
||||
BtMessageType type;
|
||||
BtMessageData data;
|
||||
bool* result;
|
||||
|
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_0.png
vendored
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_1.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_10.png
vendored
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_11.png
vendored
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_12.png
vendored
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_13.png
vendored
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_14.png
vendored
Normal file
After Width: | Height: | Size: 968 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_15.png
vendored
Normal file
After Width: | Height: | Size: 971 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_16.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_17.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_18.png
vendored
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_19.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_2.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_20.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_21.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_22.png
vendored
Normal file
After Width: | Height: | Size: 1021 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_23.png
vendored
Normal file
After Width: | Height: | Size: 929 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_24.png
vendored
Normal file
After Width: | Height: | Size: 856 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_25.png
vendored
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_26.png
vendored
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_27.png
vendored
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_28.png
vendored
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_29.png
vendored
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_3.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_30.png
vendored
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_31.png
vendored
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_32.png
vendored
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_33.png
vendored
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_34.png
vendored
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_35.png
vendored
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_36.png
vendored
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_37.png
vendored
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_38.png
vendored
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_39.png
vendored
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_4.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_40.png
vendored
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_41.png
vendored
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_42.png
vendored
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_43.png
vendored
Normal file
After Width: | Height: | Size: 1004 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_44.png
vendored
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_45.png
vendored
Normal file
After Width: | Height: | Size: 645 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_46.png
vendored
Normal file
After Width: | Height: | Size: 837 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_47.png
vendored
Normal file
After Width: | Height: | Size: 820 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_48.png
vendored
Normal file
After Width: | Height: | Size: 925 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_49.png
vendored
Normal file
After Width: | Height: | Size: 911 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_5.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_50.png
vendored
Normal file
After Width: | Height: | Size: 880 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_51.png
vendored
Normal file
After Width: | Height: | Size: 837 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_52.png
vendored
Normal file
After Width: | Height: | Size: 876 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_53.png
vendored
Normal file
After Width: | Height: | Size: 820 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_54.png
vendored
Normal file
After Width: | Height: | Size: 913 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_55.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_56.png
vendored
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_57.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_58.png
vendored
Normal file
After Width: | Height: | Size: 974 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_59.png
vendored
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_6.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_60.png
vendored
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_61.png
vendored
Normal file
After Width: | Height: | Size: 1011 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_7.png
vendored
Normal file
After Width: | Height: | Size: 988 B |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_8.png
vendored
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
assets/dolphin/external/L2_Coding_in_the_shell_128x64/frame_9.png
vendored
Normal file
After Width: | Height: | Size: 1.2 KiB |
23
assets/dolphin/external/L2_Coding_in_the_shell_128x64/meta.txt
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
Filetype: Flipper Animation
|
||||
Version: 1
|
||||
|
||||
Width: 128
|
||||
Height: 64
|
||||
Passive frames: 21
|
||||
Active frames: 44
|
||||
Frames order: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 17 19 20 21 22 23 24 24 25 26 27 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
||||
Active cycles: 1
|
||||
Frame rate: 2
|
||||
Duration: 3600
|
||||
Active cooldown: 7
|
||||
|
||||
Bubble slots: 1
|
||||
|
||||
Slot: 0
|
||||
X: 7
|
||||
Y: 46
|
||||
Text: GOOD JOB!
|
||||
AlignH: Center
|
||||
AlignV: Top
|
||||
StartFrame: 54
|
||||
EndFrame: 57
|
7
assets/dolphin/external/manifest.txt
vendored
@ -169,6 +169,13 @@ Min level: 1
|
||||
Max level: 3
|
||||
Weight: 4
|
||||
|
||||
Name: L2_Coding_in_the_shell_128x64
|
||||
Min butthurt: 0
|
||||
Max butthurt: 12
|
||||
Min level: 2
|
||||
Max level: 3
|
||||
Weight: 4
|
||||
|
||||
|
||||
Name: L3_Fireplace_128x64
|
||||
Min butthurt: 0
|
||||
|
@ -181,9 +181,11 @@ static void ble_app_hci_event_handler(void* pPayload) {
|
||||
|
||||
static void ble_app_hci_status_not_handler(HCI_TL_CmdStatus_t status) {
|
||||
if(status == HCI_TL_CmdBusy) {
|
||||
furi_hal_power_insomnia_enter();
|
||||
furi_mutex_acquire(ble_app->hci_mtx, FuriWaitForever);
|
||||
} else if(status == HCI_TL_CmdAvailable) {
|
||||
furi_mutex_release(ble_app->hci_mtx);
|
||||
furi_hal_power_insomnia_exit();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <hsem_map.h>
|
||||
|
||||
#include <furi_hal_version.h>
|
||||
#include <furi_hal_power.h>
|
||||
#include <furi_hal_bt_hid.h>
|
||||
#include <furi_hal_bt_serial.h>
|
||||
#include <furi_hal_bus.c>
|
||||
@ -280,6 +281,7 @@ bool furi_hal_bt_start_app(FuriHalBtProfile profile, GapEventCallback event_cb,
|
||||
}
|
||||
|
||||
void furi_hal_bt_reinit() {
|
||||
furi_hal_power_insomnia_enter();
|
||||
FURI_LOG_I(TAG, "Disconnect and stop advertising");
|
||||
furi_hal_bt_stop_advertising();
|
||||
|
||||
@ -309,6 +311,7 @@ void furi_hal_bt_reinit() {
|
||||
furi_hal_bt_init();
|
||||
|
||||
furi_hal_bt_start_radio_stack();
|
||||
furi_hal_power_insomnia_exit();
|
||||
}
|
||||
|
||||
bool furi_hal_bt_change_app(FuriHalBtProfile profile, GapEventCallback event_cb, void* context) {
|
||||
|
@ -29,22 +29,26 @@ which is the name that most clang tools search for by default.
|
||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
|
||||
import json
|
||||
import itertools
|
||||
import fnmatch
|
||||
import itertools
|
||||
import json
|
||||
from shlex import quote
|
||||
|
||||
import SCons
|
||||
|
||||
from SCons.Tool.cxx import CXXSuffixes
|
||||
from SCons.Tool.asm import ASPPSuffixes, ASSuffixes
|
||||
from SCons.Tool.cc import CSuffixes
|
||||
from SCons.Tool.asm import ASSuffixes, ASPPSuffixes
|
||||
from SCons.Tool.cxx import CXXSuffixes
|
||||
|
||||
# TODO FL-3542: Is there a better way to do this than this global? Right now this exists so that the
|
||||
# TODO: (-nofl) Is there a better way to do this than this global? Right now this exists so that the
|
||||
# emitter we add can record all of the things it emits, so that the scanner for the top level
|
||||
# compilation database can access the complete list, and also so that the writer has easy
|
||||
# access to write all of the files. But it seems clunky. How can the emitter and the scanner
|
||||
# communicate more gracefully?
|
||||
__COMPILATION_DB_ENTRIES = []
|
||||
|
||||
# We cache the tool path lookups to avoid doing them over and over again.
|
||||
_TOOL_PATH_CACHE = {}
|
||||
|
||||
|
||||
# We make no effort to avoid rebuilding the entries. Someday, perhaps we could and even
|
||||
# integrate with the cache, but there doesn't seem to be much call for it.
|
||||
@ -91,7 +95,7 @@ def make_emit_compilation_DB_entry(comstr):
|
||||
__COMPILATIONDB_ENV=env,
|
||||
)
|
||||
|
||||
# TODO FL-3541: Technically, these next two lines should not be required: it should be fine to
|
||||
# TODO: (-nofl) Technically, these next two lines should not be required: it should be fine to
|
||||
# cache the entries. However, they don't seem to update properly. Since they are quick
|
||||
# to re-generate disable caching and sidestep this problem.
|
||||
env.AlwaysBuild(entry)
|
||||
@ -122,6 +126,17 @@ def compilation_db_entry_action(target, source, env, **kw):
|
||||
env=env["__COMPILATIONDB_ENV"],
|
||||
)
|
||||
|
||||
# We assume first non-space character is the executable
|
||||
executable = command.split(" ", 1)[0]
|
||||
if not (tool_path := _TOOL_PATH_CACHE.get(executable, None)):
|
||||
tool_path = env.WhereIs(executable) or executable
|
||||
_TOOL_PATH_CACHE[executable] = tool_path
|
||||
# If there are spaces in the executable path, we need to quote it
|
||||
if " " in tool_path:
|
||||
tool_path = quote(tool_path)
|
||||
# Replacing the executable with the full path
|
||||
command = tool_path + command[len(executable) :]
|
||||
|
||||
entry = {
|
||||
"directory": env.Dir("#").abspath,
|
||||
"command": command,
|
||||
@ -242,10 +257,7 @@ def generate(env, **kwargs):
|
||||
for entry in components_by_suffix:
|
||||
suffix = entry[0]
|
||||
builder, base_emitter, command = entry[1]
|
||||
|
||||
# Assumes a dictionary emitter
|
||||
emitter = builder.emitter.get(suffix, False)
|
||||
if emitter:
|
||||
if emitter := builder.emitter.get(suffix, False):
|
||||
# We may not have tools installed which initialize all or any of
|
||||
# cxx, cc, or assembly. If not skip resetting the respective emitter.
|
||||
builder.emitter[suffix] = SCons.Builder.ListEmitter(
|
||||
|
@ -2,8 +2,6 @@ import subprocess
|
||||
|
||||
import gdb
|
||||
import objdump
|
||||
import shutil
|
||||
|
||||
import strip
|
||||
from SCons.Action import _subproc
|
||||
from SCons.Errors import StopError
|
||||
@ -13,20 +11,25 @@ from SCons.Tool import ar, asm, gcc, gnulink, gxx
|
||||
def prefix_commands(env, command_prefix, cmd_list):
|
||||
for command in cmd_list:
|
||||
if command in env:
|
||||
env[command] = shutil.which(command_prefix + env[command])
|
||||
prefixed_binary = command_prefix + env[command]
|
||||
if not env.WhereIs(prefixed_binary):
|
||||
raise StopError(
|
||||
f"Toolchain binary {prefixed_binary} not found in PATH."
|
||||
)
|
||||
env.Replace(**{command: prefixed_binary})
|
||||
|
||||
|
||||
def _get_tool_version(env, tool):
|
||||
verstr = "version unknown"
|
||||
proc = _subproc(
|
||||
env,
|
||||
env.subst("${%s} --version" % tool),
|
||||
[env.subst("${%s}" % tool), "--version"],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr="devnull",
|
||||
stdin="devnull",
|
||||
universal_newlines=True,
|
||||
error="raise",
|
||||
shell=True,
|
||||
shell=False,
|
||||
)
|
||||
if proc:
|
||||
verstr = proc.stdout.readline()
|
||||
|
@ -48,6 +48,7 @@ def generate(env):
|
||||
"@.pvsoptions",
|
||||
"-j${PVSNCORES}",
|
||||
# "--incremental", # kinda broken on PVS side
|
||||
"--disableLicenseExpirationCheck",
|
||||
],
|
||||
PVSCONVOPTIONS=[
|
||||
"-a",
|
||||
|