Magellan Linux

Contents of /mcore-src/trunk/mcore-tools/src/modules/basic-video/graphic.control.class.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2673 - (show annotations) (download)
Mon Dec 7 12:46:27 2015 UTC (8 years, 5 months ago) by niro
File size: 2669 byte(s)
-fixed broken push config controls
1 # $Id$
2
3 push_config 10_graphic_driver
4 push_config 10_graphic_resolution
5 push_config 10_graphic_depth
6 #push_config 10_graphic_refresh
7
8 help_graphic_resolution()
9 {
10 local serial="${CLASS_ARGV[0]}"
11 control_client "${serial}" help graphic.resolution
12 }
13
14 help_graphic_refresh()
15 {
16 local serial="${CLASS_ARGV[0]}"
17 control_client "${serial}" help graphic.refresh
18 }
19
20 help_graphic_depth()
21 {
22 local serial="${CLASS_ARGV[0]}"
23 control_client "${serial}" help graphic.depth
24 }
25
26 help_graphic_driver()
27 {
28 local serial="${CLASS_ARGV[0]}"
29 control_client "${serial}" help graphic.driver
30 }
31
32 # set_graphic_driver $serial $value
33 set_graphic_driver()
34 {
35 local serial="${CLASS_ARGV[0]}"
36 local value="${CLASS_ARGV[1]}"
37
38 import_resource cfg_graphic "${serial}" module "${value}"
39 }
40
41 control_graphic_driver()
42 {
43 local serial="${CLASS_ARGV[0]}"
44 push_config_10_graphic_driver "${serial}"
45 }
46
47 push_config_10_graphic_driver()
48 {
49 local serial="$1"
50 local value
51
52 value=$(mysqldo "select module from cfg_graphic where serial='${serial}'")
53 control_client "${serial}" set graphic.driver "${value}"
54 }
55
56 # set_graphic_resolution $serial $value
57 set_graphic_resolution()
58 {
59 local serial="${CLASS_ARGV[0]}"
60 local value="${CLASS_ARGV[1]}"
61
62 import_resource cfg_graphic "${serial}" resolution "${value}"
63 }
64
65 # control_graphic_resolution $serial
66 control_graphic_resolution()
67 {
68 local serial="${CLASS_ARGV[0]}"
69 push_config_10_graphic_resolution "${serial}"
70 }
71
72 push_config_10_graphic_resolution()
73 {
74 local serial="$1"
75 local value
76
77 value=$(mysqldo "select resolution from cfg_graphic where serial='${serial}'")
78 control_client "${serial}" set graphic.resolution "${value}"
79 }
80
81 # set_graphic_depth $serial $value
82 set_graphic_depth()
83 {
84 local serial="${CLASS_ARGV[0]}"
85 local value="${CLASS_ARGV[1]}"
86
87 import_resource cfg_graphic "${serial}" depth "${value}"
88 }
89
90 control_graphic_depth()
91 {
92 local serial="${CLASS_ARGV[0]}"
93 push_config_10_graphic_depth "${serial}"
94 }
95
96 push_config_10_graphic_depth()
97 {
98 local serial="$1"
99 local value
100
101 value=$(mysqldo "select depth from cfg_graphic where serial='${serial}'")
102 control_client "${serial}" set graphic.depth "${value}"
103 }
104
105 # set_graphic_refesh $serial $value
106 set_graphic_refresh()
107 {
108 local serial="${CLASS_ARGV[0]}"
109 local value="${CLASS_ARGV[1]}"
110
111 import_resource cfg_graphic "${serial}" refresh_rate "${value}"
112 }
113
114 # control_graphic_resolution $serial
115 control_graphic_refresh()
116 {
117 local serial="${CLASS_ARGV[0]}"
118 push_config_10_graphic_refresh "${serial}"
119 }
120
121 push_config_10_graphic_refresh()
122 {
123 local serial="$1"
124 local value
125
126 value=$(mysqldo "select hz from cfg_graphic where serial='${serial}'")
127 control_client "${serial}" set graphic.resolution "${value}"
128 }