Commit Graph

76 Commits (master)
 

Author SHA1 Message Date
alex 281c3b6e18
merge zig: upgrade from 0.11 to 0.12.0
ci/woodpecker/push/woodpecker Pipeline was successful Details
1 month ago
alex 729af48569
zig: upgrade from 0.11 to 0.12.0
ci/woodpecker/push/woodpecker Pipeline was successful Details
mostly lots of language improvements and bugfixes, leading to better
code here, from the programming language point of view.

zig v0.12.0 release notes:
https://ziglang.org/download/0.12.0/release-notes.html
1 month ago
alex e07b1557c7
lib/ini: sync with upstream at 19e1210
exact command:

    git subtree --prefix=lib/ini --squash pull \
      https://github.com/ziglibs/ini \
      19e1210063882ab7db73a8aaa60e733d4aaafe9f
1 month ago
alex e0851a5057 Squashed 'lib/ini/' changes from 2b11e8fef..19e121006
19e121006 FIX: local variable is never mutated
91775fd5c UPDATE: updated Build.zig to zig master

git-subtree-dir: lib/ini
git-subtree-split: 19e1210063882ab7db73a8aaa60e733d4aaafe9f
1 month ago
alex 285cff1d51
ui: increase keyboard buttons font size
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/tag/woodpecker Pipeline was successful Details
simply make the keyboard buttons text larger.
makes it easier to type.
1 month ago
alex e55471e48c
ngui,nd: screenlock feature implementation
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/tag/woodpecker Pipeline was successful Details
the screenlock use case is a way to restrict access to the touchscreen,
for example from children. it is in no way a security measure against
theft or prolonged physical access.

however, nd daemon will refuse to connect to a wifi, switch sysupdates
channel, set a new nodename or init lnd wallet during active screenlock

screenlock pin code can be enabled and disabled from the settings screen.
upon loss of the code, the only way to disable screenlock is to set
slock field to null in the nd daemon conf file.
2 months ago
alex a080e1ac79
nd,ui: add a new facility to be able to change node name
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/tag/woodpecker Pipeline was successful Details
the "nodename" encompasses lnd alias and OS hostname.
while the former may be seen by lightning node peers as a node name, the
latter is how the device is seen on a local network such as WiFi.

upon receiving a comm message set_nodename, nd sets both lightning node
alias and hostname to that new name while applying restrictions such as
RFC 1123 for hostnames.

the lightning alias is written to lnd config file, regenerated and
persistent, after which the lnd daemon is restarted to pick up the
changes. network host name is changed by writing the name to
/etc/hostname and issuing "hostname <newname>" shell command.

while persisting operations are atomic, the whole sequence isn't.
in the latter case an inconsistency can be eliminated by sending a
set_nodename msg again.

the nd daemon also includes the OS hostname in the settings message when
sending it to ngui.
2 months ago
alex 836f196a44
ui: add zig wrapper funcs for keyboard on/off
ci/woodpecker/push/woodpecker Pipeline was successful Details
this is still someone limiting in that tabview invariance is assumed.
so, it'll require some more to make it work for a screen pop over in the
future.
3 months ago
alex 0212f11d47
test: reinstate lndhc playground build
it broke after last commit where lnd client got moved into the lightning
module, preventing lndhc from importing it.

also, add lndhc to CI build to catch regressions like this early on.
3 months ago
alex d217adffba
ui/driver: add Xlib support when dev-building on a linux host
ci/woodpecker/push/woodpecker Pipeline was successful Details
something broken in recent SDL2 or Xorg releases, or a combination of
plus LVGL usage of their APIs. the result was that the main window
stopped drawing altogether. Downgrading SDL2 and other parts didn't seem
to help at all.

this commit adds support for SDL2-alternative when compiling and running
the GUI on a dev linux machine with Xorg.

there's a small patch to the original lv_drivers/x11/x11.c since clang
in C11 mode refuses to compile otherwise, giving a "initializer element
is not a compile-time constant" error.

