Skip to content

Commit

Permalink
EIZO Flexscan 2456 suppoert (ruby, node untested)
Browse files Browse the repository at this point in the history
  • Loading branch information
reald committed Nov 6, 2021
1 parent ebbe7f1 commit 99a9e07
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*~
7 changes: 7 additions & 0 deletions node/hid-monitor-control.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@ HID = require('node-hid');
HID.setDriverType('libusb');

device_id_pairs = [
(0x056D, 0x4027), // EV2456
(0x056D, 0x4014), // EV2750
(0x056D, 0x4059), // EV2760
(0x056D, 0x4065), // EV3895
]

function get_input_source_table(model) {
table = {
'EV2456': {
'D-SUB': 0x100,
'DVI': 0x0200,
'DisplayPort': 0x0300,
'HDMI': 0x0400 },
'EV2750': {
'DVI': 0x0200,
'DisplayPort': 0x0300,
Expand Down Expand Up @@ -47,6 +53,7 @@ function lookup_input_source_alias(input) {
'Type-C': 'USB-C',
'USB': 'USB-C',
'USBC': 'USB-C',
'DSUB': 'D-SUB',
}

key = Object.keys(table).find(k => k.toLowerCase() == input.toLowerCase())
Expand Down
5 changes: 5 additions & 0 deletions ruby/hid-monitor-control.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
# https://rubygems.org/gems/hidapi/

device_id_pairs = [
[0x056D, 0x4027], # EV2456
[0x056D, 0x4014], # EV2750
[0x056D, 0x4059], # EV2760
[0x056D, 0x4065], # EV3895
]

$input_source_table = {


:EV2456 => { :D-SUB => 0x0100, :DVI => 0x200, :DisplayPort => 0x0300, :HDMI => 0x0400 },
:EV2750 => { :DVI => 0x0200, :DisplayPort => 0x0300, :HDMI => 0x0400 },
:EV2760 => { :DVI => 0x0200, :DisplayPort1 => 0x0300, :DisplayPort2 => 0x0301, :HDMI => 0x0400 },
:EV3895 => { :DisplayPort => 0x0300, :'USB-C' => 0x0301, :HDMI1 => 0x0400, :HDMI2 => 0x0401 },
Expand All @@ -22,6 +26,7 @@
:'Type-C' => :'USB-C',
:USB => :'USB-C',
:USBC => :'USB-C',
:DSUB => :'D-SUB',
}

def print_usage(input_source_table = nil)
Expand Down

0 comments on commit 99a9e07

Please sign in to comment.