Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Battery Reporting to FindMy #76

Closed
wants to merge 6 commits into from
Closed

Conversation

MatthewKuKanich
Copy link
Member

What's new

  • Added battery reporting to the FindMy App. This works only for Apple AirTags rn but I have a check for safety.
  • Calculates battery percentage by dividing current battery over max battery capacity.
  • Maps those percentages to the 4 Apple AirTag battery statuses.
  • Applies packet data swapping for the battery status byte and saves to file.

For the reviewer

  • I've uploaded the firmware with this patch to a device and verified its functionality
  • I've confirmed the bug to be fixed / feature to be stable

MatthewKuKanich and others added 5 commits April 4, 2024 23:25
* Notes / comments

* Minor gate ID mapping corrections

* add tlsf as submodule

* libs: tlsf

* Furi: tlsf as allocator

* Furi: heap walker

* shmal fixshesh

* f18: tlsf

* PVS: ignore tlsf

* rework subghz settings, enable tx-rx state on unused gpio pin by default

* SubGHz: Refactor last settings logic

* better subghz settings and more anim unload fixes

by Willy-JL

* cleanup unused debug, set proper log levels

* format

* Ext power amp is always true now

* JS: Add badusb layout support

* js add badusb layout support

by Willy-JL

* fix favorites lockup

* JS: Refactor storage to use array buffers

* JS: Add storage copy() move() mkdir()

* fix apps loading logic

* RFID: Fix success title icon overlap

* Sync apps

* Fix build

