mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 13:03:13 +00:00
Merge branch 'DarkFlippers:dev' into dev2
This commit is contained in:
commit
e9aa2d3449
10 changed files with 47 additions and 10 deletions
|
@ -197,7 +197,7 @@ bool weather_station_scene_receiver_on_event(void* context, SceneManagerEvent ev
|
|||
}
|
||||
// Get current RSSI
|
||||
float rssi = furi_hal_subghz_get_rssi();
|
||||
ws_receiver_rssi(app->ws_receiver, rssi);
|
||||
ws_view_receiver_set_rssi(app->ws_receiver, rssi);
|
||||
|
||||
if(app->txrx->txrx_state == WSTxRxStateRx) {
|
||||
notification_message(app->notifications, &sequence_blink_cyan_10);
|
||||
|
|
|
@ -63,7 +63,7 @@ typedef struct {
|
|||
uint8_t u_rssi;
|
||||
} WSReceiverModel;
|
||||
|
||||
void ws_receiver_rssi(WSReceiver* instance, float rssi) {
|
||||
void ws_view_receiver_set_rssi(WSReceiver* instance, float rssi) {
|
||||
furi_assert(instance);
|
||||
with_view_model(
|
||||
instance->view,
|
||||
|
@ -197,7 +197,6 @@ void ws_view_receiver_draw(Canvas* canvas, WSReceiverModel* model) {
|
|||
canvas_set_font(canvas, FontSecondary);
|
||||
|
||||
elements_button_left(canvas, "Config");
|
||||
//canvas_draw_line(canvas, 46, 51, 125, 51);
|
||||
|
||||
bool scrollbar = model->history_item > 4;
|
||||
FuriString* str_buff;
|
||||
|
@ -230,7 +229,6 @@ void ws_view_receiver_draw(Canvas* canvas, WSReceiverModel* model) {
|
|||
canvas_draw_icon(canvas, 0, 0, &I_Scanning_123x52);
|
||||
canvas_set_font(canvas, FontPrimary);
|
||||
canvas_draw_str(canvas, 63, 46, "Scanning...");
|
||||
//canvas_draw_line(canvas, 46, 51, 125, 51);
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ typedef struct WSReceiver WSReceiver;
|
|||
|
||||
typedef void (*WSReceiverCallback)(WSCustomEvent event, void* context);
|
||||
|
||||
void ws_receiver_rssi(WSReceiver* instance, float rssi);
|
||||
void ws_view_receiver_set_rssi(WSReceiver* instance, float rssi);
|
||||
|
||||
void ws_view_receiver_set_lock(WSReceiver* ws_receiver, WSLock keyboard);
|
||||
|
||||
|
|
|
@ -103,6 +103,9 @@ static void storage_settings_scene_benchmark(StorageSettings* app) {
|
|||
break;
|
||||
|
||||
furi_string_cat_printf(app->text_string, "R %luK", bench_r_speed[i]);
|
||||
|
||||
storage_common_remove(app->fs_api, BENCH_FILE);
|
||||
|
||||
dialog_ex_set_text(
|
||||
dialog_ex, furi_string_get_cstr(app->text_string), 0, 32, AlignLeft, AlignCenter);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
entry,status,name,type,params
|
||||
Version,+,14.0,,
|
||||
Version,+,14.1,,
|
||||
Header,+,applications/services/bt/bt_service/bt.h,,
|
||||
Header,+,applications/services/cli/cli.h,,
|
||||
Header,+,applications/services/cli/cli_vcp.h,,
|
||||
|
@ -1187,6 +1187,7 @@ Function,+,furi_hal_mpu_protect_disable,void,FuriHalMpuRegion
|
|||
Function,+,furi_hal_mpu_protect_no_access,void,"FuriHalMpuRegion, uint32_t, FuriHalMPURegionSize"
|
||||
Function,+,furi_hal_mpu_protect_read_only,void,"FuriHalMpuRegion, uint32_t, FuriHalMPURegionSize"
|
||||
Function,+,furi_hal_nfc_activate_nfca,_Bool,"uint32_t, uint32_t*"
|
||||
Function,-,furi_hal_nfc_deinit,void,
|
||||
Function,+,furi_hal_nfc_detect,_Bool,"FuriHalNfcDevData*, uint32_t"
|
||||
Function,+,furi_hal_nfc_emulate_nfca,_Bool,"uint8_t*, uint8_t, uint8_t*, uint8_t, FuriHalNfcEmulateCallback, void*, uint32_t"
|
||||
Function,+,furi_hal_nfc_exit_sleep,void,
|
||||
|
|
|
|
@ -24,13 +24,29 @@ FuriEventFlag* event = NULL;
|
|||
#define FURI_HAL_NFC_UID_INCOMPLETE (0x04)
|
||||
|
||||
void furi_hal_nfc_init() {
|
||||
furi_assert(!event);
|
||||
event = furi_event_flag_alloc();
|
||||
|
||||
ReturnCode ret = rfalNfcInitialize();
|
||||
if(ret == ERR_NONE) {
|
||||
furi_hal_nfc_start_sleep();
|
||||
event = furi_event_flag_alloc();
|
||||
FURI_LOG_I(TAG, "Init OK");
|
||||
} else {
|
||||
FURI_LOG_W(TAG, "Initialization failed, RFAL returned: %d", ret);
|
||||
FURI_LOG_W(TAG, "Init Failed, RFAL returned: %d", ret);
|
||||
}
|
||||
}
|
||||
|
||||
void furi_hal_nfc_deinit() {
|
||||
ReturnCode ret = rfalDeinitialize();
|
||||
if(ret == ERR_NONE) {
|
||||
FURI_LOG_I(TAG, "Deinit OK");
|
||||
} else {
|
||||
FURI_LOG_W(TAG, "Deinit Failed, RFAL returned: %d", ret);
|
||||
}
|
||||
|
||||
if(event) {
|
||||
furi_event_flag_free(event);
|
||||
event = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -101,6 +101,10 @@ typedef struct {
|
|||
*/
|
||||
void furi_hal_nfc_init();
|
||||
|
||||
/** Deinit nfc
|
||||
*/
|
||||
void furi_hal_nfc_deinit();
|
||||
|
||||
/** Check if nfc worker is busy
|
||||
*
|
||||
* @return true if busy
|
||||
|
|
|
@ -56,6 +56,8 @@ void nfc_worker_start(
|
|||
while(furi_hal_nfc_is_busy()) {
|
||||
furi_delay_ms(10);
|
||||
}
|
||||
furi_hal_nfc_deinit();
|
||||
furi_hal_nfc_init();
|
||||
|
||||
nfc_worker->callback = callback;
|
||||
nfc_worker->context = context;
|
||||
|
|
|
@ -13,7 +13,7 @@ if not ["%FBT_NOENV%"] == [""] (
|
|||
exit /b 0
|
||||
)
|
||||
|
||||
set "FLIPPER_TOOLCHAIN_VERSION=19"
|
||||
set "FLIPPER_TOOLCHAIN_VERSION=21"
|
||||
|
||||
if ["%FBT_TOOLCHAIN_ROOT%"] == [""] (
|
||||
set "FBT_TOOLCHAIN_ROOT=%FBT_ROOT%\toolchain\x86_64-windows"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# public variables
|
||||
DEFAULT_SCRIPT_PATH="$(pwd -P)";
|
||||
SCRIPT_PATH="${SCRIPT_PATH:-$DEFAULT_SCRIPT_PATH}";
|
||||
FBT_TOOLCHAIN_VERSION="${FBT_TOOLCHAIN_VERSION:-"19"}";
|
||||
FBT_TOOLCHAIN_VERSION="${FBT_TOOLCHAIN_VERSION:-"21"}";
|
||||
FBT_TOOLCHAIN_PATH="${FBT_TOOLCHAIN_PATH:-$SCRIPT_PATH}";
|
||||
FBT_VERBOSE="${FBT_VERBOSE:-""}";
|
||||
|
||||
|
@ -43,10 +43,19 @@ fbtenv_restore_env()
|
|||
PROMPT="$(echo "$PROMPT" | sed 's/\[fbt\]//g')";
|
||||
fi
|
||||
|
||||
if [ -n "$SAVED_SSL_CERT_FILE" ]; then
|
||||
export SSL_CERT_FILE="$SAVED_SSL_CERT_FILE";
|
||||
export REQUESTS_CA_BUNDLE="$SAVED_REQUESTS_CA_BUNDLE";
|
||||
else
|
||||
unset SSL_CERT_FILE;
|
||||
unset REQUESTS_CA_BUNDLE;
|
||||
fi
|
||||
export PYTHONNOUSERSITE="$SAVED_PYTHONNOUSERSITE";
|
||||
export PYTHONPATH="$SAVED_PYTHONPATH";
|
||||
export PYTHONHOME="$SAVED_PYTHONHOME";
|
||||
|
||||
unset SAVED_SSL_CERT_FILE;
|
||||
unset SAVED_REQUESTS_CA_BUNDLE;
|
||||
unset SAVED_PYTHONNOUSERSITE;
|
||||
unset SAVED_PYTHONPATH;
|
||||
unset SAVED_PYTHONHOME;
|
||||
|
@ -309,10 +318,14 @@ fbtenv_main()
|
|||
PATH="$TOOLCHAIN_ARCH_DIR/openssl/bin:$PATH";
|
||||
export PATH;
|
||||
|
||||
export SAVED_SSL_CERT_FILE="${SSL_CERT_FILE:-""}";
|
||||
export SAVED_REQUESTS_CA_BUNDLE="${REQUESTS_CA_BUNDLE:-""}";
|
||||
export SAVED_PYTHONNOUSERSITE="${PYTHONNOUSERSITE:-""}";
|
||||
export SAVED_PYTHONPATH="${PYTHONPATH:-""}";
|
||||
export SAVED_PYTHONHOME="${PYTHONHOME:-""}";
|
||||
|
||||
export SSL_CERT_FILE="$TOOLCHAIN_ARCH_DIR/python/lib/python3.11/site-packages/certifi/cacert.pem";
|
||||
export REQUESTS_CA_BUNDLE="$SSL_CERT_FILE";
|
||||
export PYTHONNOUSERSITE=1;
|
||||
export PYTHONPATH=;
|
||||
export PYTHONHOME=;
|
||||
|
|
Loading…
Reference in a new issue