Commit Graph

155 Commits

Author SHA1 Message Date
Tomas Rogala
1e603d820d [EGD-3470] Review changes 2020-08-13 23:22:40 +02:00
Roman Kubiak
8dcb54721b removed sbini
changed boot.ini -> boot.json
replaced sbini code to json11 code (needs ecoboot 1.0.3)
2020-08-10 13:26:09 +02:00
pholat
ef170c0d27 EGD-3393 UTF8 Unicode fixup for ostry cień mgły (#587)
EGD-3393 UTF8 Unicode fixup for ostry cień mgły

* We are working in little endian, string notation doest't care
* UTF8 cleanup - removed reinterpret casts, removed unused code, and added {}
* added forward declaration for ostream and moved operator<< to cpp
* Removed dead code
* Fixed crash on out of memory access in Renderer on draw char
* Fixed tests failing - there was no test for operator==
* Added changelog
2020-08-07 09:12:27 +02:00
Marcin Smoczyński
705fc39d93 build: optimize third party in debug
To minimize size footprint and to be able to fit in the RT1051 target,
add optimization options in debug configuration for third party modules
which are directly added to the sources.

This behaviour is controlled by the THIRD_PARTY_DEBUG_OPTIMIZE boolean
option.

Add extra warning supressing option for the protobuf sources as its
build was starting to failing on newer compiler.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2020-07-31 11:03:13 +02:00
Bartek Cichocki
794a2bd35f [EGD-3436] Reimplemented parser, removed TinyFSM
added unit tests, cleaned up code

added changelog entry
2020-07-28 10:51:37 +02:00
Tomas Rogala
9e26444368 [EGD-3305] PR changes. 2020-07-21 15:00:57 +02:00
alek
212a32d0e3 remove UNIT_TESTS from log.hpp 2020-07-21 14:09:12 +02:00
pholat
2aee3c9588 FIX: memleak & out of boundary text access (#540) 2020-07-16 09:58:20 +02:00
Pawel Olejniczak
4b16eafa2e Fix typo 2020-07-08 17:07:31 +02:00
Bartek Cichocki
39d24d1420 [EGD-3379] fixed build flags, suppressed warnings for protobuf, sbini and port.c in module-os 2020-07-08 14:09:42 +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
pholat
fb586cb4e9 EGD-3229 (#497)
* EGD-3229 text helper classes added with tests - used in tests, plus misc utils needed

No major actual functionality changed - TextClasses added with this PR
are used in tests only in this commit.
* classes needed to rewrite gui::Text added
* some utilities needed to rewrite gui::Text added
* tests added
2020-07-06 16:19:41 +02:00
Szymon Mroczek
0422c43dfe [EGD-3290] Update submodule to head 2020-07-03 14:08:07 +02:00
Szymon Mroczek
e53da88758 [EGD-3290] Changelog update. 2020-07-03 14:08:07 +02:00
pholat
938cbc186a Gui text pr1 utils and fixes (needed for gui::Text rewrite mostly) (#485)
* EGD-3229 [FIX] UTF8 fixed uint32_t range error

* EGD-3229 [util] gui::Item Navigation switch case moved to function

Needed to not copy senslessly NavigationDirection enum switch case
* gui::Item Navigation switch case moved to function
* added NavigationDirection::None enum value
* cleaned up Navigation.hpp/cpp

* EGD-3229 [util] gui: InputEvent - str() for logging added & is...() check methods

* EGD-3229 [util] removed notorious log on unknown glyph

* EGD-3229 [util] InputMode - added is(Mode) method, input Profile added default definition

* is() method addded to check instead of `==` comparison
* added default to Profile instead of `== 0` use

* [FIX] ARM GCC 10.1.0 - build fixed

fixed include in wrong place

* PR style fix

* Review applied
2020-07-01 13:14:07 +02:00
Roman Kubiak
82c4791cd3 updated sbini (memleak detected and fixed) 2020-06-26 12:04:30 +02:00
Marcin Smoczyński
a9cb37d7f4 tests: add proper catch2 handling
Add proper catch2 support:
 - add catch2 as a submodule
 - add cmake function to add test easily
 - discover each test in test binary
 - remove copies of catch.hpp
 - do not try to process tests for rt1051

Do not test internals of utf8, only public interface (nasty bugs could
occur otherwise).

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2020-06-24 10:38:14 +02:00
Marcin Smoczyński
737e586dde [EGD-3300] allow empty e164 on parsing
Do not throw on empty e164 while parsing number records.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2020-06-19 15:06:46 +02:00
rkubiak01
9cc941d8d2 [EGD-2857] vfs fixes (#439)
* changed microtar and sbini to c++

* VFS: fixes for absolute paths, fprintf wrappers

* Create sys/user during database tests

* review: removed parenthesis around return values in VFS

* changelog updated

* module update

* module updates
2020-06-18 12:27:53 +02:00
Marcin Smoczyński
0936930063 [EGD-2593] improved matching contact by numbers
Introduced format aware phone number comparison to allow improved
matching phone numbers with contacts.

Phone numbers are also displayed formatted on a phonebook/calllog
list view and on detailed contact info view.

Entered and e164 number are verified to match each other during
processing db request.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2020-06-17 14:01:38 +02:00
Przemyslaw Brudny
8e6d4b284e [EGD-3094] Cleanups, proper erase widget from list. 2020-06-03 19:23:16 +02:00
Przemyslaw Brudny
d2d97160e2 [EGD-3094] Basic Phonebook contact list migration to new ListView. 2020-06-03 19:23:16 +02:00
Roman Kubiak
142b71a6a6 sbini module update 2020-06-02 11:28:53 +02:00
Radoslaw Wicik
f9791b76d7 [EGD-3246] Repair crash on Sunday 2020-06-01 09:25:44 +02:00
Radoslaw Wicik
22d003ad61 [EGD-3233] Make log messages finish with linux line end. 2020-05-28 17:23:52 +02:00
alek
aa5999b070 [EGD-2830] Dialog extended for multiple options.
One dialog window in sms app instead of mulitple ones.
Notifictaions about  No SIM card inserted.
2020-05-28 14:13:12 +02:00
Marcin Smoczyński
4c4c7e93ff [EGD-3234] tests: rename time tests
Reserve 'unittest' prefix for fully automated Catch2 tests.
2020-05-27 10:41:17 +02:00
Marcin Smoczyński
d5cb13d956 [EGD-3234] tests: fix utf8 tests
Convert utf8 tests which were written with gtest help to catch2
framework.

Fix broken index operator test (index operator decodes to UTF-32).

Remove dead gtest dependency
2020-05-27 10:41:17 +02:00
Marcin Smoczyński
bfc630b96a [EGD-3234] tests: rename utf8 tests 2020-05-27 10:41:17 +02:00
Marcin Smoczyński
c3e5ef9f15 [EGD-3234] tests: rename log tests
Log tests are not unit tests because they do not provide binary
information about status - they are manual tests.
2020-05-27 10:41:17 +02:00
kkleczkowski
b70ad6c5fc Egd 3196 small cellular refactor (#365)
* [EGD-3196] Fixed fatals in cellular.

* [EGD-3196] Fixed sms sending.

* [EGD-3196] Fixed timeout in ConfProcedure.

* [EGD-3196] Board type moved to Event Manager.

* [EGD-3196] Event Manager API renamed.

* [EGD-3196] Misiing files.

* [EGD-3196] Fixed modem status message, return code in magnetometer driver, case in modem init procedure.

* [EGD-3196] PR suggestions applied.

* [EGD-3196] Style fix.

* [EGD-3196} GetBoardName -> c_str();

* [EGD-3196] Style fix.

* [EGD-3196] PR suggestions added.

* [EGD-3196] Style fix...

* [EGD-3196] Style fix again.

Co-authored-by: Kuba Kleczkowski <dd>
2020-05-21 16:56:24 +02:00
Marcin Smoczyński
a4a8315b97 fix empty calllog list item
Fix empty calllog title when number comes in national format. The
problem was caused by:
 1. making assumption that every number from cellular network comes in
 e164 format which is not true,
 2. using e164 number when looking for contact matching calllog entry
 without checking if e164 exists for calllog entry.
Fix problem by:
a.d.1 - replacing `PhoneNumber::viewFromE164` with less strict
`PhoneNumber::Parse` method which basically is a convenience method
which creates `PhoneNumber` entity and uses it to create a `View`.
a.d.2 - instead of fetching e164 directly introduce `getNonEmpty` method
of a View, which returns e164 number if it is present and entered number
otherwise.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2020-05-18 17:31:57 +02:00
Marcin Smoczyński
b434745311 utils: fix various minor bugs in phonenumber
Bugs:
 - invalid number validation
 - no `const` qualifier in comparison operators
 - lack of comparison operator for PhoneNumber::View

Add appropriate unit tests.
2020-05-18 01:17:08 +02:00
Alek Rudnik
08358df991 Egd 2825 sms clipboard (#362)
* [EGD-2825] clipboard class implementation

* [EGD-2825] returnToPreviousView moved from appwindow to application class

* [EGD-2825] paste

* [EGD-2825] fixed paste label

* [EGD-2825] copy

* [EGD-2825] comment

* [EGD-2825] removed init data

* [EDG-2825] add clipboard UT

* [EGD-2825] add sms fw option
renamed SMSTemplateData to SMSTextData

* [EGD-2825] fxies in EventStore

* [EGD-2825] PR fixes

* [EGD-2825] rem not needed comment
2020-05-15 13:34:26 +02:00
rkubiak01
7cac882c7a [2306] VFS: support .boot.ini and "current" and "previous" os types (#315)
* VFS: support .boot.ini and "current" and "previous" os types

* fixes for first batch of comments
- moved crc32 functions to a seperate file
- changed naming of constant with _
- removed one magic number
- crc methods now cross platform

* using smart pointer for buffer management

* created a simple USER_FILE macro for database names

* removed commented-out code

* style fixes

* Updated crc32 version

* Update module-vfs/vfs-utils.cpp

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

* Update module-vfs/vfs-utils.cpp

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

* renamed USER_FILE to USER_PATH macro, this was also
bromen and was returning incorrect paths, std::filesystem::path
behavior is causing these issues.

* VFS: remove method changed

* fixed path for assets copy

* UNITTEST: vfs test fixed

* VFS: changed computeCRC32 return type to void

* Max supported partition to 2 (was 1)

* EOL in vfs.cpp

* nullptr check in computeCRC32
include for log.hpp fixed

* flash_eMMC merged properly

* CRC32 commit update

* testBuild

* fix newline at start of smsdb.cpp
removed test from cmake

* no user/ folder on the root of emmc causes sqlite3 to fault
this adds a create empty user call for rt1051

* flash script fixes
- do not use build-*/sys
- common.sh contains a static list of iles that land on the flash

Co-authored-by: Alek Rudnik <54846206+alekrudnik@users.noreply.github.com>
2020-05-08 10:27:17 +02:00
Marcin Smoczyński
c47923d70a [EGD-3107] Call number validation
Use specialized class to to pass phone number between apps and services
instead of ambigious std::string. Introduced class (utils::PhoneNumber)
wraps calls to libphonenumber providing more convienient interface.
However using libphonenumber directly may be resource hungry in terms
of stack, heap and cpu usage, so helper class has been introduced to
pass information about phone numbers (utils::PhoneNumber::View). It is
designed to maintain integrity thus can be created from an instance of
utils::PhoneNumber only or moved/copied to.

Add new field to the calllog db holding e164 formatted number. Both
entered and e164 numbers will be needed to be able to match with
contacts correctly.

Add constexpr information about country codes (utils::country).
2020-05-05 00:51:53 +02:00
Marcin Smoczyński
c9062e83e0 doc: cleanup readme files for doxygen 2020-04-28 17:34:00 +02:00
Marcin Smoczyński
7cc27ee143 [EGD-3113] Add thread safety to RE2 2020-04-28 17:01:33 +02:00
Marcin Smoczyński
86bdeb347d [EGD-3113] Add thread safety to libphonenumber
Add thread safety based on the RTOS wrapper and FreeRTOS mutex. The
mutex protects regexp cache only so additional safety on regexp level is
needed.

Add method to get currently running thread - needed by thread checker
class in libphonenumber.
2020-04-28 17:01:33 +02:00
Przemyslaw Brudny
6540a27de4 [EGD-3040] PR cleanups. 2020-04-28 14:10:41 +02:00
Radoslaw Wicik
49ca4257da [EGD-3151] Add fixes for SIM detection
Add proper passing SERIAL_PORT info
Convert cmux to unique_ptr in module-cellular
2020-04-27 17:24:24 +02:00
Alek Rudnik
62c37c4107 [EGD-2798] use either e164 number or name (#321) 2020-04-22 11:16:22 +02:00
Adam Dobrowolski
19c1f66733 EGD-3056 Messages debugging print edbug.hpp option added 2020-04-15 16:50:19 +02:00
Marcin Smoczyński
5f7d52cb2b [EGD-2592] utils: add libphonenumber
Add libphonumber support:
 - no thread safety support (disabled mutexes, etc.)
 - use re2 regexes instead of ICU's
 - don't normalize utf8 decimals - use ASCII decimals only
2020-04-08 18:23:45 +02:00
Marcin Smoczyński
268385b093 [EGD-2591] utils: add protobuf library support
Add protobuf-lite library (thread safety turned off).
2020-04-08 18:23:45 +02:00
Marcin Smoczyński
d41ceb4611 [EGD-3052] utils: add re2 library support
Add RE2 library with thread safety option turned off.
2020-04-08 18:23:45 +02:00
rkubiak01
bdb48fb7e5 added sbini library for simple C INI parser support
EGD-2922
2020-04-08 12:40:50 +02:00
Adam Dobrowolski
86353db8f5 EGD-3055 Make tests compile on linux 2020-04-08 12:23:53 +02:00
Adam Dobrowolski
2b07ca005f EGD-3055 use PRIu64 to log time 2020-04-08 12:23:53 +02:00
Adam Dobrowolski
4a61f400e7 EGD-3055 Fixed printf issues 2020-04-08 12:23:53 +02:00