Commit Graph

30 Commits

Author SHA1 Message Date
Lefucjusz
5e52e0324f [BH-2009] Change charger chip name to proper one
Renamed some legacy name of battery charger
chip to the one that is used in the device.
Minor cleanups.
2024-06-12 15:20:13 +02:00
Lefucjusz
d8293b8254 Revert "[MOS-1064] Fix no input language selected for French/Spanish"
This reverts commit 9ef454085e.
2024-02-21 17:49:30 +01:00
Lefucjusz
9ef454085e [MOS-1064] Fix no input language selected for French/Spanish
* Fix of the issue that choosing French
or Spanish as a system language
resulted in no input language selected.
* Added keyboard input parser unit
tests for French and Spanish input
maps.
* Minor cleanups.
2024-02-20 16:32:46 +01:00
Lefucjusz
674a768364 [MOS-669] Add too hot battery notification when charging
* Added notification showing on the main
screen if the battery has reached too
high temperature to continue charging.
* Code cleanups.
2023-10-16 12:54:13 +02:00
Lukasz Mastalerz
21171bb474 [BH-1714] Eink refactor and error handling
Cleanup and refactor for eink code.
Changed turning on/off procedure.
Add error handling.
2023-07-14 10:23:42 +02:00
Mateusz Piesta
b6235923bf [BH-1595] USB charger detection issues
* Fixed issues with USB charging port detection
* Fixed memory leak in usb_stack/OS integration layer
* Fixed incorrect handling of software timer
* Minor cleaning/refactor.

[BH-1595] Turned off USB/PC charging

Charging enabled only for a dedicated charger. Users won't be able
to charger while connected to the PC.
2023-04-28 13:54:36 +02:00
Dawid Wojtas
f7980fea6d [BH-1649] Reimplement I2C communication attempts
The CW2015 driver should avoid any logic.
Thus I2C communication attempts were moved
to the BatteryCharger which is product specific.
2023-03-14 15:49:29 +01:00
Lefucjusz
c057799904 [MOS-887] Fix black screen left after power off
Fix of the issue that after powering off
the phone with dark mode enabled the
screen remained black instead of being
cleared to white.
2023-01-25 18:59:49 +01:00
Adam Wulkiewicz
49bbaf51a0 [MOS-550] Improve refresh of the display
1. Implement partial refresh.
2. Implement refresh canceling mechanism.
3. Refactor some parts of the gui and display code.

ad 1.
- Detect parts of the screen changed since last update and merge them
  into bigger regions. These regions defines parts of the context sent
  to the display.
- Refresh the region covering all of the parts since this is the most
  time consuming part and the size of the refreshed region doesn't
  change the time much.
- Refresh the whole screen if deep refresh is requested and previously
  fast refresh was used. This is needed to prevent unwanted artifacts
  in some cases.

ad 2.
- Separate display update and refresh logic.
- Divide image display message handling into two handlers, one updating
  and other one refreshing the screen.
- Add cancel refresh message and use it to cancel refresh during update.
- Store sum of refresh regions gathered during updates to refresh them
  all at once at the end.
2022-10-11 20:00:33 +02:00
Adam Wulkiewicz
f7771013f9 [MOS-550] Revert - Implement eink partial refresh
This reverts commit 41d6e786b6.
2022-09-27 13:14:54 +02:00
Adam Wulkiewicz
41d6e786b6 [MOS-550] Implement eink partial refresh
Detect parts of the screen changed since last update and merge them into
bigger regions. These regions defines parts of the context sent to the
display.
Refresh the region covering all of the parts since this is the most time
consuming part and the size of the refreshed region doesn't change the
time much.
Refresh the whole screen if deep refresh is requested and previously
fast refresh was used. This is needed to prevent unwanted artifacts in
some cases.

