Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 27 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ name: Build PineTime Firmware
# When to run this Workflow...
on:

# Run this Workflow if a user presses the "Run workflow" button on GitHub
workflow_dispatch:
branches: [ master, develop ]

# Run this Workflow when files are updated (Pushed) in the "master" Branch
push:
branches: [ master ]
branches: [ master, develop ]

# Also run this Workflow when a Pull Request is created or updated in the "master" Branch
pull_request:
branches: [ master ]
branches: [ master, develop ]

# Steps to run for the Workflow
jobs:
Expand All @@ -28,9 +32,9 @@ jobs:

#########################################################################################
# Download and Cache Dependencies

- name: Install cmake
uses: lukka/get-cmake@v3.18.3
uses: lukka/get-cmake@v3.20.1

- name: Check cache for Embedded Arm Toolchain arm-none-eabi-gcc
id: cache-toolchain
Expand All @@ -45,7 +49,9 @@ jobs:
- name: Install Embedded Arm Toolchain arm-none-eabi-gcc
if: steps.cache-toolchain.outputs.cache-hit != 'true' # Install toolchain if not found in cache
uses: fiam/arm-none-eabi-gcc@v1.0.2
with:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
# GNU Embedded Toolchain for Arm release name, in the V-YYYY-qZ format (e.g. "9-2019-q4")
release: 9-2020-q2
# Directory to unpack GCC to. Defaults to a temporary directory.
Expand Down Expand Up @@ -83,10 +89,16 @@ jobs:
if: steps.cache-mcuboot.outputs.cache-hit != 'true' # Install MCUBoot if not found in cache
run: |
cd ${{ runner.temp }}
git clone --branch v1.5.0 https://github.com/JuulLabs-OSS/mcuboot
git clone --branch v1.5.0 https://github.com/mcu-tools/mcuboot

- name: Install imgtool dependencies
run: pip3 install --user -r ${{ runner.temp }}/mcuboot/scripts/requirements.txt
run: |
pip3 install --user -r ${{ runner.temp }}/mcuboot/scripts/requirements.txt

# cbor is a dependency that is not currently included in mcuboot requirements.txt
- name: Install imgtool dependencies (cbor)
run: |
pip3 install --user cbor

- name: Install adafruit-nrfutil
run: |
Expand All @@ -99,6 +111,8 @@ jobs:

- name: Checkout source files
uses: actions/checkout@v2
with:
submodules: 'true'

- name: Show files
run: set ; pwd ; ls -l
Expand All @@ -124,12 +138,17 @@ jobs:
run: |
cd build
make pinetime-mcuboot-app
echo ""

- name: Create firmware image
run: |
# The generated firmware binary looks like "pinetime-mcuboot-app-0.8.2.bin"
ls -l build/src/pinetime-mcuboot-app*.bin
${{ runner.temp }}/mcuboot/scripts/imgtool.py create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header build/src/pinetime-mcuboot-app*.bin build/src/pinetime-mcuboot-app-img.bin
IMGTOOL_INPUT_ARGUMENT=$( ls build/src | grep "pinetime-mcuboot-app-[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.bin" )
echo ""
echo -e "\u001b[32m ${IMGTOOL_INPUT_ARGUMENT} \u001b[0m"
echo ""
${{ runner.temp }}/mcuboot/scripts/imgtool.py create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header build/src/${IMGTOOL_INPUT_ARGUMENT} build/src/pinetime-mcuboot-app-img.bin
${{ runner.temp }}/mcuboot/scripts/imgtool.py verify build/src/pinetime-mcuboot-app-img.bin

