-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #583 from doudar/Zwift_Gear_UI
Zwift gear UI
- Loading branch information
Showing
20 changed files
with
594 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Update Changelog | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
update-changelog: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Update Changelog | ||
run: | | ||
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0") | ||
echo "Latest tag: $LATEST_TAG" | ||
if ! grep -q "## \[Unreleased\]" CHANGELOG.md; then | ||
echo "No [Unreleased] section found" | ||
exit 0 | ||
fi | ||
FIRST_VERSION=$(grep -oP "## \[\K[0-9]+\.[0-9]+\.[0-9]+" CHANGELOG.md | head -1 || echo "0.0.0") | ||
if [ "$LATEST_TAG" = "$FIRST_VERSION" ]; then | ||
echo "Latest tag matches first version in changelog" | ||
exit 0 | ||
fi | ||
# Create temporary files | ||
echo -e "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [Unreleased]\n\n### Added\n\n### Changed\n\n### Hardware\n" > header.tmp | ||
# Update the old unreleased section | ||
sed "0,/## \[Unreleased\]/s/## \[Unreleased\]/## [$LATEST_TAG]/" CHANGELOG.md | tail -n +7 > content.tmp | ||
# Combine files | ||
cat header.tmp content.tmp > CHANGELOG.md | ||
rm header.tmp content.tmp | ||
if git diff --quiet CHANGELOG.md; then | ||
echo "No changes to commit" | ||
exit 0 | ||
fi | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add CHANGELOG.md | ||
git commit -m "Update changelog for version $LATEST_TAG" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright (C) 2020 Anthony Doud & Joel Baranick | ||
* All rights reserved | ||
* | ||
* SPDX-License-Identifier: GPL-2.0-only | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <NimBLEDevice.h> | ||
|
||
class BLE_Wattbike_Service { | ||
public: | ||
BLE_Wattbike_Service(); | ||
void setupService(NimBLEServer *pServer); | ||
void update(); | ||
void parseNemit(); | ||
|
||
private: | ||
NimBLEService *pWattbikeService; | ||
NimBLECharacteristic *wattbikeReadCharacteristic; | ||
NimBLECharacteristic *wattbikeWriteCharacteristic; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.