Commit Graph

320 Commits

Author SHA1 Message Date
Lefucjusz
181feb4f40 cleanup 2024-08-20 15:40:34 +02:00
Lefucjusz
df6d7848f5 [BH-2056] Add bedside lamp settings
Added possibility to customize
brightness and activity time
of bedside lamp functionality.
2024-08-19 15:58:30 +02:00
Lefucjusz
85a6dba50d [BH-2054] Fix build with CONFIG_ENABLE_TEMP set to ON
* Fix of the issue that project build would
fail if trying to run it with enabled
temperature sensor. The sensor itself is
not functional due to hardware issue,
but if such option is present in the
codebase, it should be kept working.
* Cleanups.
2024-08-09 14:59:34 +02:00
Dawid Wojtas
70d3ba4c03 [BH-1935] Fix the backlight in pre-wake up
If the chime is before the backlight we need to ignore
keys. Otherwise the back button will run the backlight.
2024-04-15 14:29:55 +02:00
rrandomsky
93eb6be683 [BH-1799] Refactor usage of unicasts to dispatch BatteryStatusChangeMessage
Unicast type of sending BatteryStatusChangeMessage is changed to multicast type.
Thanks to this, the flow of messages is more transparent
and there is no unnecessary transmission to non-existent services.
2024-03-12 11:31:45 +01:00
Lefucjusz
8b3ae7b48c [BH-1857] Fix improper PWM module clock frequency computation
* Fix of the issue that source clock for PWM
module was improperly assumed to be derived
from AHB_CLK, while in reality it is
derived from IPG_CLK, what resulted in
module generating signal with 4 times
lower frequency than the configured
one.
* Cleanups.
2024-01-16 13:58:26 +01:00
Lefucjusz
4b66a8974f [BH-1782] Add brightness fade in
* Added brightness fade in - feature
which allows for gradual frontlight
brightness rise during alarm and
power nap ringing instead of turning
on with full brightness immediately.
* Fixed possibility to close
ringing power nap by long press
of back button.
2023-11-28 10:11:26 +01:00
Lukasz Mastalerz
feec59f534 [BH-1696] Notification when connect the device to the charger
Adding notifications when charger is connected
2023-10-31 16:23:48 +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
Maciej Gibowicz
635ad1ac05 [BH-1774] Fix frequency lock during user activity
- Sentinel locks the frequency when pressing buttons and the encoder.
- The "user activity" sentinel will be properly managed by the system
(CpuGovernor) just like other sentinels.
- Adding information about active sentinels in the power management
statistics logs
2023-09-26 11:04:50 +02:00
Dawid Wojtas
ddc1c64160 [BH-1761] Add a log when manual reset is performed
If the user performs a manual reset there is no information in
the logs. It can be treated as software resets.
So the best solution is to add a log about incoming
manual reset and dump all logs to the file.
2023-08-31 17:11:16 +02:00
Lefucjusz
7a8e35016d [MOS-1026] Add extended logging to Pure's charger driver
* Added extended logging to Pure's charger driver.
* Removed redundant handling of INOKB pin
interrupt - charger is configured to provide
the same interrupt via INTB pin.
* Minor code cleanup.
2023-08-28 10:14:51 +02:00
Lukasz Mastalerz
f7ad63c951 [BH-1412] Fix services dependencies
Changes in dependecy managment
Replacing state flags with states in ServiceGUI
Unifying some parts of code
2023-08-01 17:22:48 +02:00
rrandomsky
4b8543912a [MOS-30] Fix for Alarm not being handled properly during a phone call
During the phone call, the alarm was not displayed and subsequent alarms
after this scenario did not work. This has now been fixed and the alarm
during a phone call will be automatically snooze.
2023-07-12 10:46:44 +02:00
Adam Wulkiewicz
d2bf42d411 [BH-1655] Fix memory leaks in clock faces and shortcuts
Disable libphonenumber initialization since it is not used in Harmony
but takes around 1.4MB of memory

Add heap allocation statistics
2023-03-17 12:44:30 +01:00
Dawid Wojtas
2cbadc6a00 [BH-1630] Turn off the device for low voltage
The system closes only if the SoC is 0%, but
it doesn't react if the voltage has low level.
The new implementation invokes the close
procedure if the voltage is less than 3.4V.
This solution should avoid possiblity to
hang the MCU.
2023-03-16 11:14:38 +01: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
Lukasz Mastalerz
75b531f7e2 [MOS-871] Loudspeaker icon is not updated when audio routing has changed
Fix for the loudspeaker becomes active again when a headset is unplugged
if it was on while the headset was connected to the phone.
Fix typo in Bluetooth in EventType enum.
2023-02-21 15:40:39 +01:00
Lefucjusz
ddf4a6f573 [MOS-905] Fix crash on power off with USB cable connected
Fix of the issue that turning off the phone and
clicking any keyboard button resulted in
crash and reboot.
2023-02-17 11:29:37 +01:00
Bartosz
fab9068a52 [MOS-786] Added A/B booting support in OS
Added basic support for A/B booting
2023-01-19 16:41:56 +01:00
Maciej-Mudita
4bd7b1acf4 [MOS-275] Fix alarm rings on the low battery screen
When we had a critical battery level and the alarm clock rang,
it was impossible to turn it off.
2023-01-19 12:07:19 +01:00
Dawid Wojtas
79e1688149 [BH-1574][BH-1614] Fix the bedside lamp and brightness in the alarm
Now the bedside lamp has lower priority
than the pre-wake up and main alarm. It means
that front light will be changed according
to alarm settings.

