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

WIP: Add Charge Current Limit functionality #364

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

RichardoC
Copy link

What's new


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

@RichardoC
Copy link
Author

RichardoC commented Jan 26, 2025

How should I add this to the actual UI to then test it on a real device? Specifically, what's a good example of similar existing functionality I should emulate

@RichardoC
Copy link
Author

RichardoC commented Jan 26, 2025

I tried to run the tests but they failed with the following, which seems unrelated

user@host 15:57:30  last-exit:2 $
./fbt FIRMWARE_APP_SET=unit_tests flash_usb      

fbt: warning: Failed parsing manifest '/REDACTED/Momentum-Firmware/applications/external/mtp/application.fam' : Invalid appid '.f0_mtp'. Must match regex 're.compile('^[a-z0-9_]+$')'
LoadAppManifest, line 135, in file "/REDACTED/Momentum-Firmware/scripts/fbt_tools/fbt_apps.py"

fbt: warning: Failed parsing manifest '/REDACTED/Momentum-Firmware/applications/external/mtp/application.fam' : Invalid appid '.f0_mtp'. Must match regex 're.compile('^[a-z0-9_]+$')'
LoadAppManifest, line 135, in file "/REDACTED/Momentum-Firmware/scripts/fbt_tools/fbt_apps.py"
        SDKCHK  targets/f7/api_symbols.csv
API version 79.2 is up to date
        LINK    build/f7-firmware-C/firmware.elf
/REDACTED/Momentum-Firmware/toolchain/arm64-darwin/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld: build/f7-firmware-C/applications/debug/unit_tests/unit_test_api_table.o:(.rodata._ZL20unit_tests_api_table+0x34): undefined reference to `js_thread_run'
/REDACTED/Momentum-Firmware/toolchain/arm64-darwin/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld: build/f7-firmware-C/applications/debug/unit_tests/unit_test_api_table.o:(.rodata._ZL20unit_tests_api_table+0x64): undefined reference to `js_thread_stop'
collect2: error: ld returned 1 exit status
scons: *** [build/f7-firmware-C/firmware.elf] Error 1

********** FBT ERRORS **********
build/f7-firmware-C/firmware.elf: Error 1

macOS 15.2 (24C101)
aarch64 hardware

@RichardoC RichardoC changed the title feat: Add Charge Current Limit functionality WIP: Add Charge Current Limit functionality Jan 26, 2025
@RichardoC
Copy link
Author

To clarify as well, despite this accepting values, the chip should have a resistor which also caps the charging current, and the charging chip uses the lower of the two values
https://www.ti.com/lit/ds/symlink/bq25896.pdf bottom of page 5

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