Commit Graph

14 Commits (beae868e56c2dfd6e15471dc88c91034b0842059)

Author SHA1 Message Date
alex cb2e98cd8b
nd: add bitcoin core report sent to UI every min
this adds a very simple bitcoind RPC client able to make a few queries
like the blockchain and network status. the daemon uses the client
to get the bitcoind status and sends a report through comms periodically.

there's also a little playground program which simply dumps a query
result to stderr. built on demand with "zig build btcrpc".
1 year ago
alex 532581a246
ngui: display poweroff progress during system shutdown
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
this greatly improves UX during shutdown: no need to guess at which
point it's ok to unplug the power cord.

the commit also includes a GUI playground. a sort of a fake daemon which
sends hardcoded messages to ngui. useful for manual debugging and trying
different UX scenarious.
1 year ago
alex 78df4ad7ee
nd: poweroff with progress report to ngui
the daemon now sends info about the system shutdown progress: a list of
important services which may require up to several minutes to stop such
as lnd lightning daemon and bitcoin core.

see next commit for how this info is displayed and used by the GUI.
1 year ago
alex a7c560e92a
build: switch LVGL default logging from info to warn
ci/woodpecker/push/woodpecker Pipeline was successful Details
this hides all LVGL info messages about UI interactions like events,
making the log output more useful during development.

it is still possible to increase verbosity to the original level using
the lvgl_loglevel build flag.
1 year ago
alex 7dc1f6329e
build: add semantic versioning support
both nd and ngui now acquire semantic versioning recorded at the build
time. they also report the version at startup and -v flag.
this is useful for a release process and to avoid potential
compatibility issues in the future.

in a regular build flow, the version is taken from a git tag using the
following command:

    git -C . describe --match 'v*.*.*' --tags --abbrev=8

in a non-standard scenario where git isn't available, the version can
be provided on the command line during build like so:

    zig build -Dversion=1.2.3

if both git and command line supplied versions are available, they must
match.
1 year ago
alex 706a62a08e
build: strip C source file paths from resulting binary
ci/woodpecker/push/woodpecker Pipeline was successful Details
helps with reproducible builds, especially for releases.
1 year ago
alex f1784cb39d
ngui: add a way to limit LVGL logging verbosity
ci/woodpecker/push/woodpecker Pipeline was successful Details
the commit adds a build option lvgl_loglevel and sets a default similar
to that of std.log.default_level so the two are aligned more or less.
1 year ago
alex c73867ea4d
ngui: get rid of the ambiguous ui header file
functions declared in ui.h were actually used by ui.c, the opposite of
what such a header is expected to contain. these functions are defined
in zig code and declarations are better off in the same ui.c file.

this is just a quick clean up before porting some C code to zig.
1 year ago
alex 021c810dc7
ui: move all C lvgl/zig code into lvgl.zig and drv.zig
the idea is for all zig code to use C LVGL only via this
new module lvgl.zig, all display and input driver/devices is handled
by drv.zig.

this makes C/zig nicely compartmentalized in just a handful places.
2 years ago
alex 6a93ba9a30
zig: switch from stage1 to the new stage2 compiler
stage2 has been merged and set as default around end of aug 2022 in
https://github.com/ziglang/zig/pull/12368. since then the main focus has
been on this new stage2 compiler.

with the release of 0.10.1 the stage2 is fairly useable now and it is
the way forward, towards zig 0.11 or 1.0. read more about difference in
https://github.com/ziglang/zig/wiki/Self-Hosted-Compiler-Upgrade-Guide

another good read on the relevant topic is
https://ziglang.org/news/goodbye-cpp/
2 years ago
alex c08ded524e
docs: a quick local dev setup and contributing sections
while there, made test filter actually work with

    zig build test -Dtest-filter=xxx

a previous invocation with `--test-filter` never worked.
2 years ago
alex 0266125c65 ui: increase default font from 14px to 16px for readability
16px looks easier to read but IPv6 addresses don't fit in the wifi
settings panel anymore. need to find a better way how to display them or
change font.
2 years ago
alex bfc71fec92 start: initial minimal implementation
3 tabs: bitcoin, lightning and settings.
only settings is populated, with wifi info and shutdown.

see build.zig for how everything ties up together.
2 years ago
alex 6d4c4fa4b2 repo: initial blank import of zig init-exe
this is to make a valid HEAD for upcoming "git subtree add ..."
2 years ago