Commit Graph

118 Commits

Author SHA1 Message Date
Christoph Honal
977936e8e2 System: Refactor pin and interrupt setup
This should ensure better readability of the pin setup procedure,
as well as allow the configuration of the hardware button enable pin
and the accelerometer interrupt pin via the pin mapping header.
2022-06-05 09:53:22 +03:00
luz paz
03a510bd18 Fix various typos
Found via `codespell -q 3 -S ./src/libs -L ans,doubleclick,trough`
2022-06-05 09:31:23 +03:00
Finlay Davidson
7f45538eb5 Apply clang-format to all C++ files 2022-06-05 09:15:46 +03:00
Finlay Davidson
718fbdab98 Replace C-style casts with static_cast 2022-06-05 09:15:46 +03:00
Riku Isokoski
6dac0a62f4 Remove lcd from DisplayApp 2022-05-08 13:12:37 +02:00
Riku Isokoski
8061822f0c Fix large blacklevel step. Lower 25% of shades are now accessible.
There is a large step in brightness from level zero to level one.
After experimenting with various ST7789 options, I found that
decreasing VDV to 0x10 (-0.4V) fixes this issue.

The gamma change reduced the average error in brightness, but with the
underlying issue fixed, the gamma change has been reverted.
2022-04-29 11:35:22 +03:00
Riku Isokoski
aa32159c00 Tweak gamma on ST7789 and match UI colors
This change will increase the color accuracy of the PineTime and make UI
development with the simulator easier.
2022-04-25 15:50:26 +03:00
Reinhold Gschweicher
129dd97b51 SpiNorFlash: use C++ style struct in C++ only header
`SpiNorFlash.h` is a C++ header, but the `Identification` struct is
created in a C style using `typedef struct`. Clang issues a warining
about this discrepancy:

```
In file included from /home/nero/repos/pinetime/InfiniSim/InfiniTime/src/systemtask/SystemTask.cpp:13:
/home/nero/repos/pinetime/InfiniSim/sim/drivers/SpiNorFlash.h:16:21: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
      typedef struct __attribute__((packed)) {
                    ^
                     Identification
/home/nero/repos/pinetime/InfiniSim/sim/drivers/SpiNorFlash.h:17:9: note: type is not C-compatible due to this default member initializer
        uint8_t manufacturer = 0;
        ^~~~~~~~~~~~~~~~~~~~
/home/nero/repos/pinetime/InfiniSim/sim/drivers/SpiNorFlash.h:20:9: note: type is given name 'Identification' for linkage purposes by this typedef declaration
      } Identification;
        ^
1 warning generated.
```

The easy fix is to use a C++ style struct.

Also includes code style fix from Riksu9000

