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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| case-screen.py — Linux 下开关机箱屏幕 (MacroSilicon ms912x, VID 345f PID 9132, | |
| "USB Display / usb extscreen", Myth.Cool / 瓦尔基里等机箱副屏方案) | |
| 用法: | |
| python3 case-screen.py off 关屏 (断电 + 关背光) | |
| python3 case-screen.py on 点亮 (恢复供电 + 背光; 画面需程序推流, 无推流时为黑屏/残帧) | |
| python3 case-screen.py probe 打印设备寄存器状态 (诊断用) |
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
| class GradientView: UIView { | |
| var color: UIColor | |
| init(_ color: UIColor) { | |
| self.color = color | |
| super.init(frame: .zero) | |
| } | |
| required init?(coder: NSCoder) { | |
| fatalError("init(coder:) has not been implemented") |