Commit Graph

113 Commits

Author SHA1 Message Date
Wiktor S. Ovalle Correa
c1bb6c1bae [EGD-6746] Expose new Message types system-wide
Allow all modules to access Request/Notification Message send templates.
2021-05-27 16:32:47 +02:00
DariuszSabala
339f3d52fa [BH-364] Move TPLIB magic_enum to separate dir
Changed submodule directory and updated cmake scripts and include paths
2021-05-21 11:12:20 +02:00
Wiktor S. Ovalle Correa
39a09e8627 [EGD-6746] New SimCard implementation
New approach to the Cellular SimCard submodule
2021-05-18 17:57:29 +02:00
Adam Dobrowolski
b38adceced [EGD-6019] Minimum settings ownership lifetime fixups
added weakptr link to settings and checks
    it wont crash on deinitialized setings now
Pseuto UT are passing
Added:
    - deregistration on Settings destrution
    - weak referencing of Service to not crash Settings on missuse
    - Proxy as initialization parameter to Settings
Unused code removed
Enabled tests to be written for Settings
Removed dependency from freertos in test global file
EntryPath tests updated and compilation slimed
2021-05-18 13:25:54 +02:00
Przemysław Brudny
e71a044bd3 [EGD-6019] Revert of two commits
This reverts commit b6416b15da.
This reverts commit e2f3882d8a.
2021-05-14 09:54:36 +02:00
Adam Dobrowolski
b6416b15da [EGD-6019] Minimum settings ownership lifetime fixups
added weakptr link to settings and checks
    it wont crash on deinitialized setings now
Pseuto UT are passing
Added:
    - deregistration on Settings destrution
    - weak referencing of Service to not crash Settings on missuse
    - Proxy as initialization parameter to Settings
Unused code removed
Enabled tests to be written for Settings
2021-05-13 18:22:44 +02:00
Przemyslaw Brudny
9a17c5fc3c [EGD-6676] PhoneLock handling with ServiceDesktop
Replaced old PhoneLock handler in ServiceDesktop with new
interactions with Application Manager PhoneLockHandler.
2021-05-05 13:55:14 +02:00
Adam Dobrowolski
e2d2116419 [EGD-6617] Added option to disconnect handler in service
Till now we were only able to connect handlers to services, but
disconnect was not possible. With nullptr handler system would crash
2021-04-26 10:45:16 +02:00
Wiktor S. Ovalle Correa
55c41de597 [EGD-6575] Rename Unicast with timeout as UnicastSync
Using Unicast with timeout is dangerous and strongly discouraged.
This change allows for more precise tracking of such cases.
2021-04-20 09:57:58 +02:00
Przemyslaw Brudny
3408fafa8f [EGD-6066] Removed Message default constructor
Forced each message to have declared type as parts of Bus logic
depends on it and previously we encountered undefined
behaviours. Added tests and messages validators.
2021-03-29 22:37:09 +02:00
Piotr Tański
efef7dcf7f [EGD-6111] Timers refactored
Deep refactor of system timers.
2021-03-19 14:09:35 +01:00
Wojtek Rzepecki
e69576aa60 [EGD-6192] Add torch hw control v2
Change behavior of torch
control according to newest
design.
2021-03-18 08:53:19 +01:00
Mateusz Grzegorzek
31b24ed4d3 [EGD-5932] Add more queries to Quotes agent
Added queries:
- list quotes from selected category,
- enable/disable category,
- enable/disable single quote,
- list enabled quotes,

Other fixes:
- move `msgHandled` and `msgNotHandled` to `Message.hpp`,
- use `typeid` in `QuotesAgent::registerMessages`,
- change `Quotes::Queries` style,
- make `quotesList` private

Queries to add in next PR:
- add/read/write quote
2021-03-17 13:55:20 +01:00
Maciej Gibowicz
677e18cada [EGD-5658] Add eInk CPU frequency hold
While the screen is being redrawn,
we block CPU frequency decreasing
2021-03-15 08:54:40 +01:00
Wojtek Rzepecki
776a51e592 [EGD-5969] Add battery charging UI
Battery charging UI modified
according to design
2021-03-10 08:50:27 +01:00
Adam Dobrowolski
ad136fbb84 [EGD-6078] Limited logs from Settings and Service messages
* Right now there is too much spam. These logs can be enabled with
  build flag