* Oops (#75 #79)

* Oops (semaphore vs apilock)

This reverts commit f89f775.

* Desktop: Unload animations before FAP is loaded

* Loader: Add API to start app detached (returns instantly, queues app start)

* Desktop: Fix early animation unload deadlocks

* Update symbols

* Fix build and cleanup

* Fix --no-build

* Desktop: Unload animations before FAP is loaded

* Loader: Add API to start detached (returns instantly, queues event)

* Desktop: Fix early animation unload deadlocks

* JS: Fix default layout handling

* Storage: Default volume label DOLPHIN added to virtual storage

* desktop animations unload apilock revert

+ js layout fix and lfrfid ui fix
by Willy-JL

* update readme and fix hex uppercase

* update changelog

* Storage: Virtual volume label is now set from Image Name

* Storage: Updated virtual storage label to use strlcpy

* Improve error handling, use correct drive id

* Fix FATfs drive IDs (0=/ext 1=/mnt)

* Cleanup import

* Update of NFC emulation pict

Visual edits, perspective enhancement and re-centering on y axis.
-> NFC code edit to follow

* Change y value for graphic asset in nfc_protocol_support.c 

Set y=0 for NFC_dolphin_emulation_51x64 asset so it is coherent with the other uses of this pict.

* MNTM Pack - adding iButton (success) yappy asset

* MNTM Pack - Adding "wait" yappy asset

Note - Only used so far in : iButton / Wardriver / SimonSays

* MNTM Pack - Adding Warning yappy assets (normal & flip vers.)

* IR: Fix crash on duty_cycle=1 (#3568)

* IR: Fix crash on duty_cycle=1
* Infrared: use float around duty_cycle

Co-authored-by: あく <[email protected]>

* Furi: Add "out of memory" and "malloc(0)" crash messages (#3574)

Co-authored-by: あく <[email protected]>

* Explain RNG differences, add FURI_HAL_RANDOM_MAX (#3565)

* Explain RNG differences, add FURI_HAL_RANDOM_MAX
* Mark FURI_HAL_RANDOM_MAX unsigned

Co-authored-by: あく <[email protected]>

* MNTM Pack - Adding Save yappy asset

* Move crypto1 to helpers, add it to the public API (#3567)

* Move crypto1 to helpers, add it to the public API
* F18 API version bump

Co-authored-by: あく <[email protected]>

* MNTM Pack - Adding Success yappy asset

* Re-upload of Success asset - oops

Wrong sized vers previously uploaded

* MNTM: Refactor device name to Spoof submenu

* MNTM: Add flipper Shell Color spoofing support

* Misc cleanup/refactor + passes testing

* ASCII of known layouts, pass testing

* I like to moving

* merge upcoming changes

* Parsing function readability refactor

* Ble: set max connection interal same as min, kinda speedups everything

* memmgr: alloc aligned, realloc

* MNTM Pack - Adding Mafia (erf...) yappy asset

* Remove old workflows --nobuild

* Furi: distinct name for auxiliary memory pool

* Furi: put idle and timer thread to mem2

* Furi: fix smal things in allocator

* More cleanup, pass testing

* Archive: Fix .txt file type for /any paths

* MNTM Pack - Adding "done" Yappy (PI) asset

:P

* Update radio stack to v1.19.0 (#3545)

* Update radio stack to v1.19.0
* Ble: set max connection interal same as min, kinda speedups everything

* JS Documentation (#3535)

* Initial JS documentation
* Spelling fix

Co-authored-by: あく <[email protected]>

* Fix BLE Spam #85

* Furi: remove aligned_free. Use free instead.

* Desktop/Loader: Unload animations before loading FAPs (#3573)

* Desktop: Unload animations before FAP is loaded
* Loader: Add API to start detached (returns instantly, queues event)
* Desktop: Fix early animation unload deadlocks
* Loader: remove redundant event
* Bump api symbols

Co-authored-by: あく <[email protected]>
Co-authored-by: SG <[email protected]>

* aligned_malloc -> aligned_alloc

* aligned_alloc, parameters order

* Status output !TX/RX on the GDO2 CC1101 pin (#3571)

* Status output !TX/RX on the GDO2 CC1101 pin\
* Fix PVS warnings

Co-authored-by: あく <[email protected]>

* Fix build

* update changelog

* MNTM Pack - Adding IR reading yappy asset

* Struct&var refactor for clarity

* Only print end validity when present

Same might be worth doing for type & balance, keeping those as is for now; expiry/EV specifically given the switching logic as it has most potential for misinterpretation of null/0 value

* Typo

* Add Dolphin 3d printing and wardriving animation (#86)

* Add files via upload

* Add files via upload

* Update manifest.txt

* Update manifest.txt

* Rebalance levels

* Naming consistency

* Consistent cycle time

---------

Co-authored-by: Willy-JL <[email protected]>

* fkin windows with case insensitive paths

* [FL-3772] Felica poller (#3570)

* New types for felica poller
* New functions for felica data transmissions
* Felica memory map extended with new fields
* Init/deinit of mbedtls context added for felica encryption
* Functions for session key and mac calculations added
* Raw felica_poller implementation added
* Removed MAC type parameter from check_mac function
* Replaced all data fields needed for auth with context structure
* Clean up felica_poller.c
* Now RC block is filled with random numbers
* New parameter for counting well-read blocks
* Some cleanups
* Felica file save and load logic added
* Now we use card key from context for session key calculation
* Copying card key to card block from auth context when both authentications succeeded, otherwise decrement blocks count by 1
* New felica poller event added
* Moved some data structions to public namespace
* FelicaAuthenticationContext struct moved to felica.h
* Field type and name changed for better ones
* Helper functions for felica_auth added to the app
* New scene for felica card key input added
* Logic for felica key input added
* Auth context request processing added
* Added block index definitions and replaced all index numbers with them
* More macro defines
* Replace nesting with do while block
* New function for write operations mac calculation added
* Replace nesting with do while block
* Make functions static for now because they are used internally
* Wrote some comments
* Raw felica render implementation
* New felica scenes
* Adjusted felica dump rendering according design requirements
* New felica scene added
* Helper for switching scene during unlock added
* Added warning scene and transfer to it
* Moved unlock scene logic to separate files
* Magic number changed
* New felica render logic
* Felica scenes adjusted according to design requirements
* Felica poller cleanups
* Some asserts added and some fixed
* Replcaed asserts to checks in public api
* Fixed pvs warnings in felica_poller
* New event for felica_poller added for incomplete read actions
* Handling of new poller event added
* Update SConscript with felica files
* Update api_symbols.csv with felica functions
* Sync API versions

Co-authored-by: あく <[email protected]>

* subghz add manually fixes

* update nfc parser

by zacharyweiss

* update changelog

* aligned_alloc: check that alignment is correct

* unit test: malloc

* unit tests: realloc and test with memory fragmentation

* unit tests: aligned_alloc

* update api

* Allow setting view dispatcher callbacks to NULL

* JS: Fix badusb double free crash with quit()

* Sync apps

- Picopass: Save as LFRFID and improvements (by bettse)
- NFC Magic: Gen4 sync and fixes (by xMasterX)

* Format

* js fix badusb double free crash with quit()

by Willy-JL

* Allow no prefix usage of name_generator_make_detailed_datetime

Remove extra check for NULL since check is present in code already

* BLE Spam: Fix back event deadlocks

* MNTM Pack - Adding RFID Receive/Send yappy graphic assets

Last 2 ones of the static graphic assets ! O_oV

* [FL-3750] Mf Desfire multiple file rights support (#3576)

* mf desfire: remove unused type
* mf desfire: continue reading after failed get free mem cmd
* mf desfire: fix processing read master key settings command
* mf desfire: don't read applications if they are auth protected
* mf desfire: handle multiple rights
* mf desfire: fix PVS warnings
* mf desfire: fix print format
* mf desfire: fix logs
* mf classic: add send frame functions to poller
* unit tests: add test from mfc crypto frame exchange
* mf classic: add documentation
* mf classic: fix incorrect name
* target: fix api version

* Allow empty prefix in name generator

* BLE: Allow bonding with GapPairingNone

* BadKB: Fix mac address for remember on/off

* BadKB: Improve BT Remember handling

* BadKB: Choose BT Pairing security mode (YesNo, PIN Type, Pin Y/N)

* Impl basic favorite ability for WAVs

Namely just for the sake of favorite-ing the cart lock/unlock. Requires changes to WAV player ext fap, as to be PR'd from the Momentum-Apps repo.

* Update WAV fap for compatibility

* Delete assets/dolphin/internal/L1_NoSd_128x49/frame_1.png

* Delete assets/dolphin/internal/L1_NoSd_128x49/frame_2.png

* Delete assets/dolphin/internal/L1_NoSd_128x49/frame_3.png

* Delete assets/dolphin/internal/L1_NoSd_128x49/frame_4.png

* Delete assets/dolphin/internal/L1_NoSd_128x49/frame_5.png

* Replacing frame_0 & meta

* [FL-2969] FuriHal: add ADC API (#3583)

* Examples: remove unused context
* FuriHal: add simple ADC API
* Examples: add ADC example app
* FuriHal: add extended configuration options for ADC API
* FuriHal: add ADC clock configuration, fix calibration routine for single ended mode, new optimized parameters, documentation.
* FuriHal: add FuriHalAdcChannelTEMPSENSOR sampling time note
* FuriHal: update FuriHalAdcChannelVBAT description.
* FuriHal: use insomnia while ADC is acquired.
* Examples: cleanup example_adc a little bit

* Sync WAV Player

* [FL-3679] iButton new UI (#3471)

* iButton new UI
* UI final touches
* Satisfy PVS

Co-authored-by: Aleksandr Kutuzov <[email protected]>

* Update tv.ir (#3584)

Co-authored-by: あく <[email protected]>

* Allow setting view_dispatcher callbacks to NULL again (#3580)

Co-authored-by: あく <[email protected]>

* nfc app: fix false positive verification in bip plugin (#3595)

Co-authored-by: あく <[email protected]>

* BLE: Add GapPairingNone support (#3596)

* BLE: Add GapPairingNone support
* FuriHal: cleanup naming in ble gap, remove useless config options

Co-authored-by: あく <[email protected]>

* Update symbols

---------

Co-authored-by: Zachary Weiss <[email protected]>
Co-authored-by: SG <[email protected]>
Co-authored-by: MX <[email protected]>
Co-authored-by: Willy-JL <[email protected]>
Co-authored-by: Nick Shaw <[email protected]>
Co-authored-by: Kuronons <[email protected]>
Co-authored-by: あく <[email protected]>
Co-authored-by: Astra <[email protected]>
Co-authored-by: Nikolay Minaylov <[email protected]>
Co-authored-by: Victor Nikitchuk <[email protected]>
Co-authored-by: Chonk_m <[email protected]>
Co-authored-by: RebornedBrain <[email protected]>
Co-authored-by: gornekich <[email protected]>
Co-authored-by: KRukus9 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant