fix: chạy được trên NEO One (camera auto-detect + cửa sổ 1x1)#2
Open
tuanln wants to merge 1 commit into
Open
Conversation
Hai lỗi gặp khi deploy lên NEO One (Armbian aarch64 + xfwm): 1. Camera: CaptureEngine mở cứng webcam_index=0, nhưng camera thật ở /dev/video1 (node /dev/video0 là metadata/obsensor, mở index 0 thất bại). → open() nay ép backend V4L2 (nhanh, tránh dò obsensor chậm ~6s) và dò các /dev/video* có thật, lấy index đầu tiên đọc được frame; vẫn ưu tiên env NEO_STOPMOTION_WEBCAM_INDEX rồi tới index cấu hình. 2. Cửa sổ QML: ApplicationWindow ở visibility Window.Windowed không áp được width/height trên nền này → cửa sổ thu về 1x1 (UI không hiện). Đổi sang Window.Maximized để WM tự co theo màn hình (hợp kiosk, vẫn còn nút đóng). Đã verify chạy thật trên NEO One: camera (index 1) + UI hiển thị đầy đủ. 29/29 test PASS. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bối cảnh
Deploy NeoStopMotion lên NEO One (Armbian aarch64 + XFCE/xfwm) gặp 2 lỗi khiến app không dùng được. PR sửa cả hai, đã verify chạy thật trên thiết bị.
Lỗi & cách sửa
1. Camera mở cứng index 0
CaptureEnginemởcv2.VideoCapture(0)cố định, nhưng trên NEO camera thật ở/dev/video1(node/dev/video0là metadata/obsensor, mở index 0 thất bại) → app báo "Cannot open webcam index 0".open()nay ép backend V4L2 (mở nhanh, tránh backend obsensor dò chậm ~6s/index) và dò các/dev/video*có thật, chọn index đầu tiên đọc được frame.NEO_STOPMOTION_WEBCAM_INDEX→ index cấu hình → tự dò.2. Cửa sổ QML thu về 1x1
ApplicationWindowởvisibility: Window.Windowedkhông áp đượcwidth/heighttrên nền này → cửa sổ 1x1, UI không hiện (dù QML không báo lỗi, GL direct rendering OK).Window.Maximized: WM tự co theo màn hình, hợp kiosk maker-station mà vẫn còn nút đóng (khác FullScreen).Kiểm thử
pytest: 29/29 PASS.🤖 Generated with Claude Code