* Fixed clang-tidy warnings on Settings
2021-03-09 12:57:47 +01:00
Wojtek Rzepecki
ef63ee267c [EGD-5304] Add new way of system close
Unified method of closing
the system orchestrated by
system manager
2021-03-04 15:55:55 +01:00
Lucjan Bryndza
65650cee97 [EGD-6006] Stack optimization in the EventManager
Tweak stack usage in the EventManager service
2021-03-04 14:15:50 +01:00
Marcin Smoczyński
4eadff48fe [EGD-5911] Allow configuring worker stack size
Allow configuring stack size of a worker by a child class for a better
system heap utilization control.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-03-04 12:06:49 +01:00
Adam Dobrowolski
30fde886e4 [EGD-5326] Fixed AT commands harness utility
We can now use test harness to send and check at commands
2021-03-02 14:49:50 +01:00
Marcin Smoczyński
d07a0c1e13 Merge branch 'stable' 2021-02-19 14:25:59 +01:00
Przemyslaw Brudny
230eb7c343 [EGD-5816] Device freeze after cancelling a call
Reverted changed proposed by PR [EGD-5598] GuiTimer
refreshWindow on Count and custom stop.

Signed-off-by: Przemyslaw Brudny <przemyslaw.brudny@mudita.com>
2021-02-19 12:57:30 +01:00
Borys Jelenski
d9ae779a37 [EGD-5503] Add watchdog implementation
The system watchdog monitors whether there is message traffic
on the Bus. If no message was sent for an extended period of time,
a reset will occur. It should also protect against system-wide hangs.