Refactor some parts of the gui and display code.
2022-09-22 15:50:30 +02:00
Adam Wulkiewicz
fe708cdf31 [MOS-670] Change clang-format AlwaysBreakTemplateDeclarations to Yes
Add --all and --fix-all options to style-check-hook
2022-08-26 15:22:39 +02:00
Maciej Gibowicz
90543e264f [MOS-648] Fix USB connection/disconnection detection
If there were errors while charging the battery,
e.g. too high temperature, the detection of USB
connection/disconnection failed.
2022-08-12 14:55:46 +02:00
Paweł Joński
870250433a [MOS-298] HALize ServiceEink
Add HAL to ServiceEink
Remove dead code from Linux eink substitute
Fix LUTS.bin refresh problems on simulator
2022-06-29 13:37:20 +02:00
Kuba
ff393d34ec [MOS-451] Drop invalid SoC
Invalid state of charge is now dropped. Invalid SoC was interpreted
as 0% battery.
2022-05-26 10:16:33 +02:00
Maciej Janicki
2b2bb13a49 [MOS-296] Merge remote-tracking branch 'origin/stable'
Merge stable Harmony branch into merge wip branch
2022-03-09 19:27:50 +01:00
Mateusz Piesta
792a663237 [BH-1333] CW2015 driver reactor
CW2015 fuel gauge refactor.
Fixed init logic.
2022-02-09 15:28:03 +01:00
Mateusz Piesta
aca0bb93e4 [BH-1383] Battery scaling table
Fixed battery SOC scaling.
2022-02-01 15:20:12 +01:00
Mateusz Piesta
c1391090c6 [BH-1389] Catch2 unit tests optimization
Removed redundant recompilation of catch2 main
resulted in over 20% speed up of unit tests compilation.
2022-01-26 15:04:23 +01:00
Mateusz Piesta
1946d53efa [BH-1333] Battery subsystem refactor
Interfaces clean up.
Fixed logic flow.
Fixed various bugs.
2022-01-21 13:48:10 +01:00
Mateusz Piesta
b7f4ba33e3 [BH-765] Turn off the device
From now on, Bell can be switched off from:
- settings
- by back long press(5s) from any screen
2021-10-01 14:06:41 +02:00
Lukasz Skrzypczak
1f2a810afb [BH-651] Bell fuel gauge
PR and rebase change
2021-09-29 13:39:25 +02:00
Marcin Smoczyński
1f9109b924 [BH-819] Fix illegal dependencies in bsp
Break circular dependencies in the BSP module. Fix some missing
dependencies which surfaced after fixing BSP.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-09-27 17:27:21 +02:00
Marcin Smoczyński
bd90e57516 [BH-907] Split utils module into components
Split module-utils into smaller components for better dependency
management. Fix many dependencies throughout the project.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-09-23 15:14:40 +02:00
Marcin Smoczyński
f16a18d935 [BH-860] Decouple charger driver from system
Remove system dependency from charger driver implementation. Remove
circular, lambda driven dependency between charger and brownout
detector. Remove event manager dependency in driver as well.
Encapsulate some of charger logic in introduced battery controller.

Extract path configuration to the separate target to decouple charger
from vfs middleware.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-09-20 12:19:48 +02:00
Maciej Janicki
441b9b4667 [BH-715] Add switches handling
Add Bell switches handling including latch support.
2021-09-14 10:13:56 +02:00
Wojtek Rzepecki
a4a5a09c30 [BH-826] Add key input abstraction layer
Added abstraction layer for key input HAL
to provide elastic structure
2021-09-02 16:28:41 +02:00
Wojtek Rzepecki
2ae8f8d6b3 [BH-821] Add battery abstraction layer
Added Abstraction layer for batter charger
to provide support for bell/pure/linux
2021-08-27 14:47:07 +02:00
Mateusz Piesta
82922d21be [BH-795] Add temperature mock
Added temperature interface implementation
for Linux. Added dummy implementation for
RT1051 target.
2021-08-26 11:08:27 +02:00
Mateusz Piesta
3511e64a91 [BH-789] Add thermometer interface
Added abstract temperature source interface
2021-08-25 09:32:41 +02:00