Commit Graph

36 Commits

Author SHA1 Message Date
Lefucjusz
4ad0f29ab4 [BH-1898] Fix of GUI freeze after intensive volume change
Fix of the issue that GUI would freeze for
several seconds if volume level was being
changed intensively for a while.
2024-03-06 14:05:55 +01:00
Maciej Gibowicz
920db59b2e [BH-1791] Add CPU frequency lock during log dump
This will improve security and peripheral stabilization when downloading
logs to a file.
2023-10-27 12:53:20 +02:00
Lukasz Mastalerz
d9a1194e6f [BH-1688] Create a standard for logs
* Adding document describing how to use logger
* Adjusting logs to follow a new guide
* Change order in log header:
  line number is now before function name
2023-10-23 15:17:44 +02:00
Lefucjusz
4e685bb7ec [MOS-999] Provide additional info in log filename
Added info about product, OS version, commit hash
and serial number to log filename to simplify
triage and quick sanity check of the logs in
cases many log files have to be analyzed.
2023-06-23 12:08:32 +02:00
Lefucjusz
8d96f2d354 [MOS-993] Logger bug fixes and optimizations
Fixes and optimizations in logger:

* fixed possible buffer overflow when logging
logs over line buffer size;
* reduced max log line length to 2048;
* moved pubsetbuf before file opening;
* log file stream buffer created once
in logger ctor;
* updatet UTs;
* additional minor cleanup.
2023-05-29 09:38:57 +02:00
Dawid Wojtas
8c2b5aa7b0 [BH-1624] Fix shutdown procedure
In some cases, the system wasn't able to turn off
because the GUI service got stuck. The device
was still working in the background. The cause
was an empty queue in DrawCommandQueue which
hang the GUI worker.

The interface was modified and synchronization
mechanism was removed.
The thread no longer waits in dequeue().

Also changed the worker to close in the right
way the logger worker.
2023-03-06 21:47:11 +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
Lefucjusz
a5f621bc83 [MOS-487] Added call events state machine
Added tests and calls substate
bluetooth sm diagram created
All old bluetooth tests reviewed and updated
removed new - with queue it's not required
removed TODO
Co-authored-by: Bartosz Cichocki <sp2fet@gmail.com>
2022-05-26 16:19:02 +02:00
Adam Dobrowolski
2664e8ccec [MOS-487] Move switch case to sm
massive switch case removed
added logger
moved state machine implementation
added double dispatch
2022-05-26 16:19:02 +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
Bartosz Cichocki
d59ac56d51 [MOS-347] Separate A2DP from HFP in ProfileManager
Now, both profiles can operate separately. Additonally, minor
fixes has been applied to allow calling via car audio system.
Some infotainment systems still don't work though.
2022-04-25 10:26:38 +02:00
Alek Rudnik
9cf11913a1 [EGD-8129] Add atexit functionality
Added atexit functionality. All global destructors and functions
registered with atexit() should be called at program exit.
It was possbile to reuse original newlib implementation with
MALLOC_PROVIDED flag set.

Made sure logger destructructor is called as last one.

