Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.2.0! #3

Merged
merged 140 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
e918760
Fix small bugs, prepare structs for BPM
nullstalgia Jul 14, 2024
b41b41a
Connecting and viewing BPM
nullstalgia Jul 14, 2024
6de42db
Custom panic handler
nullstalgia Jul 14, 2024
cc41d98
Slow rearrangements
nullstalgia Jul 14, 2024
66d9d87
State flow
nullstalgia Jul 14, 2024
f7443cd
Start of settings file
nullstalgia Jul 15, 2024
944a443
Start of OSC sending out, nicer panic handling
nullstalgia Jul 16, 2024
c45435e
Simplify HR conversion
nullstalgia Jul 16, 2024
0ec8068
Start of save prompt, tested on Linux!
nullstalgia Jul 17, 2024
0a8937b
Rename BT scan, start of some dc logic, etc
nullstalgia Jul 17, 2024
4cbc306
Saving working, more comments, etc
nullstalgia Jul 18, 2024
7a9c8a3
Add logging crates, start to handle CentralEvents, rearranging, etc
nullstalgia Jul 25, 2024
6fb470e
Better and more logging, better saving, BLE Error Handling!
nullstalgia Jul 25, 2024
928a237
Error popups, add IamfromSpace's HRBLE decoder, reshaping OSC thread
nullstalgia Jul 26, 2024
115b131
Graceful shutdown, loop labels, continuing OSC work
nullstalgia Jul 26, 2024
490fa98
Use RR Interval for beat toggle/pulse, mimic activity when disconnected
nullstalgia Jul 26, 2024
9dcaf30
Non-blocking heart beat interval, RR twitch parameters
nullstalgia Jul 27, 2024
051d70b
Bundle beats
nullstalgia Jul 28, 2024
916901f
Decode RR intervals into std::time::Durations
nullstalgia Jul 28, 2024
34542ca
Add logging (CSV/TXT)
nullstalgia Jul 29, 2024
034aa36
Simplify new device saving, write path of panic dump in log
nullstalgia Jul 29, 2024
e6a4469
Allow early graceful shutdown if triggered during (re)connection
nullstalgia Jul 29, 2024
aa88506
Start of session stats + chart!
nullstalgia Jul 30, 2024
457f58a
RR Chart, Battery Percent Color
nullstalgia Jul 30, 2024
4db7e5d
More sane table scrolling
nullstalgia Jul 30, 2024
0b1ebf4
Github Actions test
nullstalgia Jul 30, 2024
2c7483f
Use write_all instead of write
nullstalgia Jul 30, 2024
8651c38
OSC Battery, Max Duration for hiding disconnect
nullstalgia Jul 30, 2024
e6cffae
Better disconnect/mimic logic
nullstalgia Jul 31, 2024
987afdc
Delay initial connected message, improves the "0" on display edge case
nullstalgia Jul 31, 2024
b944ddb
Combined table and option for it!
nullstalgia Jul 31, 2024
0cd5e8f
Clamp max session RR
nullstalgia Jul 31, 2024
05c3aa0
Move RR Cooldown to notification thread
nullstalgia Jul 31, 2024
79974a0
Graph polish
nullstalgia Jul 31, 2024
d1bb08d
Fix the characteristics crash
nullstalgia Aug 1, 2024
9245780
Allow more RR history and chart configuration
nullstalgia Aug 1, 2024
58e985a
Config'd RR max is now a hard cap
nullstalgia Aug 1, 2024
dc6797c
Combine chart rendering functions
nullstalgia Aug 1, 2024
5a48d1b
Only update datasets when new data is received
nullstalgia Aug 1, 2024
1239aeb
Consolidate naming (hr -> bpm) where it makes sense
nullstalgia Aug 1, 2024
7d4143f
Implement only_positive_float_bpm
nullstalgia Aug 1, 2024
0a95528
Make clamping optional on RR chart for min/max
nullstalgia Aug 1, 2024
cc221b0
Cleaning up warnings, only "q" exit on main menu
nullstalgia Aug 2, 2024
906c52f
Tidy settings, clarify chart_rr var names
nullstalgia Aug 2, 2024
8f91408
OSC: Use configured host address, better panic messages
nullstalgia Aug 2, 2024
a3a8404
Dummy! (Sending values without an HR adapter)
nullstalgia Aug 2, 2024
d4fb300
Return data logging thread early if all disabled
nullstalgia Aug 2, 2024
2211b91
Preparing CI and README for release
nullstalgia Aug 3, 2024
1d2ab1a
CI Build cache?
nullstalgia Aug 3, 2024
9231598
Re-add dbus linux dependencies for build CI
nullstalgia Aug 3, 2024
06f4cf5
Manual clippy fixes
nullstalgia Aug 3, 2024
a0b4e3f
Clippy --fix'd, ignore some legacy stuff I haven't investigated yet
nullstalgia Aug 3, 2024
bf0acd6
Linux CI release dependencies
nullstalgia Aug 3, 2024
b822dcf
Fix CI for all 3?
nullstalgia Aug 3, 2024
842cf7e
Include README and LICENSE with Release
nullstalgia Aug 3, 2024
dc3a213
Move Linux CI dependencies script
nullstalgia Aug 3, 2024
4d138f1
Remove sudo from CI apt-get
nullstalgia Aug 3, 2024
9aec5d1
chmod u+x linux_dep.sh
nullstalgia Aug 3, 2024
36fa1ca
Continuous Inflammation
nullstalgia Aug 3, 2024
cc544f2
Swap release CI workflow
nullstalgia Aug 3, 2024
e65c575
Specify binary
nullstalgia Aug 3, 2024
4ddfc45
Update LICENSE
nullstalgia Aug 3, 2024
bb390c7
Bump version
nullstalgia Aug 3, 2024
da7a849
Brief setup directions in README
nullstalgia Aug 3, 2024
2faf095
Update README.md
nullstalgia Aug 3, 2024
c86fc28
Cleanup, typos
nullstalgia Aug 3, 2024
13772dc
Set default debug level to "info", shorten chart variable names
nullstalgia Aug 3, 2024
f1c54e7
Default log level based on build type
nullstalgia Aug 4, 2024
bbf5680
Hide RR on combined chart if dataset is empty
nullstalgia Aug 5, 2024
2142aea
Set a maximum log file size (1MB)
nullstalgia Aug 5, 2024
e066db1
Initial WebSocket support!
nullstalgia Aug 5, 2024
846f203
Remove extra reference
nullstalgia Aug 5, 2024
3533484
Color chart Y axis labels, custom chart legend, update Ratatui to 0.2.8
nullstalgia Aug 9, 2024
77ce985
Fix upper case acronyms, use len() instead of iter().count()
nullstalgia Aug 10, 2024
8df2b13
Update Demos with color-coded chart labels
nullstalgia Aug 10, 2024
7468825
CI: Change to run on release creation, not tag push
nullstalgia Aug 10, 2024
00f6783
Bump version
nullstalgia Aug 10, 2024
418388a
Huge internal re-organization (unfinished, but functional)
nullstalgia Sep 15, 2024
77104ef
Fix current warnings, better OSC Config errors, debug/release conf, etc
nullstalgia Sep 15, 2024
18e8471
Broadcast macro
nullstalgia Sep 15, 2024
fe296b6
From Battery to u8, more .into()s for AppUpdate, logging actor edit, etc
nullstalgia Sep 15, 2024
767757f
FatalDetailed error, more file error handling
nullstalgia Sep 15, 2024
788b0d2
Appease the all-mighty Clippy
nullstalgia Sep 15, 2024
98b02d6
App Icon! (Windows-only right now)
nullstalgia Sep 15, 2024
38722f4
Fix Release's config dir errors
nullstalgia Sep 15, 2024
dabac4c
First integration test! (WebSocket -> bpm.txt)
nullstalgia Sep 16, 2024
a6c97d1
Set argh bools to optional
nullstalgia Sep 16, 2024
1ad48b3
OSC Address unit tests, start of CI tests and config parse testing
nullstalgia Sep 16, 2024
2bb1514
Portable CI release, config test tweak
nullstalgia Sep 17, 2024
7dd49f9
HR Twitching into shared object with tests
nullstalgia Sep 17, 2024
36a7fcd
Clippy recommendations
nullstalgia Sep 17, 2024
18afc38
Separate some config file sections
nullstalgia Sep 17, 2024
f47419e
Add .justfile (https://github.com/casey/just)
nullstalgia Sep 17, 2024
6249160
Hide RR in combined chart if empty
nullstalgia Sep 17, 2024
a45fc8c
Prevent RR divide by zero
nullstalgia Sep 17, 2024
97617e5
Actually hide RR in combined chart if empty
nullstalgia Sep 17, 2024
d30d38a
Subcommands to quickly access other modes!
nullstalgia Sep 18, 2024
afd065b
WebSocket Dummy arguments, prompt plans
nullstalgia Sep 19, 2024
d0ba664
Remove param_ prefix from osc addresses
nullstalgia Sep 21, 2024
52c7d83
Close test's websocket on shutdown
nullstalgia Sep 24, 2024
c1bca79
Unused lint warning as error, make sure Futures and Results get resolved
nullstalgia Sep 26, 2024
0e3796a
Auto-generate VRCX App Launcher shortcut!
nullstalgia Sep 26, 2024
9cff7c7
Make notifications a little easier to read
nullstalgia Sep 27, 2024
db0e5f3
Only check files with .lnk extension
nullstalgia Sep 27, 2024
1b00bd8
Make sure VRCX stuff only happens on Windows
nullstalgia Sep 27, 2024
0665f49
Dang, missed a spot
nullstalgia Sep 27, 2024
3b6bb49
Isolate more VRCX TUI to Windows-only
nullstalgia Sep 27, 2024
3061aaf
Appease Unix Clippy
nullstalgia Sep 27, 2024
905c2bb
Fix Linux compile, and fix stuck save prompt response
nullstalgia Sep 27, 2024
41789bf
Dummy shows how long left in disconnection testing
nullstalgia Sep 30, 2024
57ebf19
Rename info_table to action_bar
nullstalgia Sep 30, 2024
e35a597
Allow setting dummy speed from CLI
nullstalgia Sep 30, 2024
e3e548f
Starting work on Activities
nullstalgia Sep 30, 2024
84cb011
Autoresize when terminal size changes
nullstalgia Sep 30, 2024
09b3047
Activities base impl!
nullstalgia Oct 1, 2024
f674475
Forgot to save last activity
nullstalgia Oct 1, 2024
945d680
BTreeMap sustains key order, guess I'll use that
nullstalgia Oct 1, 2024
c218b46
Better prevent VRCX dead code on Unix
nullstalgia Oct 1, 2024
c46a7ba
Tweak Activities TUI, log to CSV
nullstalgia Oct 1, 2024
b541329
Use tokio::select for ui rx loop/crossterm events, tweaks for VHS
nullstalgia Oct 1, 2024
abdccbd
Ensure config save is flush()'d
nullstalgia Oct 2, 2024
149e1ef
Trying to figure out why config goes missing
nullstalgia Oct 3, 2024
cf0b263
HR can restart BLE Central, allow adding new Activities, sync > flush?
nullstalgia Oct 3, 2024
5b81fda
Output sha512 checksum for release artifacts
nullstalgia Oct 6, 2024
4df51e1
Auto-updating of portable binaries!
nullstalgia Oct 7, 2024
6182a1d
Fix Linux compile, fix terminal updates cancelling app update handling!
nullstalgia Oct 8, 2024
cbc372b
Prometheus Push Logging, improve log's initial activities
nullstalgia Oct 9, 2024
37cee37
Tell BLE Manager to start scanning when getting Device Unreachable error
nullstalgia Oct 9, 2024
b30457c
Trying to ensure stability across device reconnects
nullstalgia Oct 10, 2024
17203bc
Getting close to v0.2.0 release
nullstalgia Oct 10, 2024
389908a
Switch to tracing for logging
nullstalgia Oct 16, 2024
a9fa1ce
VRCX: Fix stuck prompt, handle failed shortcut canonicalization
nullstalgia Oct 16, 2024
758af9a
Enforcing Error message priority
nullstalgia Oct 16, 2024
2433fba
Don't let update prompt dismiss press trigger BLE connect prompt
nullstalgia Oct 16, 2024
340e4ca
More sane logic in device connection
nullstalgia Oct 16, 2024
12fb845
Give OS and adapter time to breathe between retries
nullstalgia Oct 16, 2024
e27d833
Remove some old comments
nullstalgia Oct 16, 2024
136e541
Fix memory leak when trying to reconnect
nullstalgia Oct 17, 2024
5db6276
Simplify update prompt logic, Trigger BLE Scan on connect error
nullstalgia Oct 20, 2024
ca0bf29
Tweak scan restart behavior, clamp Activity prompt activation
nullstalgia Nov 16, 2024
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
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# # For console-subscriber
# [build]
# rustflags = ["--cfg", "tokio_unstable"]
21 changes: 17 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
name: Build

# Runs for each commit/PR, but not tag push
on:
push:
branches: ["main"]
branches:
- "**"
pull_request:
branches: ["main"]

env:
CARGO_TERM_COLOR: always

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Install Dependencies
- uses: actions/checkout@v4
- name: Install Linux Dependencies
run: sudo apt-get update && sudo apt-get install -y libdbus-1-dev
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1.9.0
# - name: cargo fmt
# run: cargo fmt --all -- --check
- name: Run Clippy
run: cargo clippy --all-targets --all-features
- name: Build
run: cargo build --verbose
- name: Run Unit Tests
run: cargo test --all-targets --all-features
- name: Run Integration Tests
run: cargo test --all-targets --all-features -- --ignored --show-output --test-threads=1
96 changes: 30 additions & 66 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,45 @@
# From: https://github.com/marketplace/actions/build-and-upload-rust-binary-to-github-releases
name: Release

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"

permissions:
contents: write

jobs:
build-and-upload:
name: Build and upload
runs-on: ${{ matrix.os }}
on:
release:
types: [created]

env:
CARGO_TERM_COLOR: always

jobs:
upload-assets:
strategy:
matrix:
include:
- build: linux
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- build: macos-intel
os: macos-latest
target: x86_64-apple-darwin
- build: macos-arm
- target: x86_64-apple-darwin
os: macos-latest
target: aarch64-apple-darwin

- target: x86_64-pc-windows-msvc
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install dependencies
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install -y libdbus-1-dev pkg-config

- name: Get the release version from the tag
- uses: actions/checkout@v4
- name: Get Dependencies (Linux)
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Build
uses: actions-rs/cargo@v1
run: sudo apt-get update && sudo apt-get install -y libdbus-1-dev
if: startsWith(matrix.os, 'ubuntu')
- uses: taiki-e/upload-rust-binary-action@v1
with:
use-cross: false
command: build
args: --verbose --release --target ${{ matrix.target }}

- name: Build archive
shell: bash
run: |
# Replace with the name of your binary
binary_name="btlescan"

dirname="$binary_name-${{ env.VERSION }}-${{ matrix.target }}"
mkdir "$dirname"
if [ "${{ matrix.os }}" = "windows-latest" ]; then
mv "target/${{ matrix.target }}/release/$binary_name.exe" "$dirname"
else
mv "target/${{ matrix.target }}/release/$binary_name" "$dirname"
fi

if [ "${{ matrix.os }}" = "windows-latest" ]; then
7z a "$dirname.zip" "$dirname"
echo "ASSET=$dirname.zip" >> $GITHUB_ENV
else
tar -czf "$dirname.tar.gz" "$dirname"
echo "ASSET=$dirname.tar.gz" >> $GITHUB_ENV
fi

- name: Release
uses: softprops/action-gh-release@v1
bin: iron-heart
features: portable
target: ${{ matrix.target }}
include: LICENSE,README.md
tar: unix
zip: windows
archive: $bin-$tag-$target
token: ${{ secrets.GITHUB_TOKEN }}
checksum: sha512
- uses: actions/attest-build-provenance@v1
with:
files: |
${{ env.ASSET }}
subject-path: "**/*.tar.gz,**/*.zip"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/target
# Data logging files
# These are put in the root instead of in the target dir in portable+debug builds
# since Cargo cleans them up when I don't want it to
session_logs
bpm.txt
52 changes: 52 additions & 0 deletions .justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# https://github.com/casey/just
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]

alias r := run
alias b := build
alias br := build-release
alias rr := release
alias rel := release
alias t := test
alias ti := test-integration
alias c := clippy
alias d := dummy
alias ws := websocket
alias wsd := websocket-dummy

run *ARGS:
cargo run {{ARGS}}

build *ARGS:
cargo build {{ARGS}}

release:
cargo run --release --features portable

build-release:
cargo build --release --features portable

test:
cargo test

test-integration *ARGS:
cargo test -- --ignored --nocapture --test-threads=1 {{ARGS}}

clippy:
cargo clippy --all-targets --all-features

# Shortcuts for subcommands

ble:
cargo run -- ble

dummy *ARGS:
cargo run -- dummy {{ARGS}}

vhs:
cargo run -- dummy --vhs -s 5.0

websocket *ARGS:
cargo run -- ws {{ARGS}}

websocket-dummy *ARGS:
cargo run --example websocket_dummy -- {{ARGS}}
Loading