Skip to content

Commit 358512f

Browse files
committed
cleanup
1 parent 70db172 commit 358512f

File tree

5 files changed

+5
-51
lines changed

5 files changed

+5
-51
lines changed

display.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ var (
2323
)
2424

2525
const (
26-
touchscreenDevice string = "/dev/input/event1"
2726
backlightControlClass string = "/sys/class/backlight/backlight/brightness"
2827
)
2928

internal/native/cgo/ctrl.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,6 @@ void jetkvm_ui_add_state(const char *obj_name, const char *state_name) {
282282
}
283283
lv_state_t state_val = str_to_lv_state(state_name);
284284
lv_obj_add_state(obj, state_val);
285-
286-
lv_obj_refresh_style(obj, LV_PART_ANY, LV_STYLE_PROP_ANY);
287285
}
288286

289287
void jetkvm_ui_clear_state(const char *obj_name, const char *state_name) {
@@ -293,9 +291,6 @@ void jetkvm_ui_clear_state(const char *obj_name, const char *state_name) {
293291
}
294292
lv_state_t state_val = str_to_lv_state(state_name);
295293
lv_obj_clear_state(obj, state_val);
296-
297-
log_info("cleared state %s from object %s: %d", state_name, obj_name, state_val);
298-
lv_obj_refresh_style(obj, LV_PART_ANY, LV_STYLE_PROP_ANY);
299294
}
300295

301296
int jetkvm_ui_add_flag(const char *obj_name, const char *flag_name) {

internal/native/cgo/screen.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ void lvgl_init(u_int16_t rotation) {
3333
/*LittlevGL init*/
3434
lv_init();
3535

36-
/*Linux frame buffer device init*/
37-
3836
/*Linux frame buffer device init*/
3937
lv_display_t *disp = lv_linux_fbdev_create();
4038
// lv_display_set_physical_resolution(disp, 240, 300);
@@ -43,29 +41,6 @@ void lvgl_init(u_int16_t rotation) {
4341

4442
lvgl_set_rotation(disp, rotation);
4543

46-
// lv_display_t *disp = lv_st7789_create(LCD_H_RES, LCD_V_RES, LV_LCD_FLAG_NONE, lcd_send_cmd, lcd_send_color);
47-
// lv_display_set_resolution(disp, 240, 300);
48-
// lv_display_set_rotation(disp, LV_DISP_ROTATION_270);
49-
50-
// lv_color_t * buf1 = NULL;
51-
// lv_color_t * buf2 = NULL;
52-
53-
// uint32_t buf_size = LCD_H_RES * LCD_V_RES / 10 * lv_color_format_get_size(lv_display_get_color_format(disp));
54-
55-
// buf1 = lv_malloc(buf_size);
56-
// if(buf1 == NULL) {
57-
// log_error("display draw buffer malloc failed");
58-
// return;
59-
// }
60-
61-
// buf2 = lv_malloc(buf_size);
62-
// if(buf2 == NULL) {
63-
// log_error("display buffer malloc failed");
64-
// lv_free(buf1);
65-
// return;
66-
// }
67-
// lv_display_set_buffers(disp, buf1, buf2, buf_size, LV_DISPLAY_RENDER_MODE_PARTIAL);
68-
6944
/* Linux input device init */
7045
lv_indev_t *mouse = lv_evdev_create(LV_INDEV_TYPE_POINTER, "/dev/input/event1");
7146
lv_indev_set_group(mouse, lv_group_get_default());

internal/native/lib/libjknative.a

0 Bytes
Binary file not shown.

video.go

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,18 @@
11
package kvm
22

3-
import "github.com/jetkvm/kvm/internal/native"
4-
5-
// max frame size for 1080p video, specified in mpp venc setting
6-
const maxFrameSize = 1920 * 1080 / 2
7-
8-
func writeCtrlAction(action string) error {
9-
return nil
10-
}
3+
import (
4+
"github.com/jetkvm/kvm/internal/native"
5+
)
116

127
var lastVideoState native.VideoState
138

149
func triggerVideoStateUpdate() {
1510
go func() {
1611
writeJSONRPCEvent("videoInputState", lastVideoState, currentSession)
1712
}()
18-
}
1913

20-
// func HandleVideoStateMessage(event CtrlResponse) {
21-
// videoState := VideoInputState{}
22-
// err := json.Unmarshal(event.Data, &videoState)
23-
// if err != nil {
24-
// logger.Warn().Err(err).Msg("Error parsing video state json")
25-
// return
26-
// }
27-
// lastVideoState = videoState
28-
// triggerVideoStateUpdate()
29-
// requestDisplayUpdate(true)
30-
// }
14+
nativeLogger.Info().Interface("state", lastVideoState).Msg("video state updated")
15+
}
3116

3217
func rpcGetVideoState() (native.VideoState, error) {
3318
return lastVideoState, nil

0 commit comments

Comments
 (0)