Due to mudita OS legacy, it was not possible to simply fix dependencies
in global objectes and hence there are neither global objects
destructors nor functions registered with atexit() called when exit()
is called.
Possibly it will be changed later.
2022-01-05 13:59:51 +01:00
Adam Dobrowolski
0ec9428917 [EGD-7773] Popups stack poc
Stack plus minimum tests added
Updated to master
Removed useless or adressed TODOS
Constants name applied
Renamed searchModel to searchRequestModel
Review applied
We should remove legacy window names
Bell names fixes
2022-01-04 13:01:23 +01:00
Adam Dobrowolski
76c924fd5e [EGD-8002] Added SSP, fixed some minor issues, removed obsolete code
ssp seems working
minor crash fixups
copy lacks patched
obsolete code removed
Devicei tests added for added code and cleanup
Added missing tests for new functions
Code cleaned up a bit - mostly moved to cpp
2021-12-09 12:42:33 +01:00
Kuba
c720ce543a [EGD-8001] Fix enable cellular logs
It will be possible to debug cellular now.
2021-11-24 12:18:49 +01:00
Marek Niepieklo
b5749912a9 [CP-825] Interrupted transfer to FS endpoint may corrupt the filesystem
Using std::fstream for file I/O at every file access in FileContext.
Reworked file opening/closing to happen on each file chunk
read/write, so that a file isn’t left open in case of an error
or transfer cancelation.
Separeted RxID and TxID for reliable cancelation of stalled xfers.
2021-11-16 10:50:54 +01:00
Alek Rudnik
1490158034 [EGD-7725] Tune up file system io access
Increasd io stream buffers:
- 64kB for big files with short lifetime scope
- 16kB for big files with long lifetime scope
- 1kB - dont changes default forr the rest
2021-10-08 10:28:38 +02:00
Jakub Pyszczak
d492c3646e [EGD-7548] Crash dump rotate
Added dumps rotation. Maximum count of the files set to 5.
The oldest dumps are removed if there're more than 5 of them.
Comparison is taken by the date.
Unified log and crash dumps rotators.
2021-10-04 16:32:34 +02:00
Bartosz Cichocki
7274f691d7 [EGD-7405] Connect HFP with audio system
Connected HFP with audio system so 2-way audio transmission is
possible
2021-09-24 13:25:07 +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
Adam Dobrowolski
3e57a07b43 [EGD-7495] Fixed log use on Linux to be the same as on Rt1051
- Log headers were incomplete
- Log filtering was broken on linux
2021-09-06 09:12:21 +02:00
Piotr Tański
90e7a48198 [EGD-7362] Merge release/0.76.1 into master
Merge release/0.76.1 into master.
2021-09-02 11:12:59 +02:00
Marek Niepieklo
f3480da43e [EGD-7269] Phone stuck on log dump operation
Problem occured when logging while log was flushed to file
2021-08-05 17:54:53 +02:00
Marek Niepieklo
e7776f6c17 [CP-228] Force flushing of logs before getting log files
Moved flushing function to Logger class
Decreased flushing time to 2 min
Added EM event to request flushing from ServiceDesktop
2021-07-29 11:28:43 +02:00
Marek Niepieklo
6c32205e1b [CP-371] Updater miscelanous developer mode and logs changes
This reverts commit cb93d58d85.
2021-07-27 17:03:28 +02:00
Adam Dobrowolski
cb93d58d85 [CP-371] Updater miscelanous developer mode and logs changes
Changed:
- Runtime disabled logs which didn't add value from ServiceDesktop
- Runtime disabled logs which didn't add value from SystemManager
- Added possibility to change runtime logging levels
- Integrated ServiceDesktop developer code a bit - it might be used
  as virtual base with little to no modifications for other endpoints
  which would result with less redundant code
2021-07-27 13:56:37 +02:00
Lukasz Skrzypczak
eecde32337 [BH-378] Corrected includes
Corrected includes
2021-06-08 12:24:29 +02:00
Paweł Joński
5ad878c6c4 [BH-371] Replace gsl with mainline submodule and move to third-party
Replacing loose gsl files with gsl mainline project as submodule
and moving it to third-party
2021-06-07 09:30:04 +02:00
Maciej Janicki
c88c82ae86 [EGD-6319] Refactor cellular modem directory
- Removed not used files from old implementations.
- Renamed some classes to follow naming convention.
- Renamed methods to use consistent styling.
- Restructured code.
2021-05-05 16:34:35 +02:00
Maciej Janicki
ea27e68716 [EGD-5748] Remake Cellular flow
This commit remakes cellular data flow
introducing full error propagation.
2021-04-23 15:03:08 +02:00
Jakub Pyszczak
6be93bef43 [EGD-6166] HSP ringing
Added HSP ring sound on incoming call event while
there's bluetooth connection active and HSP is
selected as the current profile.
Possibility of pick up/decline the call using
BT device buttons added.
Slightly changed HSP initialization according
to the UML-s added.
Changed call hangup handler in service cellular.
2021-04-20 10:29:30 +02:00
Alek Rudnik
6e106deb29 [EGD-6455] Disable service audio debug loggs
They were too much of them
2021-03-23 18:17:01 +01:00
Mateusz Grzegorzek
a60e27fa4b [EGD-4593] Dump logs to file on timeout
- Dump logs to file every 10 sec.
- max file size is 50 MB
  (after reaching it, no more logs will be logged),
- Add `LockGuard` with locking mechanism
  supporting IRQ and use it in `Logger`.
- Fix minor style issues in `Logger`.
- Add `mount_user_lfs_partition.py` script for mounting LFS on Linux FS
  in order to get `MuditaOS.log` file from `user` partition
2021-03-17 16:33:02 +01:00
Mateusz Grzegorzek
def5dbcfa9 [EGD-5908] Fix bug in Logger + add log unit test
Because `vsnprintf` return value means:
"
The number of characters that would have been
written if n had been sufficiently large,
not counting the terminating null character.
If an encoding error occurs, a negative number is returned.
"

`Logger` crashed when log msg was longer than LOGGER_BUFFER_SIZE.
Checking `vsnprintf` return value solves this issue.
2021-03-05 09:06:39 +01:00
Mateusz Grzegorzek
0b75c6299d [EGD-4873] Add colors to rt1051 logs
Bring back possibility to get colorful logs from rt1051.
Colored logs can be now turned on in runtime using
Logger::enableColors method.
2021-02-10 18:19:32 +01:00
Mateusz Grzegorzek
0c3cc549b6 [EGD-4706] Change log for RT1051 and Linux platform
Unify log for RT1051 and linux platform.
Add Logger class where common functions
for RT1051 and Linux are stored.
2021-01-11 12:39:15 +01:00