release builds remain as is. this is only for development.
3 months ago
alex 8b837e783c
merge lvgl8.3.11 and lv_drivers updates into master 3 months ago
alex be9cb613de
lib/lv_drivers: update to latest 0091dc6 (2024-02-14)
git subtree --prefix=lib/lv_drivers --squash pull \
      https://github.com/lvgl/lv_drivers \
      0091dc612facc94dce1061a9b78d641c77f1791a
3 months ago
alex 20ee2f8220 Squashed 'lib/lv_drivers/' changes from 718302577..0091dc612
0091dc612 fix(wayland): fix compile error wrt LV_WAYLAND_CLIENT_SIDE_DECORATIONS (#307)
451e659cf Add pkgconfig file (#301)
5a5b4a1a3 added x11 display driver port (#300)
4391dbf32 perf(drm): use wait_cb for direct double-buffered rendering (#299)
7e18481ce fix(drm): backport drm driver fixes from lvgl 9 (#298)
f5b58b947 feat(evdev): backport multi device support from lvgl 9 (#296)
ad66ff155 add return value to drm_init
c239cc465 Removed clamp from Calibrate section as it has map in it
e44e7f043 fix(build): Update xpt2046_read to match signature required by lv_indev_drv_t's read callback. (#290)
7b9dee11c Fix crash during startup in certain conditions (#286)
9d153fb65 Add USE_WAYLAND to smm.c (#285)
8669c6fc8 libInput: Add POINTER_MOTION_ABSOLUTE support (#284)
c71e5f84b drm: Default to XRGB8888 framebuffer (#282)
57494ff8e Add a way to set SDL window title from lv_drv_conf.h (#277)
b03c9dac9 fix(xkb): Fix memory leak by avoiding double reference (#276)
ec0ad8296 feature(libinput): Expose function for querying capability (#275)
0d5de84e2 feature(libinput): Add function to reset driver states (#274)
94dc4ce06 Use win32 singly linked list instead of LVGL linked list for fixing memory access conflict issues for win32drv. (#273)
1792ab20a feature(wayland): add a shared memory manager, allowing backing buffers to be allocated on demand. (#270)
f7935569f use SDL_RES instead of LV_RES for touch events (#268)
ba9c3cc4f Update README.md (#261)
f261225d9 follow lvgl changes
ab5e30ccb Add the multiple display support for win32drv. (#259)
820341ea1 Improve the keyboard support for win32drv. (#258)
b13361a1f fix: The mouse moves outside the screen area (#251)
829e0ffc3 chore(wayland) : accelerate damage updates, reduce unnecessary cycles (#249)
5523f9974 fix(wayland-protocols): minimum version (#246)
fe9de86e9 Wayland api fixes (#243)
59e698ce1 fix(wayland) : fix possible memory leak (#238)
2ed01feab fix(drm): Fix compiler warnings (#237)
cf4e6d75a make windows.h lower case (#236)
dc0d71a3a chore(sdl): fix warning (#232)
c68b59e42 fix(fbdev): Fix rendering for 24 bits per pixel (#231)
4f98fddd2 hide the SDL2 include from public LVGL functions (#227)
ff01834db fix(fbdev): Gracefully handle FBIOBLANK errors (#229)
73219786a bump version number to v9.0.0-dev

git-subtree-dir: lib/lv_drivers
git-subtree-split: 0091dc612facc94dce1061a9b78d641c77f1791a
3 months ago
alex bc87a57de2
lib/lvgl: update from v8.3.1 to latest v8.3.11
git subtree --prefix=lib/lvgl --squash pull \
      https://github.com/lvgl/lvgl v8.3.11

v8.3 release notes: https://docs.lvgl.io/8.3/CHANGELOG.html
3 months ago
alex 752e2c61ad Squashed 'lib/lvgl/' changes from 9024b72b4..74d0a816a
74d0a816a release v8.3.11
8194d8322 chore(cmsis-pack): prepare for v8.3.11 (#4936)
1840decb4 fix(qrcode): use LV_ASSERT instead of assert
ef76206c7 fix(disp): fix infinite recursive SCREEN_LOADED events
4fdc4c20b fix(obj): readjust scroll after layout when child removed (#4921)
85776aeec fix(rt-thread): fix create lvgl thread problem (#4862)
d20bd1ca3 fix(keyboard): add '&' character
c16bfdc22 fix(obj): fix arduino compile warnings (#4807)
3b6f98a93 fix(table):fix issue with abnormal string output of 'lv_table_set_cell_value_fmt' (#4804)
6c86969ee fix(table) user data API functions renamed (#4769)
fdfff5c0b feat(table): add user_data to table cells (#4767)
2791d5739 feat(tiny_ttf): backport Tiny TTF to lvgl 8 (#4727)
68d380eb9 fix(ime_pinyin): keep cursor in the textarea when a candidate is pressed (#4731)
20b6199ba fix(arc): fix setting value by click
7efcea6d0 chore(cmake): add support for user-specified lv_conf.h path (#4689)
7f894cf75 fix(draw_needles): changed needle line draw start point from scale ce… (#4682)
fa40b0519 feat(littlefs): add lv_fs_littlefs system as a driver (#4677)
17c580fad fix(arc): handle click outside background angle range (#4586) (#4667)
454e45429 fix(meter):  fix minor issues (#4657)
9fbac7570 docs: fix typo
1e381f11b STM32U5 DMA2D support (8.3) (#4643)
d22cda3cd fix: fix warning in lv_draw_sw_letter.c
869cc6300 backport: fix(lv_disp): fix lv_scr_load_anim being called twice quickly (#4629)
73fa50afa docs(obj): fix wording (#4625)
7a8fcbfd3 fix(draw): fix scaling rectangle parts with opa
7568df77d chore: fix compile error
9a673e447 chore(lv_draw_sw_letter.c): Fix print format (#4615)
3b2d75be0 fix(draw): fix compiler error in lv_draw_sw_transform.c #2 (#4612)
87ff746e2 docs(label): update text for recoloring (#4606)
14e21d27f fix(dropdown): avoid partial match in lv_dropdown_get_option_index (#4598)
ff4f3f976 fix(dropdown): reset char_i = 0, avoid access overflow (#4589)
a7a9d278c fix(btnmatrix): set LV_BTNMATRIX_BTN_NONE when clicking of disabled button (#4571) (#4578)
06e229cc7 release v8.3.10
9e388055e chore(cmsis-pack): create cmsis-pack for v8.3.10 (#4572)
eb87767cc chore: code formatting
01cd1fed9 fix(vglite): be sure end_angle > start_angle in arc drawing
28094404a fix(refr): fix single buffered direct mode
e2b19eb4a fix: build on Windows (MinGW environment) (#4538)
bff1f2297 fix(docs): dropdown: fix function name in description of static options (#4535)
9787d47d0 fix: do not copy invalid areas if not double buffered mode (#4526)
6548ea0f2 feat(style): backport opa_layered
1375ea85a Update screen object opacity function documentation (#4505)
a29645659 docs(calendar): update according to v8.2 changes
336f24127 feat(disp): add double buffered direct-mode efficient sync algorithm (v8.3) (#4497)
1c5df6c66 demo(sress): fix issues when the stress test is opened/clsoed multiple times
7d314aab6 fix(sdl): add missing parameter in lv_draw_sdl_composite_texture_obtain (#4490)
fd21ed0eb ci: update screenshot compare from v9 to automatically create missing reference images
5fc488a08 ci(dropdown): fix test
f17458924 fix(dropdown): position to the selected item in lv_dropdown_set_selected
bcebafe4f docs(simulator): remove SDL support from the Visual Studio project
8063fac79 fix(btnmatrix): fix tapping just outside a button in a buttonmatrix
9ec3b8706 docs: update changelog
bdf5bfb88 chore(cmsis-pack): prepare for release v8.3.9 (#4424)
4f102d7b6 fix: use const lv_img_dsc_t * dsc function parameter in lv_img_buf.h/
810852b41 docs(disp): metined that rotation rotates the touch coordinates too
21e95bc1b fix(decoder): fix LV_IMG_CF_ALPHA_8BIT bin file decoder (#4406)
dbcf56288 fix(config): fix typo in LV_USE_PERF_MONITOR and LV_USE_MEM_MONITOR (#4403)
eee2dd186 fix(attr): refactor LV_ATTRIBUTE_* for function attributes (#4404)
141f4b8ab fix(font): fix optimizer issue in  lv_font_fmt_txt.c (#4385)
f9ffcc9d8 fix(chart): fix lv_chart_get_point_pos_by_id
385d999a4 fix(imgbtn): support LV_OBJ_FLAG_CHECKABLE
29ed7c571 fix(btnmatrix): Fix typo in previous commit!
65f1c9305 fix(btnmatrix): Hide button matrix when all buttons hidden
b1bbb95ce chore: format code
223dc1cf9 fix(tabview): fix warning
416b26771 chore(music demo) fix formatting
645006e35 fix(indev): fix warnings when loggin coordinates is enabled
375b3b5d3 fix(obj) prevent hidden objects keeping focus
1c5d4b02d Merge branch 'demo-close' into release/v8.3
e6d7be00b docs: update changelog
15433d69b chore(cmsis-pack): update cmsis-pack for v8.3.8 (#4340)
91038a99e demos: add lv_demo_..._close() functions for each demo
9491c3ff6 example(tabview): fix tabview disable scrollig example
3de61c76a fix(tabview): remove the animation if the tab is selected by clicking the button on the header
09cc0de57 docs: mention incompatibility between software rotation and `direct_mode` or `full_refresh` (#4308)
227ac0234 docs(faq): don't say 24 bit is support as LVGL can't render in RGB888 directly
8b83fe7ea feat(rt-thread): make the rt-thread env recursively glob the UI files
edd5ad28a fix(btnmatrix): fix array out of bounds addressing with groups and no buttons
07bce7466 fix:(BtnMatrix) Backport https://github.com/lvgl/lvgl/pull/4185
1713cd3fd Revert "fix:(BtnMatrix) Backport https://github.com/lvgl/lvgl/pull/4185"
cb602ea77 fix:(BtnMatrix) Backport https://github.com/lvgl/lvgl/pull/4185
caf29ef0c add(docs): add renesas-ra6m3 get-started document (#4278)
a3199514a fix(stm32): static function prototypes moved from .h to .c (#4276)
78cbdfc15 add(gpu): add renesas-ra6m3 gpu adaptation (#4270)
75e6ef4e1 fix(btnmatrix): fix using > 7 as button width
2376c5786 fix(png): fix decode image size and some warnings (#4248)
e3659c46b fix(arduino): fix messed up variable types
df96b57f4 fix(bidi): add more Hebrew checks to RTL characters set (#4171) (#4239)
67b3011f8 fix(chart): fix division by zero if there are no ticks
d87737612 perf(pxp, vglite): improve performance and add more features (#4222)
6a89bd2d7 fix(msgbox): fix typo
6843c191b fix(msgbox): add missing lv_obj_class_init_obj
1caafc55d fix(disp): fix memory leak lv_scr_load_anim with auto_del and time=0
5ba90a5c4 fix(flex): register LV_STYLE_FLEX_GROW
630da9c6c fix(img): fix getting the image type on big endian systems (#4215)
ee95e7dc2 fix(sdl): destroy texture after use if not stored in cache (#4173)
45b13c378 fix(draw): typo with LV_COLOR_DEPTH 8
2b56e0420 chore(cmsis-pack): update cmsis-pack for v8.3.7 (#4203)
177900b03 docs(changelog): update changelog for v8.3.7
203e7fc97 fix (spinbox):  doubling characters entered from the keyboard (#4190)
7345e6235 fix(arm-2d): fix transform-chrome-keying issue (#4178)
48d7878ba fix(style): fix trasition on bg_grad color fixes: #4174
a0795b49e fix(indev): fix integer overflow in recursive zoom calculation
a150b15e4 feat(btnmatrix): review ctrl map and allow width values to be max 15
a95714ba7 fix(menu): prevent setting the current page again (#4136)
8536152d8 fix(esp): fix ESP-IDF pedantic builds (backport v8.3) (#4135)
631444183 fix: color mixing with LV_COLOR_SWAP == 1 (#4101)
88c51b22a docs: udpate changelog
6b0092c0d chore(cmsis-pack): update cmsis-pack for v8.3.6 (#4108)
aa313806d fix(bar): delete running animations when a new value is set without animation
5e0e1c8c4 chore: code formatting
d0e19eb2d fix(arc): fix knob area invalidation
fd20fabfd fix(group): fix default_group becomes wild pointer when deleted (#4076)
399069b4a Update build_html_examples.sh
501230e0f docs: use a fixed commit of lv_web_emscripten
adcf16638 fix(fs_posix): allow creating new file and set permission. (#3976)
2f294aa76 docs(arduino): add note to not use lv_examles library
9a870b34a format code
0b7777f27 fix(slider): consider animations on pressing
e8d8f399e fix(img): support negative angles (#3846)
0df09db23 fix(gif): synchronize with master (#4003)
e2386fd46 fix(gpu): fix STM GPU drivers for some variants (#4004)
2944277f0 fix(img): possible divide by 0 exception (lvgl#3988) (#3990)
6af01798d feat(msg): add lv_msg_unsubcribe_obj
77670fb1a chore: update the version numbers to v8.3.5-dev
f29514aa5 docs: update changelog
e7e8cf846 feat(cmsis-pack): update cmsis-pack for v8.3.5 (#3972)
8b1270347 fix(monkey): remove executable permissions from source files (#3971)
e6cd7063b fix(ci): set Ubuntu version for MicroPython test (#3865)
34c545ef1 docs(indev): fix the name of long_press_repeat_time (was long_press_rep_time)
361ee7961 feat(gpu): improve NXP's PXP and VGLite accelerators (#3952)
39f424767 fix(roller): consider the recolor setting of the label
1853cc514 perf(dam2d): rework stm32 dma2d  (#3904)
9faca8a8d Update layer.md
8ea6f03fc fix(Kconfig): Fix wrong type of LV_FS_STDIO_CACHE_SIZE (v8.3) (#3906)
c6c1b0b3d chore: add an option to "LV_TICK_CUSTOM" (#3879)
e529230f4 ci(esp): fix push to the component registry on tag
dbb15bb3e feat(cmsis-pack): update for v8.3.4 (#3896)
47c8f8f98 bump version numbers to v8.3.5-dev
2c0162b45 release v8.3.4
dec580b9f fix(rt-thread): sync rt-thread v5.0.0 rt_align (#3864)
ad56dfaf7 fix(gridnav): fix stucking in pressed state with encoder
c8e584f87 fix(style): add the missing support for pct pivot in tranasform style properties
d2d886aae fix(draw): SDL2 gradient support  #3848 (#3856)
1e3ca25fe fix(example): fix warnings
84cf05d8b fix(indev): fix scrolling on transformed obejcts
2c17b28ac fix(darw): add back the disappeared antialising=0 support
1ed026ca7 fix(benchmark): fix warnings
ae3825871 demo(benchmark): fix lv_label_set_text_fmt format strings
ae300acb2 [v8.3.x][rt-thread][squareline] fix compiler cannot find the lvgl/lvg… (#3834)
41fa41613 fix(msg): fix typos in API by adding wrappers fixes #3822
68f6190f8 chore: format code
1173dcba9 demo(benchmark): fix warning
716e5e2c8 fix(meter): fix setting part_draw_dsc.id in needle img drawing
bb2c2ac34 fix(chart): fix very dense bar charts
c4c400716 fix(flex): be sure obj->w_layout and h_layout can't be set at the same time
6825d4bd1 chore(table): remove extra spaces (#3805)
39d03a80f feat(table): scroll to the selected cell with key navigation
340a1cb60 fix(esp.cmake): add demos and examples (#3784)
e06f03db7 fix(draw): fix transformation accuracy
bd11ad854 fix(draw): handle LV_COLOR_DEPTH == 1 too in lv_draw_sw_transform
e050f5ca1 fix(draw): fix text color with sub pixel rendering and BGR order
903e94b71 fix(style): remove the reduntant define of LV_GRADIENT_MAX_STOPS
0732400e7 Revert "feat(keyboard): ported arabic keyboard from release 7.10.0 (#3728)"
483b2a432 feat(keyboard): ported arabic keyboard from release 7.10.0 (#3728)
5545ffc92 release v8.3.3
c8bee4041 fix: version number in lvgl.h
755d363ec release v8.3.2
dfd14fa77 fix(slider): find the nearest value on click instead of floor
1ab9aa531 fix(fragment): fixed child fragment event dispatch (#3683)
4d69cd865 fix(sdl): clear streaming/target texture with FillRect (#3682)
832bef434 fix(sdl): transformation with alpha (#3576) (#3678)
d5b2a9b25 fix(draw): fix border drawing with thick borders
764095021 chore: fix warnings
8b605cc48 fix(refr): fix true double double buffering logic with transparent screens
ece349500 fix(draw): allow drawing outline with LV_DRAW_COMPLEX == 0 too
f6655c2aa fix(draw_sw): fix image cache to access the freed stack space (#3584)
cba2aa95c fix(style): use compile time prop_cnt for const styles (#3609)
660464c97 chore(rt-thread) backport fixes from v9 (#3604)
5156ee058 fix(group): be sure obj is removed from its current group in lv_group_add_obj
a0515ba30 fix(style): add missing invalidation in lv_obj_remove_local_style_prop
1a4603091 docs(draw) remove reference to old lv_fs_add_drv function (#3564)
f58dcd94f docs(disp): LV_COLOR_SCREEN_TRANSP remove dependency on LV_COLOR_DEPTH_32 as transparency is supported across all color depths (#3556)
d59bba12d fix(colorwheel): fix updating color when using lv_colorwheel_set_hsv
5022476ed remove accidentally added code
b884abae2 fix(canvas): fix clipéping on transformation
aa45d5985 fix(demo): can not found lvgl.h file (#3477)
55e95ed35 fix(ci) checkout lv_micropython release/v8 branch (#3524)
be485d760 ci: protect test.c with #if LV_BUILD_TEST

git-subtree-dir: lib/lvgl
git-subtree-split: 74d0a816a440eea53e030c4f1af842a94f7ce3d3
3 months ago
alex 0a74bf2c3a
nd/conf: add lnd config (de)serializer and use it conf gen
ci/woodpecker/push/woodpecker Pipeline was successful Details
the change is based on the previously added ini parser.
this makes lnd config gen more robust and allows to presist config
modifications in the future, such as changing node alias.
4 months ago
alex 55531668eb
lib: add simple ini file format parser library
will be used to parse lnd and bitcoind config files.

    git subtree add --prefix=lib/ini --squash \
      https://github.com/ziglibs/ini \
      2b11e8fef86d0eefb225156e695be1c1d5c35cbc
6 months ago
alex 15a2b6d823 Squashed 'lib/ini/' content from commit 2b11e8fe
git-subtree-dir: lib/ini
git-subtree-split: 2b11e8fef86d0eefb225156e695be1c1d5c35cbc
6 months ago
alex b57ebacd4a
nd,ngui: add lightning setup process, phone pairing and reset
ci/woodpecker/pr/woodpecker Pipeline failed Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/tag/woodpecker Pipeline was successful Details
the daemon can now identify which state lnd is in and report to the GUI
which displays different elements on the lighting tab, based on the
reported lnd state:

- startup in progress: displays spinner
- no lightning wallet: displays a "setup" button and guides the user
  through a simple workflow
- reset an operational node

this means, the UI has now minimal but functional elements for any user
equipped with a smart phone to set up the lightning node without SSHing
in or using command line in general.
7 months ago
alex 9f9e4aa171
nd: ignore RpcInWarmup bitcoind RPC error
ci/woodpecker/push/woodpecker Pipeline was successful Details
the daemon now pretends the report is sent over to ngui on such errors.
this is a stop-gap to avoid writing errors on tty. see linked issue.

part of #30
8 months ago
alex e618fee65c
comm: rename bitcoin report to onchain
ci/woodpecker/push/woodpecker Pipeline was successful Details
the "bitcoin" name is overloaded: everything's about bitcoin here.
a less confusing name is onchain to emphasize the difference w.r.t.
lightning or any other future L2 networks.
8 months ago
alex 29f6975601
nd,ngui: remove memleaks and deadlocks mostly from v0.4.0
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/tag/woodpecker Pipeline was successful Details
the offending memleak printed out at program exit was introduced in
116fb3b5, specifically line 140 in src/bitcoindrpc.zig using incorrect
allocator.

while there, improved a bit overall memory handling by making sure
heap-alloc'ed messages are always deinit'ed.

another source of trouble was logging from within a sighandler: the
logger uses a thread mutex which may deadlock when the handler is
invoked by the OS.
8 months ago
alex 280bea40df
nd/conf: link to sysupdates repo in doc comments
it is important the constants in Config.zig match those in sysupdates.
somehow should've made it into 664c75a9 but never did.
8 months ago
alex c82848d186
nd,ngui: let users switch sysupdates channel from the UI
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/tag/woodpecker Pipeline was successful Details
at the moment, there are two channels: edge and stable.

this builds up on few previous commits, most notably the persistent
configuration storage.
8 months ago
alex 1d8d67a987
ui/lvgl: add a dropdown widget 8 months ago
alex e8838b3eaf
ui/lvgl: add an optional spinner to card widget
some cards will need to show a nondeterministic progress.
the spinner in the top right corner does exactly that, controlled
via the new spin function.

the default is no spinner.
8 months ago
alex 094f6406e3
ui/lvgl: add a couple convenience methods for next commits
small things like show/hide and enable/disable. also, the text of the
button can now be set directly using its label field.
8 months ago
alex 664c75a9c9
nd: add a persistent configuration support
the config will be used by the daemon to store user choices across
reboots.

closes #6
8 months ago
alex aca7eb1165
comm: introduce a simpler way to read/write
this builds on top of the main read and write fn, setting up a global
structure to allow module users imply comm.pipeWrite(msg)
and comm.pipeRead() without providing an allocator or reader/writer
on each call.

the advantage is simplification in the gui functions because they don't
have access to an allocator or the nd process read/write pipe.

disadvantage is in testing because it requires a global,
"before all tests" setup.

at the moment, only ngui is modified to use the new pipeRead/Write. the
daemon would suffer too many changes, especially in tests, due to the
global state.
8 months ago
alex a18a2a5435
lndhttp: remove nonexistent field from pending chan list
funding_expiry_blocks is present in lightning.proto but a REST API call
shows no such field, at least in lnd v0.16.4, leading to json parsing error.

the field is unused at the moment anyway.
8 months ago
alex 116fb3b59c
nd,ngui: display on-chain balance in bitcoin tab
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/tag/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
a previous commit added some lightning tab implementation which
including balance details but only for lightning channels.

this commit queries lnd for a wallet balance and displays it on the
bitcoin tab since "wallet" funds are on-chain and it doesn't feel like
it belongs to the lightning tab in the UI.

while there, also improved some daemon backend code style, alightning
with the lightning implementation structures.
9 months ago
alex 05c89bbd1c
ui: visualize lnd lightning report on the tab panel
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
similarly to 0260d477, the lightning tab has now some basic info
including channels list.

the gui playground is updated to send some stub data via comms
periodically.
9 months ago
alex 52a8c1fb1a
nd: add lnd lightning report sent to UI every min
similarly to 2642a554, this adds an lnd HTTP client able to make some
queries like getinfo. the daemon then uses the client to compose a
lightning status report and sends it over to ngui through comms,
periodically.

there's also a client playground built on demand with
"zig build lndhc".
9 months ago
alex 328df67c5d
zig: upgrade from 0.10.x to 0.11.0
ci/woodpecker/push/woodpecker Pipeline was successful Details
while there's lots of changes and new features in zig v0.11.0, the most
important for this project at the moment is the HTTP client.
the client is most likely what will connect to lnd lightning node to
fetch stats and info for the UI to then visualize it on "lightning" tab,
similar to the bitcoind RPC client.

see all zig 0.11 release notes here:
https://ziglang.org/download/0.11.0/release-notes.html
10 months ago
alex e84489c345
ui: keep last comm reports to update on wakeup
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/tag/woodpecker Pipeline was successful Details
a previous commit a06a4757 stopped updating the UI while in standby
mode. unfortunately, this makes the UI data become stale on wakeup.
for example, bitcoin chain height and its timestamp.

this commit keeps the last report received from daemon comm during
standby and uses it to update the UI immediately on wakeup.
10 months ago
alex a06a4757b2
ngui: clarify and handle concurrency during screen sleep/standby
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/tag/woodpecker Pipeline was successful Details
the screen.sleep fn was actually called in concurrent-unsafe mode,
i.e without acquiring UI mutex. in conjuction with commThreadLoopCycle
this would have eventually led to LVGL primitives concurrent access.

so, screen.sleep now takes UI mutex to hold during LVGL calls.
a bit ugly but certainly better than relying on luck.
10 months ago
alex 0260d47747
ui: visualize bitcoind status report on the tab panel
the bitcoin tab has now some basic status and stats: parts of blockchain
info, network info and mempool. this is far from complete but makes a
good start for an initial version.

the gui playground is also updated to sent some stub info via comms
periodically.
10 months ago
alex 2642a55477
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".
10 months ago
alex c1a809c567
ui/lvgl: fix a bug where a top container didn't have its object created
ci/woodpecker/push/woodpecker Pipeline was successful Details
a previous commit 7d1ab5cb rewrote toplayer objects creation as
Container.newTop except the new code was using the top layer object
obtained from lv_disp_get_layer_top as is. this obviously led to all
sorts of UB and illegal memory access when screen.sleep'ing.
10 months ago
alex 7d1ab5cb78
ui/lvgl: improve UI element types in zig
ci/woodpecker/push/woodpecker Pipeline was successful Details
this commit improves on the LVGL API wrapping interface in zig by
defining different types where each is associated with either a
particular lv_xxx_t object in C or a logically different UI element.

this makes programming much more pleasant, allows compartmentalizing
different UI concepts and elements, and reduces chances of making a
thanks to stricter type enforcement.

no visual changes in the UI.
10 months ago
alex 746b179478
ui: force alignment of modal callback function
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/tag/woodpecker Pipeline was successful Details
fullscreen modal dialog was added in 4297c139. the callback function to
that modal *must* be aligned according to the target architecture.
failing to do so may result in "incorrect alignment" panic.

this somehow worked in 4297c139 but sometimes panic. i suspect this may
be due to PIE-enabled build, possibly in conjuction with some zig v0.10
compiler bugs.

ref #20
ref #5
10 months ago
alex 63eb27bf18
nd,ngui: make program termination reliable on SIGTERM
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
most troubles were due to blocking nature of child process pipe
descriptions which made comm.read loops hang in various places
under certain conditions.

this commit moves all read/writes in separate threads to be able to
always watch for sig TERM and INT, and ensures child process pipes
are closed early allowing comm.read loops to terminate.
10 months 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.
10 months 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.
10 months 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.
10 months ago
alex ec5e15e8e9
build-time semantic versioning support
ci/woodpecker/push/woodpecker Pipeline was successful Details
11 months ago
alex 517f9d4056
ui: display ngui semver on a new info panel tab
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline was successful Details
this adds the 4th tab, an info-icon button, and shows the value of
the release version recorded at build time - a feature added in a
previous commit.
11 months 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.
11 months ago
alex 53812cbd37
build: make release builds for aarch64 reproducible
ci/woodpecker/push/woodpecker Pipeline was successful Details
part of #2
11 months 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.
11 months ago