- name: Create DFU package
Expand Down
8 changes: 4 additions & 4 deletions src/displayapp/screens/BatteryInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,16 @@ void BatteryInfo::UpdateScreen() {
if (batteryPercent >= 0) {
if (batteryController.IsCharging() and batteryPercent < 100) {
lv_obj_set_style_local_bg_color(charging_bar, LV_BAR_PART_INDIC, LV_STATE_DEFAULT, LV_COLOR_RED);
lv_label_set_text_static(status, "Battery charging");
lv_label_set_text_static(status, "Battery's charging");
} else if (batteryPercent == 100) {
lv_obj_set_style_local_bg_color(charging_bar, LV_BAR_PART_INDIC, LV_STATE_DEFAULT, LV_COLOR_BLUE);
lv_label_set_text_static(status, "Battery is fully charged");
lv_label_set_text_static(status, "Battery's fully charged");
} else if (batteryPercent < 10) {
lv_obj_set_style_local_bg_color(charging_bar, LV_BAR_PART_INDIC, LV_STATE_DEFAULT, LV_COLOR_YELLOW);
lv_label_set_text_static(status, "Battery is low");
lv_label_set_text_static(status, "Battery's low");
} else {
lv_obj_set_style_local_bg_color(charging_bar, LV_BAR_PART_INDIC, LV_STATE_DEFAULT, LV_COLOR_GREEN);
lv_label_set_text_static(status, "Battery discharging");
lv_label_set_text_static(status, "Battery's discharging");
}

lv_label_set_text_fmt(percent, "%02i%%", batteryPercent);
Expand Down
1 change: 0 additions & 1 deletion src/libs/lvgl
Submodule lvgl deleted from 23430c
6 changes: 6 additions & 0 deletions src/libs/lvgl/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[*.{c,h}]
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
1 change: 1 addition & 0 deletions src/libs/lvgl/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
open_collective: lvgl
43 changes: 43 additions & 0 deletions src/libs/lvgl/.github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Bug report
about: Create a bug report to help us improve
title: ''
labels: ''
assignees: ''

---

<!--
IMPORTANT
Issues that don't use this template will be ignored and closed.
-->

### Perform all steps below and tick them with [x]
- [ ] Check the related part of the [Documentation](https://docs.lvgl.io/)
- [ ] Update lvgl to the latest version
- [ ] Reproduce the issue in a [Simulator](https://docs.lvgl.io/latest/en/html/get-started/pc-simulator.html)

### Describe the bug
<!--
A clear and concise description of what the bug is.
-->

### To Reproduce
<!--
Provide a small, independent code sample that can be used to reproduce the issue.
Ideally this should work in the PC simulator unless the problem is specific to a platform.
Format the code like this:
```c
your code here
```
-->

### Expected behavior
<!--
A clear and concise description of what you expected to happen.
-->

### Screenshots or video
<!--
If applicable, add screenshots to help explain your problem.
-->
14 changes: 14 additions & 0 deletions src/libs/lvgl/.github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: Documentation
url: https://docs.lvgl.io
about: Be sure to read to documentation first
- name: Forum
url: https://forum.lvgl.io
about: For topics like How-to, Getting started, Feature request
- name: CONTIBUTING.md
url: https://github.com/lvgl/lvgl/blob/master/docs/CONTRIBUTING.md#faq-about-contributing
about: The basic rules of contributing
- name: CODING_STYLE.md
url: https://github.com/lvgl/lvgl/blob/master/docs/CODING_STYLE.md
about: Quick summary of LVGL's code style
29 changes: 29 additions & 0 deletions src/libs/lvgl/.github/ISSUE_TEMPLATE/dev-discussion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Development discussion
about: Discussion strictly related to the development of the LVGL.
title: ''
labels: ''
assignees: ''

---
<!--
IMPORTANT
Issues that don't use this template will be ignored and closed.
Normal Feature requests should go to the Forum: https://forum.lvgl.io/c/feature-request/9
-->

### Introduce the problem
<!--
A clear and concise description of the problem.
-->

### Examples and cases
<!--
Mention some examples and cases where the problem or the missing feature is relevant
-->

### Suggested solution
<!--
If you already have an idea about the solution share it here
-->
12 changes: 12 additions & 0 deletions src/libs/lvgl/.github/auto-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Comment to a new issue.
pullRequestOpened: |
Thank you for raising your pull request.
To ensure that all licensing criteria is met all repositories of the LVGL project apply a process called DCO (Developer's Certificate of Origin).
The text of DCO can be read here: https://developercertificate.org/
For a more detailed description see the [Documentation](https://docs.lvgl.io/latest/en/html/contributing/index.html#developer-certification-of-origin-dco) site.
By contributing to any repositories of the LVGL project you state that your contribution corresponds with the DCO.
No further action is required if your contribution fulfills the DCO. If you are not sure about it feel free to ask us in a comment.
8 changes: 8 additions & 0 deletions src/libs/lvgl/.github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
### Description of the feature or fix

A clear and concise description of what the bug or new feature is.

### Checkpoints
- [ ] Follow the [styling guide](https://github.com/lvgl/lvgl/blob/master/docs/CODING_STYLE.md)
- [ ] Update CHANGELOG.md
- [ ] Update the documentation
17 changes: 17 additions & 0 deletions src/libs/lvgl/.github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 21
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- architecture
- pinned
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue or pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
41 changes: 41 additions & 0 deletions src/libs/lvgl/.github/workflows/build_micropython.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build Micropython with LVGL submodule

on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Install SDL
run: |
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
sudo apt-get update -y -qq
sudo apt-get install libsdl2-dev
- name: Clone lv_micropython
run: git clone https://github.com/lvgl/lv_micropython.git .
- name: Update submodules
run: git submodule update --init --recursive
- name: Checkout LVGL submodule
working-directory: ./lib/lv_bindings/lvgl
run: |
git fetch --force ${{ github.event.repository.git_url }} "+refs/heads/*:refs/remotes/origin/*"
git fetch --force ${{ github.event.repository.git_url }} "+refs/pull/*:refs/remotes/origin/pr/*"
git checkout ${{ github.sha }} || git checkout ${{ github.event.pull_request.head.sha }}
git submodule update --init --recursive
- name: Build mpy-cross
run: make -j $(nproc) -C mpy-cross
- name: Build the unix port
run: make -j $(nproc) -C ports/unix
- name: Run advanced_demo
run: >
echo "import gc,utime;
utime.sleep(5);
gc.collect();
utime.sleep(5)" |
ports/unix/micropython -i lib/lv_bindings/examples/advanced_demo.py
18 changes: 18 additions & 0 deletions src/libs/lvgl/.github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: C/C++ CI

on:
push:
branches: [ master, dev ]
pull_request:
branches: [master, dev ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: ammaraskar/gcc-problem-matcher@master
- name: Run tests
run: sudo apt-get install libpng-dev; cd tests; python ./build.py
16 changes: 16 additions & 0 deletions src/libs/lvgl/.github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
on:
issues:
types: [opened, edited]

jobs:
auto_close_issues:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Automatically close issues that don't follow the issue template
uses: lucasbento/auto-close-issues@v1.0.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-close-message: "@${issue.user.login}: hello! :wave:\n\nThis issue is being automatically closed because it does not follow the issue template." # optional property
closed-issues-label: "not-template"
17 changes: 17 additions & 0 deletions src/libs/lvgl/.github/workflows/merge-to-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Merge master branch to dev
on:
push:
branches:
- 'master'
jobs:
merge-branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Merge to dev branch
uses: devmasx/merge-branch@v1.1.0
with:
type: now
target_branch: 'dev'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
27 changes: 27 additions & 0 deletions src/libs/lvgl/.github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Create Release

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
See the [CHANGELOG](https://github.com/lvgl/lvgl/blob/master/CHANGELOG.md)
draft: false
prerelease: false
9 changes: 9 additions & 0 deletions src/libs/lvgl/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
scripts/release/__pycache__
**/*.o
**/*bin
**/*.swp
**/*.swo
tags
docs/api_doc
scripts/cppcheck_res.txt
scripts/built_in_font/lv_font_*
Empty file added src/libs/lvgl/.gitmodules
Empty file.
Loading