Fix front light brightness calculation for
pre-wake up and main alarm.
2022-12-06 12:42:23 +01:00
Dawid Wojtas
50b44a6da8 [BH-1574][BH-1597] Improvement of bedside lamp
Improve bedside lamp behavior in alarm
application. Change frontlight long press
from 3 seconds to 2 in order to activate
bedside lamp.
2022-11-09 09:02:16 +01:00
Dawid Wojtas
e77b5d6702 [MOS-424] Improvement of logger module
Due to losing bytes the logger has a worker
which is responsible for dumping logs to
the file. The logger also has its own timer
to dump logs every 15 minutes. EventManager
is not responsible for interval dumping logs
now.
2022-09-15 11:58:09 +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
Lefucjusz
2f74db29a6 [MOS-608] Fix crash on phone turn off
Fix of the crash that sometimes happened
during system closing.
2022-08-25 16:13:58 +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
Dawid Wojtas
8cc5960ed6 [MOS-499] Improve lock screen power consumption
Power on the e-ink only when it is needed e.g. fast or deep
refresh. Update battery percentage only when discharging.
2022-07-28 11:55:51 +02:00
Adam Wulkiewicz
4a11f85ae2 [MOS-210] Avoid blocking of key handling, artificially generate Release
In rare cases when corresponding Press and Release key events were not
generated the logic prevented other keys from being handled. Handling of
other keys is no longer blocked.

In addition to the above Release event is artificially generated. This
ensures that key presses are not ignored if there were no real Release
event. Typically this may occur when keys are pressed fast one after
another. A side effect is that when a key was pressed while other one
was already pressed then both of them are handled by the UI which
prevents e.g. letters from being ignored while writing.
2022-07-12 13:30:04 +02:00
Paweł Joński
9d6769d82c [BH-1509] Frontlight wont flash on snooze
Frontlight wont flash on snooze when alarm light is off
and automatic frontlight mode is on
2022-07-07 13:36:33 +02:00
Kuba
c31856fb69 [MOS-509] Fixed tethering popup loop
Tethering popup loop is fixed. Also there was unneded USB
configuration on each battery SoC change event.
2022-06-09 13:08:07 +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
Kuba
155edc32fe [MOS-450] Fix turn off torch on critical battery level
Torch is now disabled on critical low battery level.
It will protect from battery draining.
2022-05-06 12:20:52 +02:00
Adam Dobrowolski
3343f02809 [MOS-266] Call StateMachine implementation
With some tests, documentation and so on
2022-05-02 15:54:33 +02:00
Maciej Gibowicz
e5114922d3 [MOS-138] Correction of URC poll mode parameters
In poll mode, the CSQ will be requested every 15 minutes
and another attempt to switch the mode will be after 1 hour.
If the keyboard is unlocked or the USB cable is connected
or the BT car kit is connected, the URCs will be operated
in the reporting mode.
2022-04-28 09:19:39 +02:00
Bartosz Cichocki
2be81bdf0a [MOS-365] Add BT battery handling
Added handling of the battery state in HFP profile
2022-04-13 09:46:21 +02:00
Mateusz Piesta
2f42cd5e73 [BH-1424] FreeRTOS update
Updated FreeRTOS source code to 10.4.6.
Moved FreeRTOS sources to the third-party directory.
Added necessary changes to the CMake configuration.
Split FreeRTOSConfig.h. From now, each board has its own.
Added missing log headers.
Minor refactor of the module-os cmake.
Fixed stack overflows in bell application main and time service.
2022-04-07 13:31:28 +02:00
Maciej Gibowicz
dbde19f8d8 [MOS-117] Faster eInk sleep after screen redraw
eInk is turned on for 2 sec to redraw the screen
- so far it was 3.8 sec
2022-03-25 09:31:00 +01:00
Lucjan Bryndza
abc1c1f218 [MOS-257] Turn off USB drivers when usb is disconnected
Turn off USB device drivers when the usb cable
is disconnected

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2022-03-18 10:03:11 +01:00
Adam Dobrowolski
053f270655 [MOS-282] Librarisation of services and test service
* options work a bit better ,now services and apps are
  selectable by option in cmake
* test service example added
* major documentation for module-services
* documentation for project configs and logs

Co-authored-by: Bartosz Cichocki <sp2fet@gmail.com>
Co-authored-by: Mateusz Piesta <mateusz.piesta@mudita.com>
2022-03-18 08:06:21 +01:00
Maciej Janicki
5dc42c2be6 [MOS-296] Merge new master commits into merge-stable-wip
Merge new master commits
2022-03-09 19:32:59 +01: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
Maciej Gibowicz
d3bba9da05 [MOS-256] Turn off torch driver when not in use
We save on power consumption ~0.7 mA.
2022-03-08 09:21:50 +01:00
GravisZro
e59cd4036b [MOS-245] Fix errant spaces
It appears in the past a major edit was made but had used a regex to
change some text which resulted in an errant space between the
enumuneration/struct/class name and the scope resolution operator.
These errant spaces have been removed.
2022-02-24 08:47:20 +01:00
Maciej Gibowicz
69e5fe5223 [MOS-144] Fix Increased CPU usage
On the locked screen, while refreshing the screen,
the CPU woke up to the maximum frequency,
which resulted in an increased power consumption.
2022-02-15 09:01:10 +01:00
Maciej Gibowicz
71c051199d [EGD-8192] Deinit of hardware owned by Event manager
Hardware de-initialization at the pre-close shutdown stage
to turn off all hardware beforehand.
2022-02-01 15:57:37 +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
Alek Rudnik
3e7b94dc05 [EGD-8137] Fix system pre closure procedure
Added some services specific implementations of pre closure procedure.
If one request pre closre, all mesagges (except system ones) recieved
by service are ignored.
2022-01-18 16:28:33 +01:00