Merge pull request #1 from DarkFlippers/dev
Merge in Spectrum Analyzer changes
@@ -10,11 +10,13 @@
|
||||
- The settings will be reset after returning to the main menu
|
||||
```
|
||||
* SubGHz Remote: Merged SubGHz Remote and Remote maker in one app, **use back button to access remote maker** (by @gid9798 | PR #545)
|
||||
* SubGHz: Replace FM15k with AM_Q in default modulations
|
||||
* SubGHz: Port latest OFW external radio driver, fix issues (now you can make drivers for other radio chips) (by @gid9798 | PR #539 #536 #535 #534)
|
||||
* GUI module: SubMenu fix vertical orientation (by @gid9798 | PR #543)
|
||||
* Apps: After merge fixes (by @gid9798 | PR #537)
|
||||
* Docs: Update docs for debug build and update vscode example, please remove `debug_pack` target if you had it in your workflow
|
||||
* Infrared: Updated universal remote assets (by @amec0e | PR #544 #546)
|
||||
* Plugins: Barcode app - embed assets (encoding tables) in plugin
|
||||
* Plugins: NRF24 plugins -> Updates by @Sil333033 with some changes by @xMasterX -> furi_hal_speaker direct calls was removed and replaced with notification service to avoid bypassing of user set silent mode -> What was changed - NRF24 connection check added, app folders was moved (uses migrate, all done automatically), and mousejacker now uses badusb folder for badusb scripts
|
||||
* Plugins: Added Camera Suite GPIO application for the ESP32-CAM module. [(by CodyTolene)](https://github.com/CodyTolene/Flipper-Zero-Camera-Suite) (PR #541)
|
||||
* Plugins: Updated ESP32: WiFi Marauder companion plugin [(by 0xchocolate)](https://github.com/0xchocolate/flipperzero-wifi-marauder)
|
||||
@@ -22,6 +24,7 @@
|
||||
* Plugins: Updated **Mifare Nested** [(by AloneLiberty)](https://github.com/AloneLiberty/FlipperNested)
|
||||
* Plugins: Updated Lightmeter [(by oleksiikutuzov)](https://github.com/oleksiikutuzov/flipperzero-lightmeter)
|
||||
* Plugins: Updated **Multi (RFID/iButton) Fuzzer** [(by @gid9798)](https://github.com/DarkFlippers/Multi_Fuzzer)
|
||||
* OFW PR: faploader: always create app dir, even if it doesn't have subdirs (by @hedger)
|
||||
* OFW: Gauge initialization routine refactoring, new DataMemory layout, configuration update
|
||||
* OFW: fbt: `build` target for faps
|
||||
* OFW: IButton: on delete scene key name not fully display if so long
|
||||
|
||||
@@ -8,9 +8,9 @@ App(
|
||||
fap_category="Tools",
|
||||
fap_icon="images/barcode_10.png",
|
||||
fap_icon_assets="images",
|
||||
fap_icon_assets_symbol="barcode_app",
|
||||
fap_file_assets="barcode_encoding_files",
|
||||
fap_author="@Kingal1337",
|
||||
fap_weburl="https://github.com/Kingal1337/flipper-barcode-generator",
|
||||
fap_version="1.0",
|
||||
fap_version="1.1",
|
||||
fap_description="App allows you to display various barcodes on flipper screen",
|
||||
)
|
||||
|
||||
@@ -23,20 +23,17 @@
|
||||
#define BARCODE_HEIGHT 50
|
||||
#define BARCODE_Y_START 3
|
||||
|
||||
//the folder where the encodings are located
|
||||
#define BARCODE_DATA_FILE_DIR_PATH EXT_PATH("apps_data/barcode_data")
|
||||
|
||||
//the folder where the codabar encoding table is located
|
||||
#define CODABAR_DICT_FILE_PATH BARCODE_DATA_FILE_DIR_PATH "/codabar_encodings.txt"
|
||||
#define CODABAR_DICT_FILE_PATH APP_ASSETS_PATH("codabar_encodings.txt")
|
||||
|
||||
//the folder where the code 39 encoding table is located
|
||||
#define CODE39_DICT_FILE_PATH BARCODE_DATA_FILE_DIR_PATH "/code39_encodings.txt"
|
||||
#define CODE39_DICT_FILE_PATH APP_ASSETS_PATH("code39_encodings.txt")
|
||||
|
||||
//the folder where the code 128 encoding table is located
|
||||
#define CODE128_DICT_FILE_PATH BARCODE_DATA_FILE_DIR_PATH "/code128_encodings.txt"
|
||||
#define CODE128_DICT_FILE_PATH APP_ASSETS_PATH("code128_encodings.txt")
|
||||
|
||||
//the folder where the code 128 C encoding table is located
|
||||
#define CODE128C_DICT_FILE_PATH BARCODE_DATA_FILE_DIR_PATH "/code128c_encodings.txt"
|
||||
#define CODE128C_DICT_FILE_PATH APP_ASSETS_PATH("code128c_encodings.txt")
|
||||
|
||||
//the folder where the user stores their barcodes
|
||||
#define DEFAULT_USER_BARCODES EXT_PATH("apps_data/barcodes")
|
||||
|
||||
|
After Width: | Height: | Size: 162 B |
|
After Width: | Height: | Size: 163 B |
|
After Width: | Height: | Size: 161 B |
|
After Width: | Height: | Size: 165 B |
|
After Width: | Height: | Size: 164 B |
|
After Width: | Height: | Size: 163 B |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -140,17 +140,17 @@ const HidKeyboardKey hid_keyboard_keyset[ROW_COUNT][COLUMN_COUNT] = {
|
||||
{.width = 1, .icon = &I_ButtonRight_4x7, .value = HID_KEYBOARD_RIGHT_ARROW},
|
||||
},
|
||||
{
|
||||
{.width = 2, .icon = NULL, .key = "Ctl", .value = HID_KEYBOARD_L_CTRL},
|
||||
{.width = 2, .icon = &I_KB_key_Ctl_17x10, .value = HID_KEYBOARD_L_CTRL},
|
||||
{.width = 0, .icon = NULL, .value = HID_KEYBOARD_L_CTRL},
|
||||
{.width = 2, .icon = NULL, .key = "Alt", .value = HID_KEYBOARD_L_ALT},
|
||||
{.width = 2, .icon = &I_KB_key_Alt_17x10, .value = HID_KEYBOARD_L_ALT},
|
||||
{.width = 0, .icon = NULL, .value = HID_KEYBOARD_L_ALT},
|
||||
{.width = 2, .icon = NULL, .key = "Cmd", .value = HID_KEYBOARD_L_GUI},
|
||||
{.width = 2, .icon = &I_KB_key_Cmd_17x10, .value = HID_KEYBOARD_L_GUI},
|
||||
{.width = 0, .icon = NULL, .value = HID_KEYBOARD_L_GUI},
|
||||
{.width = 2, .icon = NULL, .key = "Tab", .value = HID_KEYBOARD_TAB},
|
||||
{.width = 2, .icon = &I_KB_key_Tab_17x10, .value = HID_KEYBOARD_TAB},
|
||||
{.width = 0, .icon = NULL, .value = HID_KEYBOARD_TAB},
|
||||
{.width = 2, .icon = NULL, .key = "Esc", .value = HID_KEYBOARD_ESCAPE},
|
||||
{.width = 2, .icon = &I_KB_key_Esc_17x10, .value = HID_KEYBOARD_ESCAPE},
|
||||
{.width = 0, .icon = NULL, .value = HID_KEYBOARD_ESCAPE},
|
||||
{.width = 2, .icon = NULL, .key = "Del", .value = HID_KEYBOARD_DELETE_FORWARD},
|
||||
{.width = 2, .icon = &I_KB_key_Del_17x10, .value = HID_KEYBOARD_DELETE_FORWARD},
|
||||
{.width = 0, .icon = NULL, .value = HID_KEYBOARD_DELETE_FORWARD},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -56,12 +56,12 @@ static void hid_media_draw_callback(Canvas* canvas, void* context) {
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
|
||||
// Keypad circles
|
||||
canvas_draw_icon(canvas, 58, 3, &I_OutCircles);
|
||||
canvas_draw_icon(canvas, 58, 3, &I_OutCircles_70x51);
|
||||
|
||||
// Up
|
||||
if(model->up_pressed) {
|
||||
canvas_set_bitmap_mode(canvas, 1);
|
||||
canvas_draw_icon(canvas, 68, 6, &I_S_UP);
|
||||
canvas_draw_icon(canvas, 68, 6, &I_S_UP_31x15);
|
||||
canvas_set_bitmap_mode(canvas, 0);
|
||||
canvas_set_color(canvas, ColorWhite);
|
||||
}
|
||||
@@ -71,7 +71,7 @@ static void hid_media_draw_callback(Canvas* canvas, void* context) {
|
||||
// Down
|
||||
if(model->down_pressed) {
|
||||
canvas_set_bitmap_mode(canvas, 1);
|
||||
canvas_draw_icon(canvas, 68, 36, &I_S_DOWN);
|
||||
canvas_draw_icon(canvas, 68, 36, &I_S_DOWN_31x15);
|
||||
canvas_set_bitmap_mode(canvas, 0);
|
||||
canvas_set_color(canvas, ColorWhite);
|
||||
}
|
||||
@@ -81,7 +81,7 @@ static void hid_media_draw_callback(Canvas* canvas, void* context) {
|
||||
// Left
|
||||
if(model->left_pressed) {
|
||||
canvas_set_bitmap_mode(canvas, 1);
|
||||
canvas_draw_icon(canvas, 61, 13, &I_S_LEFT);
|
||||
canvas_draw_icon(canvas, 61, 13, &I_S_LEFT_15x31);
|
||||
canvas_set_bitmap_mode(canvas, 0);
|
||||
canvas_set_color(canvas, ColorWhite);
|
||||
}
|
||||
@@ -92,7 +92,7 @@ static void hid_media_draw_callback(Canvas* canvas, void* context) {
|
||||
// Right
|
||||
if(model->right_pressed) {
|
||||
canvas_set_bitmap_mode(canvas, 1);
|
||||
canvas_draw_icon(canvas, 91, 13, &I_S_RIGHT);
|
||||
canvas_draw_icon(canvas, 91, 13, &I_S_RIGHT_15x31);
|
||||
canvas_set_bitmap_mode(canvas, 0);
|
||||
canvas_set_color(canvas, ColorWhite);
|
||||
}
|
||||
|
||||
@@ -49,12 +49,12 @@ static void hid_mouse_draw_callback(Canvas* canvas, void* context) {
|
||||
}
|
||||
|
||||
// Keypad circles
|
||||
canvas_draw_icon(canvas, 58, 3, &I_OutCircles);
|
||||
canvas_draw_icon(canvas, 58, 3, &I_OutCircles_70x51);
|
||||
|
||||
// Up
|
||||
if(model->up_pressed) {
|
||||
canvas_set_bitmap_mode(canvas, 1);
|
||||
canvas_draw_icon(canvas, 68, 6, &I_S_UP);
|
||||
canvas_draw_icon(canvas, 68, 6, &I_S_UP_31x15);
|
||||
canvas_set_bitmap_mode(canvas, 0);
|
||||
canvas_set_color(canvas, ColorWhite);
|
||||
}
|
||||
@@ -64,7 +64,7 @@ static void hid_mouse_draw_callback(Canvas* canvas, void* context) {
|
||||
// Down
|
||||
if(model->down_pressed) {
|
||||
canvas_set_bitmap_mode(canvas, 1);
|
||||
canvas_draw_icon(canvas, 68, 36, &I_S_DOWN);
|
||||
canvas_draw_icon(canvas, 68, 36, &I_S_DOWN_31x15);
|
||||
canvas_set_bitmap_mode(canvas, 0);
|
||||
canvas_set_color(canvas, ColorWhite);
|
||||
}
|
||||
@@ -74,7 +74,7 @@ static void hid_mouse_draw_callback(Canvas* canvas, void* context) {
|
||||
// Left
|
||||
if(model->left_pressed) {
|
||||
canvas_set_bitmap_mode(canvas, 1);
|
||||
canvas_draw_icon(canvas, 61, 13, &I_S_LEFT);
|
||||
canvas_draw_icon(canvas, 61, 13, &I_S_LEFT_15x31);
|
||||
canvas_set_bitmap_mode(canvas, 0);
|
||||
canvas_set_color(canvas, ColorWhite);
|
||||
}
|
||||
@@ -84,7 +84,7 @@ static void hid_mouse_draw_callback(Canvas* canvas, void* context) {
|
||||
// Right
|
||||
if(model->right_pressed) {
|
||||
canvas_set_bitmap_mode(canvas, 1);
|
||||
canvas_draw_icon(canvas, 91, 13, &I_S_RIGHT);
|
||||
canvas_draw_icon(canvas, 91, 13, &I_S_RIGHT_15x31);
|
||||
canvas_set_bitmap_mode(canvas, 0);
|
||||
canvas_set_color(canvas, ColorWhite);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ static void hid_tikshorts_draw_callback(Canvas* canvas, void* context) {
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
|
||||
// Keypad circles
|
||||
canvas_draw_icon(canvas, 58, 3, &I_OutCircles);
|
||||
canvas_draw_icon(canvas, 58, 3, &I_OutCircles_70x51);
|
||||
|
||||
// Pause
|
||||
if(model->back_mouse_pressed) {
|
||||
@@ -57,7 +57,7 @@ static void hid_tikshorts_draw_callback(Canvas* canvas, void* context) {
|
||||
// Up
|
||||
if(model->up_pressed) {
|
||||
canvas_set_bitmap_mode(canvas, 1);
|
||||
canvas_draw_icon(canvas, 68, 6, &I_S_UP);
|
||||
canvas_draw_icon(canvas, 68, 6, &I_S_UP_31x15);
|
||||
canvas_set_bitmap_mode(canvas, 0);
|
||||
canvas_set_color(canvas, ColorWhite);
|
||||
}
|
||||
@@ -67,7 +67,7 @@ static void hid_tikshorts_draw_callback(Canvas* canvas, void* context) {
|
||||
// Down
|
||||
if(model->down_pressed) {
|
||||
canvas_set_bitmap_mode(canvas, 1);
|
||||
canvas_draw_icon(canvas, 68, 36, &I_S_DOWN);
|
||||
canvas_draw_icon(canvas, 68, 36, &I_S_DOWN_31x15);
|
||||
canvas_set_bitmap_mode(canvas, 0);
|
||||
canvas_set_color(canvas, ColorWhite);
|
||||
}
|
||||
@@ -77,7 +77,7 @@ static void hid_tikshorts_draw_callback(Canvas* canvas, void* context) {
|
||||
// Left
|
||||
if(model->left_pressed) {
|
||||
canvas_set_bitmap_mode(canvas, 1);
|
||||
canvas_draw_icon(canvas, 61, 13, &I_S_LEFT);
|
||||
canvas_draw_icon(canvas, 61, 13, &I_S_LEFT_15x31);
|
||||
canvas_set_bitmap_mode(canvas, 0);
|
||||
canvas_set_color(canvas, ColorWhite);
|
||||
}
|
||||
@@ -87,7 +87,7 @@ static void hid_tikshorts_draw_callback(Canvas* canvas, void* context) {
|
||||
// Right
|
||||
if(model->right_pressed) {
|
||||
canvas_set_bitmap_mode(canvas, 1);
|
||||
canvas_draw_icon(canvas, 91, 13, &I_S_RIGHT);
|
||||
canvas_draw_icon(canvas, 91, 13, &I_S_RIGHT_15x31);
|
||||
canvas_set_bitmap_mode(canvas, 0);
|
||||
canvas_set_color(canvas, ColorWhite);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#define TAG "mousejacker"
|
||||
#define LOGITECH_MAX_CHANNEL 85
|
||||
#define NRFSNIFF_APP_PATH_FOLDER_ADDRESSES EXT_PATH("apps_data/nrf24sniff/addresses.txt")
|
||||
#define NRFSNIFF_APP_PATH_FOLDER_ADDRESSES EXT_PATH("apps_data/nrf24_sniffer/addresses.txt")
|
||||
#define LOCAL_BADUSB_FOLDER EXT_PATH("badusb")
|
||||
#define MOUSEJACKER_APP_PATH_EXTENSION ".txt"
|
||||
#define MAX_ADDRS 100
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "spectrum_analyzer_worker.h"
|
||||
|
||||
typedef struct {
|
||||
uint16_t center_freq;
|
||||
uint32_t center_freq;
|
||||
uint8_t width;
|
||||
uint8_t band;
|
||||
uint8_t vscroll;
|
||||
@@ -52,39 +52,55 @@ void spectrum_analyzer_draw_scale(Canvas* canvas, const SpectrumAnalyzerModel* m
|
||||
}
|
||||
|
||||
// Draw scale tags
|
||||
uint16_t tag_left;
|
||||
uint16_t tag_center;
|
||||
uint16_t tag_right;
|
||||
uint32_t tag_left = 0;
|
||||
uint32_t tag_center = 0;
|
||||
uint32_t tag_right = 0;
|
||||
char temp_str[18];
|
||||
|
||||
tag_center = model->center_freq;
|
||||
|
||||
switch(model->width) {
|
||||
case NARROW:
|
||||
tag_left = model->center_freq - 2;
|
||||
tag_right = model->center_freq + 2;
|
||||
tag_left = model->center_freq - 2000;
|
||||
tag_right = model->center_freq + 2000;
|
||||
break;
|
||||
case ULTRANARROW:
|
||||
tag_left = model->center_freq - 1;
|
||||
tag_right = model->center_freq + 1;
|
||||
tag_left = model->center_freq - 1000;
|
||||
tag_right = model->center_freq + 1000;
|
||||
break;
|
||||
case PRECISE:
|
||||
tag_left = model->center_freq - 200;
|
||||
tag_right = model->center_freq + 200;
|
||||
break;
|
||||
case ULTRAWIDE:
|
||||
tag_left = model->center_freq - 40;
|
||||
tag_right = model->center_freq + 40;
|
||||
tag_left = model->center_freq - 40000;
|
||||
tag_right = model->center_freq + 40000;
|
||||
break;
|
||||
default:
|
||||
tag_left = model->center_freq - 10;
|
||||
tag_right = model->center_freq + 10;
|
||||
tag_left = model->center_freq - 10000;
|
||||
tag_right = model->center_freq + 10000;
|
||||
}
|
||||
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
snprintf(temp_str, 18, "%u", tag_left);
|
||||
canvas_draw_str_aligned(canvas, FREQ_START_X, 63, AlignCenter, AlignBottom, temp_str);
|
||||
snprintf(temp_str, 18, "%u", tag_center);
|
||||
canvas_draw_str_aligned(canvas, 128 / 2, 63, AlignCenter, AlignBottom, temp_str);
|
||||
snprintf(temp_str, 18, "%u", tag_right);
|
||||
canvas_draw_str_aligned(
|
||||
canvas, FREQ_START_X + FREQ_LENGTH_X - 1, 63, AlignCenter, AlignBottom, temp_str);
|
||||
switch(model->width) {
|
||||
case PRECISE:
|
||||
snprintf(temp_str, 18, "%.1f", ((double)tag_left) / 1000);
|
||||
canvas_draw_str_aligned(canvas, FREQ_START_X, 63, AlignCenter, AlignBottom, temp_str);
|
||||
snprintf(temp_str, 18, "%.1f", ((double)tag_center) / 1000);
|
||||
canvas_draw_str_aligned(canvas, 128 / 2, 63, AlignCenter, AlignBottom, temp_str);
|
||||
snprintf(temp_str, 18, "%.1f", ((double)tag_right) / 1000);
|
||||
canvas_draw_str_aligned(
|
||||
canvas, FREQ_START_X + FREQ_LENGTH_X - 1, 63, AlignCenter, AlignBottom, temp_str);
|
||||
break;
|
||||
default:
|
||||
snprintf(temp_str, 18, "%lu", tag_left / 1000);
|
||||
canvas_draw_str_aligned(canvas, FREQ_START_X, 63, AlignCenter, AlignBottom, temp_str);
|
||||
snprintf(temp_str, 18, "%lu", tag_center / 1000);
|
||||
canvas_draw_str_aligned(canvas, 128 / 2, 63, AlignCenter, AlignBottom, temp_str);
|
||||
snprintf(temp_str, 18, "%lu", tag_right / 1000);
|
||||
canvas_draw_str_aligned(
|
||||
canvas, FREQ_START_X + FREQ_LENGTH_X - 1, 63, AlignCenter, AlignBottom, temp_str);
|
||||
}
|
||||
}
|
||||
|
||||
static void spectrum_analyzer_render_callback(Canvas* const canvas, void* ctx) {
|
||||
@@ -114,6 +130,9 @@ static void spectrum_analyzer_render_callback(Canvas* const canvas, void* ctx) {
|
||||
case ULTRANARROW:
|
||||
strncpy(temp_mode_str, "ULTRANARROW", 12);
|
||||
break;
|
||||
case PRECISE:
|
||||
strncpy(temp_mode_str, "PRECISE", 12);
|
||||
break;
|
||||
case ULTRAWIDE:
|
||||
strncpy(temp_mode_str, "ULTRAWIDE", 12);
|
||||
break;
|
||||
@@ -206,12 +225,12 @@ void spectrum_analyzer_calculate_frequencies(SpectrumAnalyzerModel* model) {
|
||||
uint8_t new_band;
|
||||
uint32_t min_hz;
|
||||
uint32_t max_hz;
|
||||
uint8_t margin;
|
||||
uint8_t step;
|
||||
uint16_t upper_limit;
|
||||
uint16_t lower_limit;
|
||||
uint16_t next_up;
|
||||
uint16_t next_down;
|
||||
uint32_t margin;
|
||||
uint32_t step;
|
||||
uint32_t upper_limit;
|
||||
uint32_t lower_limit;
|
||||
uint32_t next_up;
|
||||
uint32_t next_down;
|
||||
uint8_t next_band_up;
|
||||
uint8_t next_band_down;
|
||||
|
||||
@@ -226,19 +245,24 @@ void spectrum_analyzer_calculate_frequencies(SpectrumAnalyzerModel* model) {
|
||||
step = ULTRANARROW_STEP;
|
||||
model->spacing = ULTRANARROW_SPACING;
|
||||
break;
|
||||
case PRECISE:
|
||||
margin = PRECISE_MARGIN;
|
||||
step = PRECISE_STEP;
|
||||
model->spacing = PRECISE_SPACING;
|
||||
break;
|
||||
case ULTRAWIDE:
|
||||
margin = ULTRAWIDE_MARGIN;
|
||||
step = ULTRAWIDE_STEP;
|
||||
model->spacing = ULTRAWIDE_SPACING;
|
||||
/* nearest 20 MHz step */
|
||||
model->center_freq = ((model->center_freq + 10) / 20) * 20;
|
||||
model->center_freq = ((model->center_freq + 10000) / 20000) * 20000;
|
||||
break;
|
||||
default:
|
||||
margin = WIDE_MARGIN;
|
||||
step = WIDE_STEP;
|
||||
model->spacing = WIDE_SPACING;
|
||||
/* nearest 5 MHz step */
|
||||
model->center_freq = ((model->center_freq + 2) / 5) * 5;
|
||||
model->center_freq = ((model->center_freq + 2000) / 5000) * 5000;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -287,21 +311,21 @@ void spectrum_analyzer_calculate_frequencies(SpectrumAnalyzerModel* model) {
|
||||
/* doing everything in Hz from here on */
|
||||
switch(model->band) {
|
||||
case BAND_400:
|
||||
min_hz = MIN_400 * 1000000;
|
||||
max_hz = MAX_400 * 1000000;
|
||||
min_hz = MIN_400 * 1000;
|
||||
max_hz = MAX_400 * 1000;
|
||||
break;
|
||||
case BAND_300:
|
||||
min_hz = MIN_300 * 1000000;
|
||||
max_hz = MAX_300 * 1000000;
|
||||
min_hz = MIN_300 * 1000;
|
||||
max_hz = MAX_300 * 1000;
|
||||
break;
|
||||
default:
|
||||
min_hz = MIN_900 * 1000000;
|
||||
max_hz = MAX_900 * 1000000;
|
||||
min_hz = MIN_900 * 1000;
|
||||
max_hz = MAX_900 * 1000;
|
||||
break;
|
||||
}
|
||||
|
||||
model->channel0_frequency =
|
||||
model->center_freq * 1000000 - (model->spacing * ((NUM_CHANNELS / 2) + 1));
|
||||
model->center_freq * 1000 - (model->spacing * ((NUM_CHANNELS / 2) + 1));
|
||||
|
||||
// /* calibrate upper channels */
|
||||
// hz = model->center_freq * 1000000;
|
||||
@@ -327,7 +351,7 @@ void spectrum_analyzer_calculate_frequencies(SpectrumAnalyzerModel* model) {
|
||||
model->max_rssi_dec = 0;
|
||||
|
||||
FURI_LOG_D("Spectrum", "setup_frequencies - max_hz: %lu - min_hz: %lu", max_hz, min_hz);
|
||||
FURI_LOG_D("Spectrum", "center_freq: %u", model->center_freq);
|
||||
FURI_LOG_D("Spectrum", "center_freq: %lu", model->center_freq);
|
||||
FURI_LOG_D(
|
||||
"Spectrum",
|
||||
"ch[0]: %lu - ch[%u]: %lu",
|
||||
@@ -423,7 +447,7 @@ int32_t spectrum_analyzer_app(void* p) {
|
||||
SpectrumAnalyzerModel* model = spectrum_analyzer->model;
|
||||
|
||||
uint8_t vstep = VERTICAL_SHORT_STEP;
|
||||
uint8_t hstep;
|
||||
uint32_t hstep;
|
||||
|
||||
bool exit_loop = false;
|
||||
|
||||
@@ -453,7 +477,7 @@ int32_t spectrum_analyzer_app(void* p) {
|
||||
break;
|
||||
case InputKeyRight:
|
||||
model->center_freq += hstep;
|
||||
FURI_LOG_D("Spectrum", "center_freq: %u", model->center_freq);
|
||||
FURI_LOG_D("Spectrum", "center_freq: %lu", model->center_freq);
|
||||
spectrum_analyzer_calculate_frequencies(model);
|
||||
spectrum_analyzer_worker_set_frequencies(
|
||||
spectrum_analyzer->worker, model->channel0_frequency, model->spacing, model->width);
|
||||
@@ -463,7 +487,7 @@ int32_t spectrum_analyzer_app(void* p) {
|
||||
spectrum_analyzer_calculate_frequencies(model);
|
||||
spectrum_analyzer_worker_set_frequencies(
|
||||
spectrum_analyzer->worker, model->channel0_frequency, model->spacing, model->width);
|
||||
FURI_LOG_D("Spectrum", "center_freq: %u", model->center_freq);
|
||||
FURI_LOG_D("Spectrum", "center_freq: %lu", model->center_freq);
|
||||
break;
|
||||
case InputKeyOk: {
|
||||
switch(model->width) {
|
||||
@@ -474,6 +498,9 @@ int32_t spectrum_analyzer_app(void* p) {
|
||||
model->width = ULTRANARROW;
|
||||
break;
|
||||
case ULTRANARROW:
|
||||
model->width = PRECISE;
|
||||
break;
|
||||
case PRECISE:
|
||||
model->width = ULTRAWIDE;
|
||||
break;
|
||||
case ULTRAWIDE:
|
||||
|
||||
@@ -15,17 +15,20 @@
|
||||
* wide mode (default): 20 MHz on screen, 196 kHz per channel
|
||||
* narrow mode: 4 MHz on screen, 39 kHz per channel
|
||||
* ultranarrow mode: 2 MHz on screen, 19 kHz per channel
|
||||
* pricse mode: 400 KHz on screen, 3.92 kHz per channel
|
||||
*/
|
||||
#define WIDE 0
|
||||
#define NARROW 1
|
||||
#define ULTRAWIDE 2
|
||||
#define ULTRANARROW 3
|
||||
#define PRECISE 4
|
||||
|
||||
/* channel spacing in Hz */
|
||||
#define WIDE_SPACING 196078
|
||||
#define NARROW_SPACING 39215
|
||||
#define ULTRAWIDE_SPACING 784313
|
||||
#define ULTRANARROW_SPACING 19607
|
||||
#define PRECISE_SPACING 3921
|
||||
|
||||
/* vertical scrolling */
|
||||
#define VERTICAL_SHORT_STEP 16
|
||||
@@ -33,36 +36,40 @@
|
||||
#define MIN_VSCROLL 0
|
||||
#define DEFAULT_VSCROLL 48
|
||||
|
||||
/* frequencies in MHz */
|
||||
#define DEFAULT_FREQ 440
|
||||
#define WIDE_STEP 5
|
||||
#define NARROW_STEP 1
|
||||
#define ULTRAWIDE_STEP 20
|
||||
#define ULTRANARROW_STEP 1
|
||||
#define WIDE_MARGIN 13
|
||||
#define NARROW_MARGIN 3
|
||||
#define ULTRAWIDE_MARGIN 42
|
||||
#define ULTRANARROW_MARGIN 1
|
||||
/* frequencies in KHz */
|
||||
#define DEFAULT_FREQ 440000
|
||||
#define WIDE_STEP 5000
|
||||
#define NARROW_STEP 1000
|
||||
#define ULTRAWIDE_STEP 20000
|
||||
#define ULTRANARROW_STEP 500
|
||||
#define PRECISE_STEP 100
|
||||
|
||||
/* margin in KHz */
|
||||
#define WIDE_MARGIN 13000
|
||||
#define NARROW_MARGIN 3000
|
||||
#define ULTRAWIDE_MARGIN 42000
|
||||
#define ULTRANARROW_MARGIN 1000
|
||||
#define PRECISE_MARGIN 200
|
||||
|
||||
/* frequency bands supported by device */
|
||||
#define BAND_300 0
|
||||
#define BAND_400 1
|
||||
#define BAND_900 2
|
||||
|
||||
/* band limits in MHz */
|
||||
#define MIN_300 281
|
||||
#define CEN_300 315
|
||||
#define MAX_300 361
|
||||
#define MIN_400 378
|
||||
#define CEN_400 435
|
||||
#define MAX_400 481
|
||||
#define MIN_900 749
|
||||
#define CEN_900 855
|
||||
#define MAX_900 962
|
||||
/* band limits in KHz */
|
||||
#define MIN_300 281000
|
||||
#define CEN_300 315000
|
||||
#define MAX_300 361000
|
||||
#define MIN_400 378000
|
||||
#define CEN_400 435000
|
||||
#define MAX_400 481000
|
||||
#define MIN_900 749000
|
||||
#define CEN_900 855000
|
||||
#define MAX_900 962000
|
||||
|
||||
/* band transition points in MHz */
|
||||
#define EDGE_400 369
|
||||
#define EDGE_900 615
|
||||
/* band transition points in KHz */
|
||||
#define EDGE_400 369000
|
||||
#define EDGE_900 615000
|
||||
|
||||
/* VCO transition points in Hz */
|
||||
#define MID_300 318000000
|
||||
|
||||
@@ -58,9 +58,9 @@ static void subghz_load_custom_presets(SubGhzSetting* setting) {
|
||||
{"FM95",
|
||||
"02 0D 0B 06 08 32 07 04 14 00 13 02 12 04 11 83 10 67 15 24 18 18 19 16 1D 91 1C 00 1B 07 20 FB 22 10 21 56 00 00 C0 00 00 00 00 00 00 00"},
|
||||
|
||||
// #2-FSK 200khz BW / 135kHz Filter/ 15.86Khz Deviation + Ramping
|
||||
{"FM15k",
|
||||
"02 0D 03 47 08 32 0B 06 15 32 14 00 13 00 12 00 11 32 10 A7 18 18 19 1D 1D 92 1C 00 1B 04 20 FB 22 17 21 B6 00 00 00 12 0E 34 60 C5 C1 C0"},
|
||||
// AM_Q
|
||||
{"AM_Q",
|
||||
"02 0D 03 07 08 32 0B 06 14 00 13 00 12 30 11 22 10 1C 18 18 19 18 1D 91 1C 00 1B 07 20 FB 22 11 21 B6 00 00 00 C0 00 00 00 00 00 00"},
|
||||
|
||||
// Pagers
|
||||
{"Pagers",
|
||||
|
||||
@@ -157,14 +157,6 @@ static bool flipper_application_assets_process_dirs(
|
||||
FuriString* full_path = flipper_application_assets_alloc_app_full_path(app_name);
|
||||
|
||||
do {
|
||||
if(!storage_simply_mkdir(storage, APPS_ASSETS_PATH)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if(!storage_simply_mkdir(storage, furi_string_get_cstr(full_path))) {
|
||||
break;
|
||||
}
|
||||
|
||||
FuriString* dir_path = furi_string_alloc();
|
||||
char* path = NULL;
|
||||
|
||||
@@ -279,6 +271,8 @@ bool flipper_application_assets_load(File* file, const char* elf_path, size_t of
|
||||
|
||||
FURI_LOG_D(TAG, "Loading assets for %s", furi_string_get_cstr(app_name));
|
||||
|
||||
FuriString* full_path = flipper_application_assets_alloc_app_full_path(app_name);
|
||||
|
||||
do {
|
||||
if(!storage_file_seek(file, offset, true)) {
|
||||
break;
|
||||
@@ -319,13 +313,23 @@ bool flipper_application_assets_load(File* file, const char* elf_path, size_t of
|
||||
FURI_LOG_D(TAG, "Assets removed");
|
||||
}
|
||||
|
||||
if(!storage_simply_mkdir(storage, APPS_ASSETS_PATH)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if(!storage_simply_mkdir(storage, furi_string_get_cstr(full_path))) {
|
||||
break;
|
||||
}
|
||||
|
||||
// process directories
|
||||
if(!flipper_application_assets_process_dirs(storage, file, app_name, header.dirs_count)) {
|
||||
if(header.dirs_count &&
|
||||
!flipper_application_assets_process_dirs(storage, file, app_name, header.dirs_count)) {
|
||||
break;
|
||||
}
|
||||
|
||||
// process files
|
||||
if(!flipper_application_assets_process_files(storage, file, app_name, header.files_count)) {
|
||||
if(header.files_count && !flipper_application_assets_process_files(
|
||||
storage, file, app_name, header.files_count)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -353,6 +357,7 @@ bool flipper_application_assets_load(File* file, const char* elf_path, size_t of
|
||||
}
|
||||
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
furi_string_free(full_path);
|
||||
furi_string_free(app_name);
|
||||
|
||||
FURI_LOG_D(TAG, "Assets loading %s", result ? "success" : "failed");
|
||||
|
||||