Co-authored-by: Riku Isokoski <riksu9000@gmail.com>
2022-04-24 19:07:46 +03:00
JF
71c895dc71
Merge pull request #531 from hatmajster/heart-rate-gain-setting
Heart rate sensor - HRS gain changed to x8
2022-01-26 21:44:23 +01:00
hatmajster
b4e956227e Hrs3300: changed default gain to x8 2022-01-25 17:44:11 +01:00
Yehoshua Pesach Wallach
464b689a03
changed ReadHrs and ReadAls to uint32, and did static_cast instead of hidden cast when using it 2021-12-13 12:47:52 +02:00
Yehoshua Pesach Wallach
4cc95091ab
order ReadHrs, ReadAls bitwise according to bit ordering 2021-12-13 12:39:34 +02:00
Reinhold Gschweicher
241d36471d Move up file header include to top 2021-11-15 22:02:49 +01:00
Reinhold Gschweicher
f2918709d9 Add missing standard includes 2021-11-15 22:02:49 +01:00
Reinhold Gschweicher
ac7b2da611 Update includes to to be relative to src directory
Don't use relative imports like `../foo.h` as those depend on the
relative position of both files. Rather than that use imports relative
to the `src` directory, which explicitly is part of the include
directories.
2021-11-15 22:02:49 +01:00
Jean-François Milants
9671a8451f Fix unresponsive touch panel after update to 1.7 : don't care if device ids are not the ones we expected (until we know more about these communication and IDs issues). 2021-11-14 20:32:25 +01:00
Jean-François Milants
8d61419836 Fix formatting following the code review. 2021-11-07 16:19:06 +01:00
Jean-François Milants
e9c7ab4cfc Add data validity check and retries in CST816S driver. See https://github.com/InfiniTimeOrg/InfiniTime/issues/763#issuecomment-962436976. 2021-11-06 19:01:19 +01:00
JF
9538eb9716
Merge pull request #586 from hubmartin/wake-time
Improve wake-up time
2021-10-23 10:24:27 +02:00
hubmartin
27366bdfdf Merge branch 'develop' into wake-time 2021-09-16 22:04:31 +02:00
Riku Isokoski
8f0771183c Fix Error screen and optimize GetTouchInfo 2021-09-15 12:25:41 +03:00
Riku Isokoski
f221f5d744 Merge branch 'develop' into update_touch_driver 2021-09-14 15:34:09 +03:00
hubmartin
8390d0ef72 Merge branch 'develop' into pinmap 2021-08-29 11:43:50 +02:00
Riku Isokoski
d2d97319e0 Merge branch 'develop' into update_touch_driver 2021-08-28 17:19:49 +03:00
Jean-François Milants
45e7638fc2 Merge branch 'twimaster_rework' of https://github.com/Riksu9000/InfiniTime into Riksu9000-twimaster_rework
# Conflicts:
#	src/systemtask/SystemTask.cpp
2021-08-28 15:08:50 +02:00
hubmartin
db50131ed4 Remove commented commands completely 2021-08-23 15:02:40 +02:00
Riku Isokoski
40392d7b91 Use highest frequency and move mutex creation to Init 2021-08-18 21:40:27 +03:00
Riku Isokoski
780a811f05 Automatic error detection 2021-08-18 15:23:30 +03:00
Riku Isokoski
81a36dc31e Simplify parameters and cleanup 2021-08-16 18:26:10 +03:00
hubmartin
099364e619 Remove LCD reset and more cmds, save over 200ms 2021-08-15 16:48:41 +02:00
hubmartin
faed0d4900 Remove unnecessary pin_set, save 50ms 2021-08-15 16:47:41 +02:00
Riku Isokoski
1d341a7aeb Don't reconfigure pins 2021-08-12 14:06:58 +03:00
Riku Isokoski
8a694adb09 Rework TouchHandler into not a task 2021-08-10 22:03:34 +03:00
Riku Isokoski
90ea1071d1 Explicitly disable pullup 2021-08-10 11:52:20 +03:00
Riku Isokoski
2194a339cf Only enable the bus when needed 2021-08-10 11:26:43 +03:00
Riku Isokoski
baa7e1bf12 Optimize twiMaster 2021-08-09 17:45:24 +03:00
hubmartin
abd8f343e4 Rename backlight level pins 2021-08-04 14:43:04 +02:00
hubmartin
b3e6da7514 Cleanup, set Pinetime as default 2021-08-03 20:40:27 +02:00
hubmartin
b7aa04e1f5 PinMap with namespace and constexpr 2021-08-03 20:32:23 +02:00
hubmartin
28abeae21b DRAFT: Put gpio pins to separate file 2021-08-02 21:37:48 +02:00
Riku Isokoski
3e42297bd8 Update 2021-07-18 12:32:46 +03:00
Riku Isokoski
93ccbf38e8 Fix touch wakeup and code cleanup 2021-07-16 01:49:20 +03:00
Riku Isokoski
2a3e126390 Fix most issues 2021-07-16 00:07:55 +03:00
Riku Isokoski
0d24d2b81e Quick fix 2021-07-15 23:18:05 +03:00
Riku Isokoski
fe64176e7b New touch handler, with issues 2021-07-15 14:11:27 +03:00
Riku Isokoski
5bc40c9287 Update touchpad driver 2021-07-14 17:11:16 +03:00
Avamander
572be3e857
Removed an illogical comparison from SystemInfo and St7789 driver (#449)
* Removed an illogical comparison
2021-06-22 20:31:31 +02:00
JF002
c6dca25b9f
Add support for BMA425 acceleration sensor. (#440)
* Add support for BMA425 acceleration sensor.
2021-06-19 20:27:59 +02:00
Jonathan Vander Mey
4d1626e3b6
Fix fallthrough on case statement (#403) 2021-06-12 11:07:23 +02:00
Jean-François Milants
6d524ebea2 Move most of the code from the constructor of the objects statically initialized in main() into Start()/Init() functions to avoid Static Initialization Order Fiasco (https://en.cppreference.com/w/cpp/language/siof). See https://github.com/JF002/InfiniTime/pull/415#issuecomment-859004238. 2021-06-12 10:58:28 +02:00