Skip to content

Commit 45502c2

Browse files
committed
Add manual VCP sending to debug menu
1 parent f29f9e1 commit 45502c2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/components/MonitorInfo.jsx

+11
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ export default function MonitorInfo(props) {
77
const [contrast, setContrast] = useState(monitor?.features?.["0x12"] ? monitor?.features?.["0x12"][0] : 50)
88
const [volume, setVolume] = useState(monitor?.features?.["0x62"] ? monitor?.features?.["0x62"][0] : 50)
99
const [powerState, setPowerState] = useState(monitor?.features?.["0xD6"] ? monitor?.features?.["0xD6"][0] : 50)
10+
const [manualVCP, setManualVCP] = useState("")
11+
const [manualValue, setManualValue] = useState("")
1012

1113
let extraHTML = []
1214

@@ -64,6 +66,15 @@ export default function MonitorInfo(props) {
6466
)
6567
}
6668

69+
// Manual VCP
70+
extraHTML.push(
71+
<div className="manual-vcp-row" key="manual">
72+
<input placeholder="VCP code" value={manualVCP} onChange={e => { setManualVCP(e.target.value) }} />
73+
<input placeholder="Value" value={manualValue} onChange={e => { setManualValue(e.target.value) }} />
74+
<a className="button" onClick={() => setVCP(monitor.id, parseInt(manualVCP), parseInt(manualValue))}>Send VCP</a>
75+
</div>
76+
)
77+
6778
return (
6879
<div key={monitor.key}>
6980
<br />

0 commit comments

Comments
 (0)