On Linux, watchdog is simulated by a FreeRTOS task that will call exit
on timeout.
2021-02-19 11:32:12 +01:00
Adam Dobrowolski
f724d9074b [EGD-5701] Added DOM dump to harness
* Added generic handler to developerMode
* Added DOM message handling
2021-02-18 16:53:07 +01:00
Przemyslaw Brudny
50d0cf0be9 [EGD-5598] GuiTimer refresh window on count
Added Gui timer auto refresh window on count and additional
name based API to detach timer from window. Added
TimerIDGenerator and exception throw on creating user timer
with same name.
2021-02-17 17:33:32 +01:00
Piotr Tański
b9661350f8 [EGD-5697] Framework for phone modes introduced
It allows to transmit phone modes information to listening services.
2021-02-16 14:05:42 +01:00
Maciej-Mudita
11aa4c7ffb [EGD-5382] Add LowPower CpuSentinels
In order to synchronize the Low Power mode, the services were
immediately informed about the frequency change,
so that they can update their resources (e.g. PWM filling)
and services may request the maximum CPU frequency in order
to perform a task (e.g. screen redraw, telephone conversation)
2021-02-12 09:40:36 +01:00
Piotr Tański
65119cb495 [EGD-5027] Services synchronization introduced
Dependencies between services are now supported.
2021-02-10 12:37:42 +01:00
Piotr Tański
bc4d32c7d8 [EGD-5158] Change access to the bus methods
The bus is now accessible only via Service object.
2021-02-08 16:56:42 +01:00
alek
8370b97cba [EGD-5155] Change Timers debug functionality
Enhanced Timers debug functionality.
2021-01-18 21:28:36 +01:00
Marcin Smoczyński
40bf381eca [EGD-5086] Fix voice not starting when calling
Due to a race condition between source and sink voice is not always
starting when calling. Introduce audio stream connections to avoid
race condition and improve handling of audio start and stop operations.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-01-14 11:03:47 +01:00
Przemyslaw Brudny
e7b9bcf7e9 [EGD-5133] Fix settings bus add duplications
Changed Bus Channels vector to set to prevent
duplicates and cleaned logging.
2021-01-08 17:33:00 +01:00
alek
2b24de4f2b [EGD-5151] Fix timers callback issue
Fix timers callbacked issue and make sure there is no need to
call connect() after each stop().
2021-01-08 16:09:12 +01:00
Piotr Tanski
4e0f72e70a [EGD-4696] Several stabilization patches. (#1192) 2020-12-15 15:30:13 +01:00
Hubert Chrzaniuk
8a3eb64662 [EGD-4899] Worker class design improvements and fixes (#1190)
* allow workers to run independently from service
* change worker to use FreeRTOS wrapper Queue class instead of
  freeRTOS native queues
* fix bug disallowing to destruct worker that have never ran
* fixed worker bad state transition to Running state
2020-12-14 11:56:29 +01:00
Roman Kubiak
b4814861b0 [EGD-4318] enable service desktop (#973)
* [EGD-3688] Relax retries count for send
enable ServiceDesktop

* [EGD-3688] Relax retries count for send
enable ServiceDesktop

* [EGD-4318] enable service desktop and USB communication
CDC for serial port (communication with Mudita Center)
MTP for file transfer

* [EGD-4318] include path fix

* [egd-4318] constexpr brought back

* [EGD-4318]: review changes
- all BSP specific code moved to bsp files
- added a device listener class for USB
- simplified WorkerDesktop

* [EGD-4318] more reivew fixes mostly include paths and enums

* [EGD-4319] review fixes for SP2FET

* [EGD-4318] updates for large messages sent from phone

* [EGD-4318] more review fixes
- error checks on linux (ptms open and ptsname)
- removed all vfs
- service-desktop won't start if worker init fails

* [EGD-4318] updated return values for usbInit

* Update module-services/service-desktop/WorkerDesktop.cpp

Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>

* Update module-services/service-desktop/endpoints/update/UpdateMuditaOS.hpp

Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>

* [EGD-4318] review fixes
- removed #define
- return values for usbInit

* Update module-bsp/board/linux/usb_cdc/usb_cdc.cpp

Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>

* [EGD-4318] updated taglib

* [EGD-4318] style fixes

* Update module-bsp/board/linux/usb_cdc/usb_cdc.cpp

Co-authored-by: Alek Rudnik <54846206+alekrudnik@users.noreply.github.com>

* [EGD-4318] switches from freertos Timer class to sys::Timer

* Update module-services/service-desktop/WorkerDesktop.cpp

Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>

* Update module-services/service-desktop/WorkerDesktop.cpp

Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>

* [EGD-4318] added mutex/lock during raw data transfers

* [EGD-4318] if the TAR file is zero size or invalid
mtar_close causes HF. This is a workaround

* [EGD-4318] timer should not start on constructor

* [EGD-4318] getRawMode is const noecept

Co-authored-by: unknown <atom@prostate.local>
Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>
Co-authored-by: Alek Rudnik <54846206+alekrudnik@users.noreply.github.com>
2020-11-19 17:44:23 +01:00
Piotr Tanski
22102c4ba5 [EGD-4200] Message handling refactored. (#974) 2020-11-06 15:24:59 +01:00
Marcin Smoczyński
486d21af0e [EGD-4288] refactor global data (#959)
Reduce firmware size by refactoring global data defined in public
headers.

Each global variable which require runtime initialization adds
initialization code to every translation unit which includes the header
where the variable is defined and declared.
2020-11-04 18:24:39 +01:00
Adam
8bab7f0031 EGD-3585 ServiceGUI and ServiceEink initial cleanup (#953)
* EGD-3585 SerwiceGUI and ServiceEink initial cleanup

* moved code to one function per message handling
* removed dead code from comments
* added Service.cpp demangling to debug messages for clear output
* added Response value to return messages to `connect()`
2020-11-03 17:27:00 +01:00
Radoslaw Wicik
2276ceed67 [EGD-3743] Update copyrights in fies 2020-10-20 12:55:10 +02:00
Roman Kubiak
e340788045 [EGD-3763]: mac fixes. include paths (#804)
* [EGD-3763]: mac fixes. include paths

* [EGD-3763]: genupdate modified, sed -i needs sed -i -e for mac
include path fixes for common.hpp
2020-10-19 13:33:31 +02:00
KacperLewandowski
ba4640c4af [EGD-3469] ServiceTime - start 2020-10-15 20:58:45 +02:00
Piotr Tanski
f5aec0444a [EGD-3838] Introduced a meditation progress bar with simple implementation of meditation application. (#783) 2020-10-09 14:14:40 +02:00
Hubert Chrzaniuk
9c7e4139db [EGD-3784] Add service audio non blocking API (#789) 2020-10-08 10:15:46 +02:00
kkleczkowski
330c57e1d0 Egd 3259 (#781)
* [EGD-3259] Updating RTC time from network time.

* [EGD-3259] Updated changelog.

* [EGD-3259] Missing files.

* [EGD-3259] Time updaten notification.

* [EGD3259] Fixed SET_TIME_ZONE_REPORTING command.

* [EGD3259] SET_TIME_ZONE_REPORTING fixed properly.

* [EGD-3259] Commands added to factory.

* [EGD-3259] Fixes after rebase.

* [EGD-3259] Style fix.

* [EGD-3259] PR applied.

* [EGD-3259] PR applied again.

Co-authored-by: Kuba Kleczkowski <dd>
2020-10-07 15:33:46 +02:00
Marcin Smoczyński
fa471405d1 [EGD-3461] sys: update service header comments (#774)
Remove TODOs, update Deinit/Close handlers doxygen comments.

Make CloseHandler final - it must not be overloaded.
2020-10-06 11:36:50 +02:00
Adam
f5f27d642f EGD-2955 EGD-3588 Timers fully refactored & updated (#721)
* Timers now are Application thread safe
* Timers now have consistent API independend of Application (no more c style timers)
* Timers can have either: callback or override onTimer() method - this
  way we can create more complicated timers or just use existing ones
* gui::Timer added via adapter class GuiTimer to decouple sys::Timer
  with gui::Timer
* Fixed race in wrapper
* Updated docs
* fixed using std and cpp_freertos and DataReceivedHandler hidden in Application.hpp
2020-10-02 14:04:57 +02:00
Marcin Smoczyński
c74e7577c7 [EGD-3457] sys: improve workers destroying (#753)
Implement termination of worker threads. To achieve the goal so called
control queue has been introduced which is handled in Worker base class.
Once worker thread receives stop message it tries to kill itself. It is
possible to join a worker thread before deinit know thanks to a
semaphore given before thread termination.

Some improvements to the interface and implementation has been made
including state sanity checks. It is assumed that only service that owns
the worker is allowed to stop it, which allows not to consider code
reentrancy.

Worker destroying procedure has been updated in services that already
own workers.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2020-09-30 15:24:57 +02:00
alek
f146723e04 some style and spelling fixes 2020-07-23 23:02:05 +02:00
kkleczkowski
e46d2a2829 Egd 3244 antenna manager (#490)
* [EGD-3244] Service antenna + utils State.

* [EGD-3244] CellularAPI + at::response.

* [EGD-3244-antenna-manager] Changes in application Antenna.

* [EGD-3244-antenna-manager] Changes in antenna app ( antenna switch multicast ).

* [EGD-3244-antenna-manager] Changed Antenna app GUI.

* [EGD-3244-antenna-manager] Basic algorithm.

* [EGD-3244-antenna-manager] Fixes in algorithm.

* [EGD-3244-antenna-manager] Small fixes + service blocking.

* [EGD-3244-antenna-manager] Little cleanup.

* [EGD-3244-antenna-manager] Restored Cellular call in Application Antenna.

* [EGD-3244-antenna-manager] Style fix.

* [EGD-3244-antenna-manager] Sewrvice antenna disabled.

* [EGD-3244-antenna-manager] PR suggestions + linux buil fixed.

* [EGD-3244-antenna-manager] Updated changelog

* [EGD-3244-antenna-manager] Style fix.

* [EGD-3244-antenna-manager] Fixed submodule.

* [EGD-3244-antenna-manager] PR suggestions + toNumeric UT.

* [EGD-3244-antenna-manager] PR suggstions again.

Co-authored-by: Kuba Kleczkowski <dd>
2020-07-07 10:54:47 +02:00