Skip to content

Commit

Permalink
Merge branch 'Next-Flip:release' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
GameLord2011 authored Oct 25, 2024
2 parents 1ca4d7f + 0291393 commit acc1695
Show file tree
Hide file tree
Showing 2,337 changed files with 8,920 additions and 7,690 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}

- name: "Check code formatting"
run: ./fbt lint lint_py
run: ./fbt lint_all
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
[submodule "lib/mlib"]
path = lib/mlib
url = https://github.com/P-p-H-d/mlib.git
[submodule "lib/littlefs"]
path = lib/littlefs
url = https://github.com/littlefs-project/littlefs.git
[submodule "lib/nanopb"]
path = lib/nanopb
url = https://github.com/nanopb/nanopb.git
Expand Down
2 changes: 1 addition & 1 deletion .pvsoptions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--ignore-ccache -C gccarm --rules-config .pvsconfig -e lib/cmsis_core -e lib/fatfs -e lib/fnv1a-hash -e lib/FreeRTOS-Kernel -e lib/heatshrink -e lib/libusb_stm32 -e lib/littlefs -e lib/mbedtls -e lib/microtar -e lib/mlib -e lib/stm32wb_cmsis -e lib/stm32wb_copro -e lib/stm32wb_hal -e lib/u8g2 -e lib/nanopb -e lib/mjs -e */arm-none-eabi/*
--ignore-ccache -C gccarm --rules-config .pvsconfig -e lib/cmsis_core -e lib/fatfs -e lib/fnv1a-hash -e lib/FreeRTOS-Kernel -e lib/heatshrink -e lib/libusb_stm32 -e lib/mbedtls -e lib/microtar -e lib/mlib -e lib/stm32wb_cmsis -e lib/stm32wb_copro -e lib/stm32wb_hal -e lib/u8g2 -e lib/nanopb -e lib/mjs -e */arm-none-eabi/*
4 changes: 1 addition & 3 deletions .sublime-project
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
"clangd": {
"enabled": true,
"initializationOptions": {
// Use with toolchain version 39+
// Set `"binary": "custom",` option in LSP-clangd config to use toolchain clangd
// "custom_command": ["toolchain/current/bin/clangd"],

"custom_command": ["toolchain/current/bin/clangd"],
"clangd.compile-commands-dir": "build/latest",
"clangd.header-insertion": "never",
"clangd.query-driver": "**/arm-none-eabi-*",
Expand Down
2 changes: 1 addition & 1 deletion .vscode/example/settings.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"SConstruct": "python",
"*.fam": "python"
},
// "clangd.path": "${workspaceFolder}/toolchain/current/bin/clangd@FBT_PLATFORM_EXECUTABLE_EXT@",
"clangd.path": "${workspaceFolder}/toolchain/current/bin/clangd@FBT_PLATFORM_EXECUTABLE_EXT@",
"clangd.arguments": [
"--query-driver=**/arm-none-eabi-*",
"--compile-commands-dir=${workspaceFolder}/build/latest",
Expand Down
173 changes: 21 additions & 152 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,161 +1,30 @@
### Breaking Changes:
- VGM: Reworked color customization functionality over RPC (by @HaxSam & @Willy-JL)
- Better rainbow support, more responsive config, custom fore/back-ground
- If you used this, need to reflash your VGM and reconfigure the colors
### Note:
- This is a smaller release due to the bugfixes it contains, make sure to also read the changelog for [mntm-006](https://github.com/Next-Flip/Momentum-Firmware/releases/tag/mntm-006)

### Added:
- Apps:
- RFID: T5577 Raw Writer (by @zinongli)
- Sub-GHz:
- New Legrand doorbell protocol (#120 by @user890104)
- Integrate EmosE601x and Acurite 5in1 protocols from WS app (#170 by @htotoo)
- Choose RSSI threshold for Hopping mode (by @Willy-JL)
- UL: Novoferm remotes full support (by @xMasterX)
- UL: Add manually Hormann EcoStar, also Sommer FM238 option when default won't work (by @xMasterX)
- OFW: Princeton protocol add custom guard time (by @Skorpionm & @xMasterX)
- NFC:
- Add parser for CSC Service Works Reloadable Cash Card (#137 by @zinongli)
- OFW: Mifare Plus detection support (by @Astrrra)
- OFW: Felica emulation (by @RebornedBrain)
- OFW: Write to Ultralight cards is now possible (by @RebornedBrain & @gornekich)
- OFW: Ultralight C authentication with des key (by @RebornedBrain)
- OFW: Add `mf_classic_set_sector_trailer_read()` function (by @Astrrra)
- RFID:
- Add blank InstaFob detection (by @jamisonderek)
- OFW: Added Support for Securakey Protocol and RKKTH Plain Text Format (by @zinongli)
- MNTM Settings: Click Ok on Asset Pack setting to choose from a full-screen list (by @Willy-JL)
- JS:
- Added ADC (analog voltage) support to gpio library (#143 by @jamisonderek)
- Support `subghz` custom modulation, support `transmitFile(path, repeats)`, new `end()` function (by @Willy-JL)
- FBT:
- New `SKIP_EXTERNAL` toggle and `EXTRA_EXT_APPS` config option (by @Willy-JL)
- Close current app when flashing firmware (by @Willy-JL)
- GUI: Additional `menu_get_selected_item()` API (by @Willy-JL)
- Desktop:
- Added TV animation from OFW which was missing (internal on OFW)
- OFW: New Intruder animation (by @Astrrra)
- UL: BadKB: Add Finnish keyboard layout (by @nicou)
- OFW: JS: New modules documentation added (by @rnadyrshin)
- Updater:
- OFW: Resource compression refactor, uses heatshrink (by @hedger)
- Adapted gzip to new `CompressStreamDecoder` API, better compression ratio (#152 by @Willy-JL)
- OFW: CLI: New `top` command, replaces `ps`, now includes CPU usage info too (by @skotopes)
- Furi:
- OFW: Event loop (by @skotopes)
- OFW: Thread signals, loader close, loader get app name (by @gsurkov)
- OFW: Event Loop Timers (by @gsurkov)
- OFW: Count ISR time and show in top command (by @skotopes)
- OFW: RPC: Add TarExtract command, some small fixes (by @Willy-JL)
- OFW: USB/CCID: Add initial ISO7816 support, improve data handling, add CCIDWorker (by @kidbomb)
- OFW: FBT/VsCode: Tweaks for cdb generation for clangd (by @hedger)
- Games: Laser Tag (by @RocketGod-git & @jamisonderek)
- NFC: Added new Saflok parser (#196 #201 by @zinongli & @xtruan & @zacharyweiss & @evilmog & @Arkwin)
- OFW: Desktop: New Procrastination dolphin animation (by @Astrrra)

### Updated:
- Apps:
- VGM Tool: New RGB VGM firmware to support Flipper FW changes (by @HaxSam)
- MFKey: 30% speedup, fix half speed mode, fix UI bugs (by @noproto)
- Picopass: Acknowledgements page, Elite VB6 RNG keygen attack, plugin and app improvements (by @bettse)
- Seader: T=1 support, APDURunner, Handle SAM removal better, UI improvements, validate LRC, memory management fixes (by @bettse)
- NFC Magic: Gen1 backdoor read support (by @Astrrra)
- Authenticator: Support multiple BT profiles, fix URL format (by @akopachov)
- NFC Playlist: Various fixes and improvements, new icon (by @acegoal07)
- BMI160 Air Mouse: Add support for LSM6DSO (by @alex-vg & @ginkage)
- ESP32CAM Camera Suite: Fix pinout diagram GND, fix horizontal flip (by @CodyTolene)
- Quac: Fix IR import busfault on empty, add hint text on Empty group (by @Willy-JL)
- UL: ESubGHz Chat: Add back NFC key sharing with nfclegacy (by @xMasterX)
- UL: Mifare Nested: Free some space by simplifying nfclegacy lib (by @xMasterX)
- UL: WAV Player: Reconfigure to use 8-bit memory buffer, halving memory usage (by @CookiePLMonster)
- UL: RFID Fuzzer: Fix worker not being in LFRFIDWorkerIdle before next key (by @xMasterX)
- UL: Barcode: Fix backlight settings (by @xMasterX)
- OFW: NFC/RFID Detector: Fix some typos (by @Skorpionm)
- OFW: BT/USB Remote: Improved keyboard UI (by @Astrrra)
- Many apps updated for new refactors (by @Willy-JL & @xMasterX)
- NFC:
- EMV Transactions menu less nested in UI, hide if data unavailable (by @Willy-JL)
- Mention using MFKey app after Detect Reader (by @Willy-JL)
- UL: Better plugin loading, faster launch from favourites, no lag in Saved menu (by @xMasterX)
- OFW: Cache plugin name not full path, saves some RAM (by @Willy-JL & @gornekich)
- OFW: Update link to mfkey32 (by @Astrrra)
- Picopass: CVE-2024-41566, When keys are unknown emulate with a dummy MAC and ignore reader MACs (by @nvx)
- Seader: Card parsing and saving UI and logic improvements (by @bettse)
- Authenticator: Confirm token export on Flipper (by @akopachov)
- NFC Playlist: Allow delay up to 12s (by @xtruan)
- BLE Spam: Fix delay help section (by @Willy-JL)
- WAV Player: Fix unresponsiveness (by @Willy-JL)
- Sub-GHz:
- Refactor Weather protocols in Sub-GHz app, shows only correct data (by @Willy-JL)
- Streamline generic serialize +1.5k free flash (by @Willy-JL)
- UL: Refactor frequency analyzer code for better readability (by @derskythe)
- JS: Refactored `widget` and `keyboard` modules with `ViewHolder`, fix crash (by @Willy-JL)
- Desktop:
- Slim down internal anims, +3.4kb free flash (by @Willy-JL)
- Desktop: Fix butthurt and levels, respects Flipper mood better (by @Willy-JL)
- OFW: Allow to close blocking bad sd animation (by @skotopes)
- NFC: Updated MFC dict, 135 new keys (from RRG pm3 repo & UberGuidoZ dump)
- RFID:
- UL: Update T5577 password list (by @korden32)
- UL: DEZ 8 display form for EM4100 (by @korden32 & @mishamyte)
- Main Menu: Unload menu and app list when opening apps +7kb free RAM (#161 by @Willy-JL)
- Asset Packs: Refactor icon loader into draw step +4.2kb free RAM (#164 by @Willy-JL)
- Infrared: Added missing Koro Box entry to TV universal remote (#159 by @skyhawkillusions)
- OFW: iButton/RFID: Separate editing and renaming (by @Astrrra)
- CLI:
- Simpler plugin wrapper +0.5k free flash (by @Willy-JL)
- OFW: Minor storage subcommand lookup refactor (by @hedger)
- Furi:
- OFW: Use static synchronisation primitives, prepare for event loop (by @gsurkov & @skotopes)
- OFW: Coalesce some allocations, smaller memory footprint (by @CookiePLMonster)
- OFW: Put Input state data on the stack of the service (by @CookiePLMonster)
- OFW: BLE: Update to copro light stack v1.20.0 (by @hedger)
- FBT:
- OFW: Toolchain v38, clangd as default language server (by @hedger)
- OFW: Code formatting update (by @hedger)
- OFW: Reordered VS-Code Tasks to follow the [Release] > [Debug] schema (by @janwiesemann)
- UL: Documentation: Cleanup and format markdown better (by @derskythe)
- OFW: Code Cleanup: Unused includes, useless checks, unused variables, etc... (by @skotopes)
- Show Weather Station icon for WS signals (by @Willy-JL)
- Update Oregon 2 and 3 weather info display to new design (by @Willy-JL)
- API: Publishing T5577 page 1 block count macro (by @zinongli)

### Fixed:
- OFW: USB: IRQ, CDC and EP fixes, no more "Operation timeout (generic)" updating from OFW (by @skotopes)
- Archive:
- Fix favorite's parent folders thinking they are favorited too (by @Willy-JL)
- Fix rename extension show/hide behavior (by @Willy-JL)
- OFW: Fix memory leak in favorites add/remove (by @skotopes)
- JS:
- Fix `subghz` RAW files, fix memory leaks, deinit correctly, better error handling (by @Willy-JL)
- OFW: Disable logging in mjs +2k free flash (by @hedger)
- Infrared:
- Correct Samsung.ir CH+ command (#156 by @skyhawkillusions)
- Remove duplicates from LED universal remote, add missing Fan and Projector signals (#165 #167 by @Wemmy0)
- OFW: Check for negative timings (by @gsurkov)
- Sub-GHz:
- UL: Fix Add Manually for Princeton, Normstahl, Sommer, MHouse, Aprimatic (by @xMasterX)
- UL: Improve custom buttons for MHouse, Novoferm, Nice Smilo (by @xMasterX)
- UL: Fix various Decode RAW bugs (by @xMasterX)
- UL: Fix Hormann HSM 44bit static button code decoding (by @xMasterX)
- UL: Sync signal delete scene with OFW (by @xMasterX)
- UL: Fix incorrect rx key state when opening Read menu (by @xMasterX)
- UL: Fix crash on wrong rx key states (by @xMasterX)
- OFW: Fixed transition to Saved menu after Delete RAW (by @Skorpionm)
- FBT:
- Consistent version/branch info, fix gitorigin (by @Willy-JL)
- OFW: Fixed starting apps with spaces in path (by @hedger)
- Asset Packs: Pack pre-compiled icons and fonts too, fix animated icons edge cases (by @Willy-JL)
- GUI: Return user-provided index from `menu_set_selected_item()` like `submenu` equivalent (by @Willy-JL)
- OFW: RPC: Fix input lockup on disconnect (by @Willy-JL)
- OFW: ELF/Flipper application: Do not crash on "out of memory" (by @DrZlo13)
- NFC:
- OFW: Fixed infinite loop in dictionary attack scene (by @RebornedBrain)
- OFW: ISO15693 Render Typo Fix (by @zinongli)
- OFW: Desktop: Lockup fix, GUI improvements (by @skotopes)
- OFW: Loader: Fix crash on locked via cli loader (by @DrZlo13)
- OFW: iButton/RFID: Fix Add Manually results being discarded (by @Astrrra)
- OFW: Power: Fix typo in "charge me" screen (by @liamhays)
- OFW: Accessor: Disable expansion service on start (by @skotopes)
- OFW: Updater: Slightly smaller image (by @hedger)
- OFW: Debug: Backup openocd work area, fix crash after fresh debugger connect and continue (by @skotopes)
- OFW: Cleanup of various warnings from clangd (by @hedger)
- OFW: ReadMe: update outdated bits and pieces (by @skotopes)
- OFW: Fix .editorconfig (by @leon0399)

### Removed:
- Furi:
- Temp disabled `FURI_TRACE` due to DFU size, some crashes will say `furi_check failed` instead of source path
- Reverted TLSF allocator due to diminishing results on RAM usage
- API:
- Removed unused `Rgb565Color` and `rgb565cmp()` since VGM colors use normal RGB colors now
- Removed unused `furi_hal_usb_get_config_context()` function since BadKB doesn't use it anymore
- UL: Sub-GHz: Removed broken `HND_1` modulation
- OFW: CLI: Removed `ps` command, replaced by `top`
- Sub-GHz: Fix Acurite 986 temperature value conversion (by @Willy-JL)
- Desktop:
- Fix disabling keybinds (by @Willy-JL)
- Sanity check PIN length for good measure (by @Willy-JL)
- Fix PIN locked with no PIN set edge case (by @Willy-JL)
- Settings: Fix duplicates in Power Settings when opening submenus (by @Willy-JL)
- RGB Backlight: Fix config migration (by @Willy-JL)
2 changes: 1 addition & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Note that this repo is always updated with the great work from our friends at [U
[Updated]
- Enhanced WiFi support for easiest setup ever
- Extended keyboard with cursor movevent and symbols
- Extended keyboard with cursor movement and symbols
- File Browser with Sorting, More supported File Types
- Advanced and optimized Level System (Up to 30 levels)
- Desktop Keybind system for full key and press/hold remapping
Expand Down
41 changes: 40 additions & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,13 @@ firmware_env.Append(
"SConstruct",
"firmware.scons",
"fbt_options.py",
]
],
IMG_LINT_SOURCES=[
# Image assets
"applications",
"!applications/external",
"assets",
],
)


Expand Down Expand Up @@ -359,6 +365,39 @@ distenv.PhonyTarget(
PY_LINT_SOURCES=firmware_env["PY_LINT_SOURCES"],
)

# Image assets linting
distenv.PhonyTarget(
"lint_img",
[
[
"${PYTHON3}",
"${FBT_SCRIPT_DIR}/imglint.py",
"check",
"${IMG_LINT_SOURCES}",
"${ARGS}",
]
],
IMG_LINT_SOURCES=firmware_env["IMG_LINT_SOURCES"],
)

distenv.PhonyTarget(
"format_img",
[
[
"${PYTHON3}",
"${FBT_SCRIPT_DIR}/imglint.py",
"format",
"${IMG_LINT_SOURCES}",
"${ARGS}",
]
],
IMG_LINT_SOURCES=firmware_env["IMG_LINT_SOURCES"],
)

distenv.Alias("lint_all", ["lint", "lint_py", "lint_img"])
distenv.Alias("format_all", ["format", "format_py", "format_img"])


# Start Flipper CLI via PySerial's miniterm
distenv.PhonyTarget(
"cli",
Expand Down
54 changes: 26 additions & 28 deletions applications/debug/accessor/accessor_view_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,49 @@
AccessorAppViewManager::AccessorAppViewManager() {
event_queue = furi_message_queue_alloc(10, sizeof(AccessorEvent));

view_dispatcher = view_dispatcher_alloc();
auto callback = cbc::obtain_connector(this, &AccessorAppViewManager::previous_view_callback);
view_holder = view_holder_alloc();
auto callback =
cbc::obtain_connector(this, &AccessorAppViewManager::view_holder_back_callback);

// allocate views
submenu = submenu_alloc();
add_view(ViewType::Submenu, submenu_get_view(submenu));

popup = popup_alloc();
add_view(ViewType::Popup, popup_get_view(popup));

gui = static_cast<Gui*>(furi_record_open(RECORD_GUI));
view_dispatcher_attach_to_gui(view_dispatcher, gui, ViewDispatcherTypeFullscreen);
// set back callback
view_holder_set_back_callback(view_holder, callback, NULL);

// set previous view callback for all views
view_set_previous_callback(submenu_get_view(submenu), callback);
view_set_previous_callback(popup_get_view(popup), callback);
gui = static_cast<Gui*>(furi_record_open(RECORD_GUI));
view_holder_attach_to_gui(view_holder, gui);
}

AccessorAppViewManager::~AccessorAppViewManager() {
// remove views
view_dispatcher_remove_view(
view_dispatcher, static_cast<uint32_t>(AccessorAppViewManager::ViewType::Submenu));
view_dispatcher_remove_view(
view_dispatcher, static_cast<uint32_t>(AccessorAppViewManager::ViewType::Popup));

// remove current view
view_holder_set_view(view_holder, NULL);
// free view modules
furi_record_close(RECORD_GUI);
submenu_free(submenu);
popup_free(popup);

// free dispatcher
view_dispatcher_free(view_dispatcher);

// free view holder
view_holder_free(view_holder);
// free event queue
furi_message_queue_free(event_queue);
}

void AccessorAppViewManager::switch_to(ViewType type) {
view_dispatcher_switch_to_view(view_dispatcher, static_cast<uint32_t>(type));
View* view;

switch(type) {
case ViewType::Submenu:
view = submenu_get_view(submenu);
break;
case ViewType::Popup:
view = popup_get_view(popup);
break;
default:
furi_crash();
}

view_holder_set_view(view_holder, view);
}

Submenu* AccessorAppViewManager::get_submenu() {
Expand All @@ -65,16 +69,10 @@ void AccessorAppViewManager::send_event(AccessorEvent* event) {
furi_check(result == FuriStatusOk);
}

uint32_t AccessorAppViewManager::previous_view_callback(void*) {
void AccessorAppViewManager::view_holder_back_callback(void*) {
if(event_queue != NULL) {
AccessorEvent event;
event.type = AccessorEvent::Type::Back;
send_event(&event);
}

return VIEW_IGNORE;
}

void AccessorAppViewManager::add_view(ViewType view_type, View* view) {
view_dispatcher_add_view(view_dispatcher, static_cast<uint32_t>(view_type), view);
}
Loading

0 comments on commit acc1695

Please sign in to comment.