Skip to content

Commit

Permalink
Fix GPU EDID ASCII monitor name
Browse files Browse the repository at this point in the history
  • Loading branch information
eloaders committed Nov 21, 2013
1 parent 89888ad commit cdbe92f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/i-nex/.settings
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ File[2]=".src/Global.class:88.35"
File[3]=".src/About.form"
File[4]=".src/About.class:62.0"
File[5]=".src/battery.module:70.77"
File[6]=".src/Disk_Drives.module:62.30"
File[6]=".src/Disk_Drives.module:37.13"
File[7]=".src/ScreenShot.form"
File[8]=".src/ScreenShot.class:7.65"
File[9]=".src/ScreenShotM.module:7.0"
Expand All @@ -44,15 +44,15 @@ File[20]=".src/FModules.class:4.30"
File[21]=".src/Input_Devices.module:8.1"
File[22]=".src/net.module:104.1"
File[23]="Data/report-ng.sh:27.44"
Active=24
File[24]=".src/Distribution_Detect.module:28.18"
File[25]=".src/FFlags.module:71.6"
File[26]=".src/Finfosys.class:450.2"
File[27]=".src/FDF.form"
File[28]=".src/FDF.class:28.69"
File[29]=".src/FNET_R_T.form"
File[30]=".src/FNET_R_T.class:28.32"
File[31]=".src/FGraphic.module:30.9"
Active=31
File[31]=".src/FGraphic.module:18.3"
File[32]="logo/fb.png"
File[33]=".src/FCPU.module:3.4"
File[34]=".src/FUdisks.form"
Expand Down
17 changes: 10 additions & 7 deletions src/i-nex/.src/FGraphic.module
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Public Sub _inits()
Dim Avail_Interfaces As Integer
Dim Max_Interfaces As Integer
Dim all_interfaces As String

Debug "Add Interfaces to ComboBox"
Shell "ls /sys/class/drm/ | grep 'card[0-9]-' | wc -l" Wait To all_interfaces
Max_Interfaces = Val(all_interfaces)
Expand All @@ -14,7 +15,7 @@ Public Sub _inits()
Interfaces_X = Replace(Interfaces_X, "\n", "")
Finfosys.ComboBox8.Add(Interfaces_X)
Next

End

Public Sub _check()
Expand All @@ -25,14 +26,16 @@ Public Sub _check()
status = File.Load("/sys/class/drm/" & Finfosys.ComboBox8.Text & "/status")
enabled = File.Load("/sys/class/drm/" & Finfosys.ComboBox8.Text & "/enabled")
dpms = File.Load("/sys/class/drm/" & Finfosys.ComboBox8.Text & "/dpms")

Shell "/usr/bin/inex-edid /sys/class/drm/" & Finfosys.ComboBox8.Text & "/edid | grep 'Monitor name' | cut -d ':' -f 2" Wait To monitor_name
Shell "/usr/bin/inex-edid /sys/class/drm/" & Finfosys.ComboBox8.Text & "/edid | grep 'Manufacturer' | cut -d ':' -f 2" Wait To manufacturer
Shell "/usr/bin/inex-edid /sys/class/drm/" & Finfosys.ComboBox8.Text & "/edid | grep 'Serial number' | cut -d ':' -f 2" Wait To serial_number

Shell "/usr/bin/inex-edid /sys/class/drm/" & Finfosys.ComboBox8.Text & "/edid | grep 'ASCII string' | cut -d ':' -f 2" Wait To monitor_name

Shell "/usr/bin/inex-edid /sys/class/drm/" & Finfosys.ComboBox8.Text & "/edid | grep 'Manufacturer:' | cut -d ':' -f 2" Wait To manufacturer
Shell "/usr/bin/inex-edid /sys/class/drm/" & Finfosys.ComboBox8.Text & "/edid | grep 'Serial number:' | cut -d ':' -f 2" Wait To serial_number
If monitor_name = Null Then
Shell "/usr/bin/inex-edid /sys/class/drm/" & Finfosys.ComboBox8.Text & "/edid | grep 'Monitor name:' | cut -d ':' -f 2" Wait To monitor_name
Endif
Endif

Finfosys.Label100.Text = "Monitor name: " & Replace(monitor_name, "\n", "")
Finfosys.Label100.Text = "Monitor name: " & Replace(Replace(monitor_name, "\n", " "), "\n", "")
Finfosys.Label65.Text = "Status: " & Replace(status, "\n", "")
Finfosys.Label66.Text = "Enabled: " & Replace(enabled, "\n", "")
Finfosys.Label67.Text = "DPMS: " & Replace(dpms, "\n", "")
Expand Down

0 comments on commit cdbe92f

Please sign in to comment.