Skip to content

Commit da0a3c5

Browse files
committed
fix deps
1 parent 1f9aeff commit da0a3c5

File tree

3,558 files changed

+108
-1140598
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,558 files changed

+108
-1140598
lines changed

.devcontainer/devcontainer.json

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,38 @@
11
{
22
"name": "JetKVM",
3-
"image": "mcr.microsoft.com/devcontainers/go:1-1.24-bookworm",
3+
"image": "mcr.microsoft.com/devcontainers/go:1.25-trixie",
44
"features": {
55
"ghcr.io/devcontainers/features/node:1": {
66
// Should match what is defined in ui/package.json
7-
"version": "22.15.0"
7+
"version": "22.19.0"
88
}
99
},
1010
"mounts": [
11-
"source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached"
11+
"source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached"
1212
],
13+
"onCreateCommand": ".devcontainer/install-deps.sh",
1314
"customizations": {
1415
"vscode": {
1516
"extensions": [
16-
"bradlc.vscode-tailwindcss",
17+
// coding styles
18+
"chrislajoie.vscode-modelines",
19+
"editorconfig.editorconfig",
20+
// GitHub
1721
"GitHub.vscode-pull-request-github",
18-
"dbaeumer.vscode-eslint",
22+
"github.vscode-github-actions",
23+
// Golang
1924
"golang.go",
25+
// C / C++
26+
"ms-vscode.cpptools",
27+
"ms-vscode.cpptools-extension-pack",
28+
// CMake / Makefile
2029
"ms-vscode.makefile-tools",
30+
"ms-vscode.cmake-tools",
31+
// Frontend
2132
"esbenp.prettier-vscode",
22-
"github.vscode-github-actions"
33+
"dbaeumer.vscode-eslint",
34+
"bradlc.vscode-tailwindcss"
2335
]
2436
}
2537
}
26-
}
27-
38+
}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ static/*
33
.idea
44
.DS_Store
55

6-
device-tests.tar.gz
6+
device-tests.tar.gz
7+
node_modules

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ GO_ARGS := GOOS=linux GOARCH=arm GOARM=7 ARCHFLAGS="-arch arm"
2626
ifneq ($(wildcard $(BUILDKIT_PATH)),)
2727
GO_ARGS := $(GO_ARGS) \
2828
CGO_CFLAGS="-I$(BUILDKIT_PATH)/$(BUILDKIT_FLAVOR)/include -I$(BUILDKIT_PATH)/$(BUILDKIT_FLAVOR)/sysroot/usr/include" \
29-
CGO_LDFLAGS="-L$(BUILDKIT_PATH)/$(BUILDKIT_FLAVOR)/lib -L$(BUILDKIT_PATH)/$(BUILDKIT_FLAVOR)/sysroot/usr/lib -lrockit -lrockchip_mpp -lrga -lpthread -lm -lgpiod" \
29+
CGO_LDFLAGS="-L$(BUILDKIT_PATH)/$(BUILDKIT_FLAVOR)/lib -L$(BUILDKIT_PATH)/$(BUILDKIT_FLAVOR)/sysroot/usr/lib -lrockit -lrockchip_mpp -lrga -lpthread -lm" \
3030
CC="$(BUILDKIT_PATH)/bin/$(BUILDKIT_FLAVOR)-gcc" \
3131
LD="$(BUILDKIT_PATH)/bin/$(BUILDKIT_FLAVOR)-ld" \
3232
CGO_ENABLED=1

display.go

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,9 @@ import (
1313
"github.com/prometheus/common/version"
1414
)
1515

16-
var currentScreen = "boot_screen"
17-
var backlightState = 0 // 0 - NORMAL, 1 - DIMMED, 2 - OFF
18-
1916
var (
20-
currentScreen = "ui_Boot_Screen"
21-
displayedTexts = make(map[string]string)
22-
screenStateLock = sync.Mutex{}
17+
currentScreen = "boot_screen"
18+
backlightState = 0 // 0 - NORMAL, 1 - DIMMED, 2 - OFF
2319
)
2420

2521
var (
@@ -32,14 +28,6 @@ const (
3228
backlightControlClass string = "/sys/class/backlight/backlight/brightness"
3329
)
3430

35-
func clearDisplayState() {
36-
screenStateLock.Lock()
37-
defer screenStateLock.Unlock()
38-
39-
displayedTexts = make(map[string]string)
40-
currentScreen = "ui_Boot_Screen"
41-
}
42-
4331
func updateDisplay() {
4432
nativeInstance.UpdateLabelIfChanged("home_info_ipv4_addr", networkState.IPv4String())
4533
nativeInstance.UpdateLabelAndChangeVisibility("home_info_ipv6_addr", networkState.IPv6String())
@@ -51,21 +39,17 @@ func updateDisplay() {
5139

5240
if usbState == "configured" {
5341
nativeInstance.UpdateLabelIfChanged("usb_status_label", "Connected")
54-
_, _ = nativeInstance.UIObjAddState("usb_status", "LV_STATE_DEFAULT")
55-
_, _ = nativeInstance.UIObjRemoveState("usb_status", "LV_STATE_DISABLED")
42+
_, _ = nativeInstance.UIObjSetState("usb_status", "LV_STATE_DEFAULT")
5643
} else {
5744
nativeInstance.UpdateLabelIfChanged("usb_status_label", "Disconnected")
58-
_, _ = nativeInstance.UIObjAddState("usb_status", "LV_STATE_DISABLED")
59-
_, _ = nativeInstance.UIObjRemoveState("usb_status", "LV_STATE_DEFAULT")
45+
_, _ = nativeInstance.UIObjSetState("usb_status", "LV_STATE_DISABLED")
6046
}
6147
if lastVideoState.Ready {
6248
nativeInstance.UpdateLabelIfChanged("hdmi_status_label", "Connected")
63-
_, _ = nativeInstance.UIObjAddState("hdmi_status", "LV_STATE_DEFAULT")
64-
_, _ = nativeInstance.UIObjRemoveState("hdmi_status", "LV_STATE_DISABLED")
49+
_, _ = nativeInstance.UIObjSetState("hdmi_status", "LV_STATE_DEFAULT")
6550
} else {
6651
nativeInstance.UpdateLabelIfChanged("hdmi_status_label", "Disconnected")
67-
_, _ = nativeInstance.UIObjAddState("hdmi_status", "LV_STATE_DISABLED")
68-
_, _ = nativeInstance.UIObjRemoveState("hdmi_status", "LV_STATE_DEFAULT")
52+
_, _ = nativeInstance.UIObjSetState("hdmi_status", "LV_STATE_DISABLED")
6953
}
7054
nativeInstance.UpdateLabelIfChanged("cloud_status_label", fmt.Sprintf("%d active", actionSessions))
7155

@@ -111,15 +95,15 @@ func doCloudBlink(ctx context.Context) {
11195
continue
11296
}
11397

114-
_, _ = lvObjFadeOut("ui_Home_Header_Cloud_Status_Icon", uint32(cloudBlinkDuration.Milliseconds()))
98+
_, _ = nativeInstance.UIObjFadeOut("ui_Home_Header_Cloud_Status_Icon", uint32(cloudBlinkDuration.Milliseconds()))
11599

116100
select {
117101
case <-ctx.Done():
118102
return
119103
case <-time.After(cloudBlinkDuration):
120104
}
121105

122-
_, _ = lvObjFadeIn("ui_Home_Header_Cloud_Status_Icon", uint32(cloudBlinkDuration.Milliseconds()))
106+
_, _ = nativeInstance.UIObjFadeIn("ui_Home_Header_Cloud_Status_Icon", uint32(cloudBlinkDuration.Milliseconds()))
123107

124108
select {
125109
case <-ctx.Done():

go.mod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ require (
1212
github.com/gin-contrib/logger v1.2.6
1313
github.com/gin-gonic/gin v1.10.1
1414
github.com/go-co-op/gocron/v2 v2.16.5
15-
github.com/google/flatbuffers v25.2.10+incompatible
15+
github.com/google/gopacket v1.1.19
1616
github.com/google/uuid v1.6.0
1717
github.com/guregu/null/v6 v6.0.0
1818
github.com/gwatts/rootcerts v0.0.0-20250901182336-dc5ae18bd79f
19+
github.com/jellydator/ttlcache/v3 v3.4.0
1920
github.com/pion/logging v0.2.4
2021
github.com/pion/mdns/v2 v2.0.7
2122
github.com/pion/webrtc/v4 v4.1.4
@@ -28,6 +29,7 @@ require (
2829
github.com/rs/zerolog v1.34.0
2930
github.com/sourcegraph/tf-dag v0.2.2-0.20250131204052-3e8ff1477b4f
3031
github.com/stretchr/testify v1.11.1
32+
github.com/vearutop/statigz v1.5.0
3133
github.com/vishvananda/netlink v1.3.1
3234
go.bug.st/serial v1.6.4
3335
golang.org/x/crypto v0.41.0
@@ -83,11 +85,11 @@ require (
8385
github.com/rogpeppe/go-internal v1.14.1 // indirect
8486
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
8587
github.com/ugorji/go/codec v1.3.0 // indirect
86-
github.com/vearutop/statigz v1.5.0 // indirect
8788
github.com/vishvananda/netns v0.0.5 // indirect
8889
github.com/wlynxg/anet v0.0.5 // indirect
8990
golang.org/x/arch v0.18.0 // indirect
9091
golang.org/x/oauth2 v0.30.0 // indirect
92+
golang.org/x/sync v0.16.0 // indirect
9193
golang.org/x/text v0.28.0 // indirect
9294
google.golang.org/protobuf v1.36.8 // indirect
9395
gopkg.in/yaml.v2 v2.4.0 // indirect

go.sum

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
22
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
3+
github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA=
4+
github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
35
github.com/beevik/ntp v1.4.3 h1:PlbTvE5NNy4QHmA4Mg57n7mcFTmr1W1j3gcK7L1lqho=
46
github.com/beevik/ntp v1.4.3/go.mod h1:Unr8Zg+2dRn7d8bHFuehIMSvvUYssHMxW3Q5Nx4RW5Q=
57
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
68
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
9+
github.com/bool64/dev v0.2.39 h1:kP8DnMGlWXhGYJEZE/J0l/gVBdbuhoPGL+MJG4QbofE=
10+
github.com/bool64/dev v0.2.39/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg=
711
github.com/bytedance/sonic v1.13.3 h1:MS8gmaH16Gtirygw7jV91pDCN33NyMrPbN7qiYhEsF0=
812
github.com/bytedance/sonic v1.13.3/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4=
913
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
@@ -23,8 +27,8 @@ github.com/coreos/go-oidc/v3 v3.15.0/go.mod h1:HaZ3szPaZ0e4r6ebqvsLWlk2Tn+aejfmr
2327
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
2428
github.com/creack/goselect v0.1.2 h1:2DNy14+JPjRBgPzAd1thbQp4BSIihxcBf0IXhQXDRa0=
2529
github.com/creack/goselect v0.1.2/go.mod h1:a/NhLweNvqIYMuxcMOuWY516Cimucms3DglDzQP3hKY=
26-
github.com/creack/pty v1.1.23 h1:4M6+isWdcStXEf15G/RbrMPOQj1dZ7HPZCGwE4kOeP0=
27-
github.com/creack/pty v1.1.23/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
30+
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
31+
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
2832
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
2933
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
3034
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -53,8 +57,6 @@ github.com/go-playground/validator/v10 v10.26.0/go.mod h1:I5QpIEbmr8On7W0TktmJAu
5357
github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
5458
github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
5559
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
56-
github.com/google/flatbuffers v25.2.10+incompatible h1:F3vclr7C3HpB1k9mxCGRMXq6FdUalZ6H/pNX4FP1v0Q=
57-
github.com/google/flatbuffers v25.2.10+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
5860
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
5961
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
6062
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
@@ -68,6 +70,8 @@ github.com/guregu/null/v6 v6.0.0 h1:N14VRS+4di81i1PXRiprbQJ9EM9gqBa0+KVMeS/QSjQ=
6870
github.com/guregu/null/v6 v6.0.0/go.mod h1:hrMIhIfrOZeLPZhROSn149tpw2gHkidAqxoXNyeX3iQ=
6971
github.com/gwatts/rootcerts v0.0.0-20250901182336-dc5ae18bd79f h1:08t2PbrkDgW2+mwCQ3jhKUBrCM9Bc9SeH5j2Dst3B+0=
7072
github.com/gwatts/rootcerts v0.0.0-20250901182336-dc5ae18bd79f/go.mod h1:5Kt9XkWvkGi2OHOq0QsGxebHmhCcqJ8KCbNg/a6+n+g=
73+
github.com/jellydator/ttlcache/v3 v3.4.0 h1:YS4P125qQS0tNhtL6aeYkheEaB/m8HCqdMMP4mnWdTY=
74+
github.com/jellydator/ttlcache/v3 v3.4.0/go.mod h1:Hw9EgjymziQD3yGsQdf1FqFdpp7YjFMd4Srg5EJlgD4=
7175
github.com/jonboulle/clockwork v0.5.0 h1:Hyh9A8u51kptdkR+cqRpT1EebBwTn1oK9YfGYbdFz6I=
7276
github.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60=
7377
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
@@ -115,8 +119,8 @@ github.com/pion/ice/v4 v4.0.10 h1:P59w1iauC/wPk9PdY8Vjl4fOFL5B+USq1+xbDcN6gT4=
115119
github.com/pion/ice/v4 v4.0.10/go.mod h1:y3M18aPhIxLlcO/4dn9X8LzLLSma84cx6emMSu14FGw=
116120
github.com/pion/interceptor v0.1.40 h1:e0BjnPcGpr2CFQgKhrQisBU7V3GXK6wrfYrGYaU6Jq4=
117121
github.com/pion/interceptor v0.1.40/go.mod h1:Z6kqH7M/FYirg3frjGJ21VLSRJGBXB/KqaTIrdqnOic=
118-
github.com/pion/logging v0.2.3 h1:gHuf0zpoh1GW67Nr6Gj4cv5Z9ZscU7g/EaoC/Ke/igI=
119-
github.com/pion/logging v0.2.3/go.mod h1:z8YfknkquMe1csOrxK5kc+5/ZPAzMxbKLX5aXpbpC90=
122+
github.com/pion/logging v0.2.4 h1:tTew+7cmQ+Mc1pTBLKH2puKsOvhm32dROumOZ655zB8=
123+
github.com/pion/logging v0.2.4/go.mod h1:DffhXTKYdNZU+KtJ5pyQDjvOAh/GsNSyv1lbkFbe3so=
120124
github.com/pion/mdns/v2 v2.0.7 h1:c9kM8ewCgjslaAmicYMFQIde2H9/lrZpjBkN8VwoVtM=
121125
github.com/pion/mdns/v2 v2.0.7/go.mod h1:vAdSYNAT0Jy3Ru0zl2YiW3Rm/fJCwIeM0nToenfOJKA=
122126
github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
@@ -184,27 +188,43 @@ github.com/vishvananda/netns v0.0.5 h1:DfiHV+j8bA32MFM7bfEunvT8IAqQ/NzSJHtcmW5zd
184188
github.com/vishvananda/netns v0.0.5/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
185189
github.com/wlynxg/anet v0.0.5 h1:J3VJGi1gvo0JwZ/P1/Yc/8p63SoW98B5dHkYDmpgvvU=
186190
github.com/wlynxg/anet v0.0.5/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguHxoA=
187-
go.bug.st/serial v1.6.2 h1:kn9LRX3sdm+WxWKufMlIRndwGfPWsH1/9lCWXQCasq8=
188-
go.bug.st/serial v1.6.2/go.mod h1:UABfsluHAiaNI+La2iESysd9Vetq7VRdpxvjx7CmmOE=
191+
go.bug.st/serial v1.6.4 h1:7FmqNPgVp3pu2Jz5PoPtbZ9jJO5gnEnZIvnI1lzve8A=
192+
go.bug.st/serial v1.6.4/go.mod h1:nofMJxTeNVny/m6+KaafC6vJGj3miwQZ6vW4BZUGJPI=
189193
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
190194
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
191195
golang.org/x/arch v0.18.0 h1:WN9poc33zL4AzGxqf8VtpKUnGvMi8O9lhNyBMF/85qc=
192196
golang.org/x/arch v0.18.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk=
197+
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
198+
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
193199
golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4=
194200
golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc=
201+
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
202+
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
203+
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
204+
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
195205
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
196206
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
197207
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
198208
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
209+
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
210+
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
211+
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
212+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
213+
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
199214
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
200215
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
201216
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
202217
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
203218
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
204219
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
205220
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
221+
golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4=
222+
golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw=
223+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
206224
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
207225
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
226+
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
227+
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
208228
google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc=
209229
google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
210230
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

internal/native/cgo/ctrl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,10 @@ void jetkvm_ui_set_opacity(const char *obj_name, u_int8_t opacity) {
323323
lv_obj_set_style_opa(obj, opacity, LV_PART_MAIN);
324324
}
325325

326+
const char *jetkvm_ui_get_lvgl_version() {
327+
return lv_version_info();
328+
}
329+
326330
void jetkvm_video_start() {
327331
video_start_streaming();
328332
}

internal/native/cgo/ctrl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ void jetkvm_ui_set_opacity(const char *obj_name, u_int8_t opacity);
4343
int jetkvm_ui_add_flag(const char *obj_name, const char *flag_name);
4444
int jetkvm_ui_clear_flag(const char *obj_name, const char *flag_name);
4545

46+
const char *jetkvm_ui_get_lvgl_version();
47+
4648
const char *jetkvm_ui_event_code_to_name(int code);
4749

4850
int jetkvm_video_init();

internal/native/cgo_linux.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ func uiObjSetState(objName string, state string) (bool, error) {
164164
return true, nil
165165
}
166166

167+
func uiGetLVGLVersion() string {
168+
return C.GoString(C.jetkvm_ui_get_lvgl_version())
169+
}
170+
167171
// TODO: use Enum instead of string but it's not a hot path and performance is not a concern now
168172
func uiObjAddFlag(objName string, flag string) (bool, error) {
169173
objNameCStr := C.CString(objName)

internal/native/cgo_notlinux.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ func uiEventCodeToName(code int) string {
8888
return ""
8989
}
9090

91+
func uiGetLVGLVersion() string {
92+
panicPlatformNotSupported()
93+
return ""
94+
}
95+
9196
func videoGetStreamQualityFactor() (float64, error) {
9297
panicPlatformNotSupported()
9398
return 0, nil

0 commit comments

Comments
 (0)