Same change as done in c3295d6d2a
But for get-base-ref-size job
The variable substitution I introduced are bash features. So they don't work with sh.
Update the size job to use `bash` instead of `sh` as shell
Firmware build works. But the build size job afterwards fails.
The firmware build uses `shell: bash --noprofile --norc -e -o pipefail {0}` as shell.
The size job uses `shell: sh -e {0}`
The variable substitution I introduced are bash features. So they don't work with sh.
Update the size job to use `bash` instead of `sh` as shell
The upstream NRF-SDK download url and zip archive filename changed,
which was fixed with https://github.com/InfiniTimeOrg/InfiniTime/pull/2270
But the archive contents stayed the same, with the "old" folder name.
After #2270 we have basically the same docker-container as before the PR,
but the `GetNrfSdk` function of the `build.sh` script is called again during
firmware build time as the expected foldername for the SDK isn't the same as
the zip filename:
```sh
[ ! -d "$TOOLS_DIR/$NRF_SDK_VER" ] && GetNrfSdk
```
Then during the build the `buils.sh` script tries to execute `GetNrfSdk` again,
which fails as the files already exist resulting in the following error:
```
replace /opt/nRF5_SDK_15.3.0_59ac345/components/802_15_4/api/HAL/hal_atomic.h? [y]es, [n]o, [A]ll, [N]one, [r]ename: NULL
```
Fix this by reverting the `NRF_SDK_VER` to the folder name in the zip
archive and by some character replacement generate the download URL from
the above (the download is in lower-case without the `_` and `.`
characters).
Furthermore add safeguards to check after the `GetNrfSdk` call if the
expected folder is really created. Then we have an error early during
container image creation if the contents of the zip-archive are
unexpected.
There was a newline at the end of the last line on the third screen,
which was causing the label to not be centered vertically.
Removing it fixes the centering.
* DisplayApp.cpp: Remove the vibration from OnChargingEvent
This fixes a bug where the vibration interupts the physical connection with the charger and therefore triggers a new charging event and vibration, ending in a cycle of vibrations while charging.
* remove OnChargingEvent message from DisplayApp
---------
Co-authored-by: minacode <minamoto9@web.de>
Redesign BatteryInfo App using an Arch widget instead of a bar.
The colors I used are as follows:
- Discharging (default): green
- Charging: lime
- Battery full: blue
- Battery low (<10%): red
Optimise the battery animation to not use 100% CPU (which causes DisplayApp to spin forever with AOD)
(DisplayApp also needs to be fixed in the future so it cannot spin infinitely)
Simplify alarm alerting screen and fix bug with
alerting on time value change
SetAlerting creates an lv_task to automatically call StopAlerting after one minute. This task will call an invalid function reference and lead to a crash under the following condition:
All exit paths but the time value change (so not considering this fix) call StopAlerting themselves, which also terminates the lv_task.
However, the value change callback only calls DisableAlarm, because its normal use case is for setting up an alarm, where you have to re-confirm enabling the alarm after every change you make.
DisableAlarm still sets isAlerting in the alarmController to false, probably because someone thought a currently alerting but also disabled alarm makes no sense, this was introduced in a0cd439.
That causes the destructor of Alarm to think there is nothing to do regarding the alerting when the alarm screen is dismissed.
Therefore it does not call StopAlerting and the lv_task is left with an invalid function pointer, because Alarm does not exist anymore once the lv_task finally goes to call the callback function
Fix error when compiling the Pinetime using the Docker image.
If done with Docker, the container does not trust the /sources
folder, leading to a blank response of the command that grabs
the git commit `git rev-parse --short HEAD`.
```
fatal: detected dubious ownership in repository at '/sources'
To add an exception for this directory, call:
git config --global --add safe.directory /sources
PROJECT_GIT_COMMIT_HASH_SUCCESS? 128
BUILD CONFIGURATION
-------------------
* Mode : Release
* Version : 1.3.0
* Toolchain : /opt/gcc-arm-none-eabi-10.3-2021.10
* GitRef(S) :
* NRF52 SDK : /opt/nRF5_SDK_15.3.0_59ac345
* Target device : PINETIME
* Build DFU (using adafruit-nrfutil) : Enabled
* Build resources : Enabled
```
If the `git config --global --add safe.directory /sources` is
added to the Dockerfile, the problem is solved and the hash is
added correctly.
The openrepos contain obsolete version (description on the openrepos page says that). New SailfishOS version is in chum repo. Additionally, there is Ubuntu Touch and Flatpak version.