~siretart/lcd4linux/debian

« back to all changes in this revision

Viewing changes to usbhub.conf

  • Committer: Reinhard Tartler
  • Date: 2011-04-27 17:24:15 UTC
  • mto: This revision was merged to the branch mainline in revision 750.
  • Revision ID: siretart@tauware.de-20110427172415-6n4aptmvmz0eztvm
Tags: upstream-0.11.0~svn1143
ImportĀ upstreamĀ versionĀ 0.11.0~svn1143

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#  $Id: usbhub.conf 730 2007-01-14 13:50:28Z michael $
 
2
#  $URL: https://ssl.bulix.org/svn/lcd4linux/trunk/usbhub.conf $
 
3
 
 
4
Variables {
 
5
   tick 50
 
6
   netstep 0.5
 
7
   diskstep 1.5
 
8
}
 
9
 
 
10
Display SitecomHUB {
 
11
    Driver 'USBHUB'
 
12
    Vendor '0x04b4' 
 
13
    Product '0x6560'
 
14
}
 
15
 
 
16
Display TyphoonHUB {
 
17
    Driver 'USBHUB'
 
18
    Vendor '0x0409' 
 
19
    Product '0x0058'
 
20
}
 
21
 
 
22
 
 
23
Widget GPO_Test300 {
 
24
    class 'GPO'
 
25
    expression 2+(1+test::onoff(1))/2
 
26
    update 300
 
27
}
 
28
Widget GPO_Test400 {
 
29
    class 'GPO'
 
30
    expression 2+(1+test::onoff(2))/2
 
31
    update 400
 
32
}
 
33
Widget GPO_Test500 {
 
34
    class 'GPO'
 
35
    expression 2+(1+test::onoff(3))/2
 
36
    update 500
 
37
}
 
38
Widget GPO_Test600 {
 
39
    class 'GPO'
 
40
    expression 2+(1+test::onoff(4))/2
 
41
    update 600
 
42
}
 
43
 
 
44
 
 
45
# Display network activity as pulse duration on the hub leds.
 
46
# currently configured to
 
47
#
 
48
#   0 % pulse width : traffic < exp(10) == 22kbyte/sec
 
49
#  50 % pulse width : traffic about exp(13.5) == 730kbyte/sec
 
50
# 100 % pulse width : traffic > exp(16) == 8886kbyte/sec
 
51
#
 
52
# Which is quite suitable for a 100mbit network.
 
53
 
 
54
Widget Net_RX {
 
55
    class 'GPO'
 
56
    expression (exp(10+test::bar(1,6,0,0.5)) < netdev('eth0', 'Rx_bytes', (6/netstep)*2*tick))?2:3
 
57
    update tick
 
58
}  
 
59
Widget Net_TX {
 
60
    class 'GPO'
 
61
    expression (exp(10+test::bar(2,6,0,0.5)) < netdev('eth0', 'Tx_bytes', (6/netstep)*2*tick))?2:3
 
62
    update tick
 
63
}  
 
64
 
 
65
# As above, but for disk read/writes, pwm for 0bytes/sec .. 33MB/sec (e^9 * 4096)
 
66
Widget SDA_read {
 
67
    class 'GPO'
 
68
    expression (exp(test::bar(3,9,0,diskstep)) < diskstats('sda', 'read_sectors', (9/diskstep)*2*tick))?2:3
 
69
    update tick
 
70
}
 
71
Widget SDA_write{
 
72
    class 'GPO'
 
73
    expression (exp(test::bar(4,9,0,diskstep)) < diskstats('sda', 'write_sectors', (9/diskstep)*2*tick))?2:3
 
74
    update tick
 
75
}
 
76
 
 
77
Layout TestHUB {
 
78
   GPO1 'GPO_Test300'
 
79
   GPO2 'GPO_Test400'
 
80
   GPO3 'GPO_Test500'
 
81
   GPO4 'GPO_Test600'
 
82
}
 
83
 
 
84
Layout NetAndHDD {
 
85
  GPO1 'Net_RX'
 
86
  GPO2 'Net_TX'
 
87
  GPO3 'SDA_read'
 
88
  GPO4 'SDA_write'
 
89
}
 
90
 
 
91
#Display 'SitecomHUB'
 
92
Display 'TyphoonHUB'
 
93
#Layout  'TestHUB'
 
94
Layout 'NetAndHDD'