Subversion Repositories Projects

Rev

Rev 653 | Rev 660 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 653 Rev 654
Line 1... Line 1...
1
#!/usr/bin/env python
1
#!/usr/bin/env python
2
# -*- coding: iso-8859-15 -*-
2
# -*- coding: iso-8859-15 -*-
3
# generated by wxGlade 0.6.3 on Thu Sep 24 15:46:36 2009
3
# generated by wxGlade 0.6.3 on Thu Sep 24 15:46:36 2009
Line 4... Line 4...
4
 
4
 
5
#
5
#
6
# Mikrokopter VibrationTest  Rev: $Rev: 653 $
6
# Mikrokopter VibrationTest  Rev: $Rev: 654 $
7
#
7
#
8
# Author: Frederic Goddeeris   (frederic@rc-flight.be) 
8
# Author: Frederic Goddeeris   (frederic@rc-flight.be) 
Line 9... Line 9...
9
#
9
#
Line 79... Line 79...
79
        self.Bind(wx.EVT_BUTTON, self.onButton, self.button)
79
        self.Bind(wx.EVT_BUTTON, self.onButton, self.button)
80
        # end wxGlade
80
        # end wxGlade
Line 81... Line 81...
81
       
81
       
Line -... Line 82...
-
 
82
        self.button.SetFocus()
-
 
83
       
-
 
84
        self.running = True
-
 
85
        self.Bind(EVT_MEAS_STATUS_UPDATE, self.OnUpdate)
-
 
86
        self.Bind(EVT_MEAS_DATA, self.OnData)
-
 
87
        # The first argument that is passed to the constructor is the parent
-
 
88
        self.app = args[0].app
82
        self.button.SetFocus()
89
        self.error = False
-
 
90
        self.firstVoltage = True
-
 
91
 
-
 
92
 
-
 
93
    def __set_properties(self):
-
 
94
        # begin wxGlade: MeasureDialog.__set_properties
-
 
95
        self.SetTitle("Measuring Status")
-
 
96
        self.text_ctrl_1.SetMinSize((400,300))
-
 
97
        self.voltageCtrl.SetMinSize((50,-1))
Line 83... Line 98...
83
       
98
        self.speedCtrl.SetMinSize((50,-1))
84
       
99
        # end wxGlade
85
       
100
       
86
        # Configure Voltage Ctrl
101
        # Configure Voltage Ctrl
Line 101... Line 116...
101
        self.voltageCtrl.SetMiddleIcon(icon)        
116
        self.voltageCtrl.SetMiddleIcon(icon)        
102
        self.voltageCtrl.SetSpeedBackground(COLOR_BACKGROUND)        
117
        self.voltageCtrl.SetSpeedBackground(COLOR_BACKGROUND)        
103
        self.voltageCtrl.SetArcColour(wx.WHITE)
118
        self.voltageCtrl.SetArcColour(wx.WHITE)
104
        self.voltageCtrl.SetSpeedValue(2)
119
        self.voltageCtrl.SetSpeedValue(2)
Line 105... Line -...
105
 
-
 
106
 
120
 
107
        # Configure Speed Ctr;
121
        # Configure Speed Ctr;
108
        self.speedCtrl.SetAngleRange(0,pi)        
122
        self.speedCtrl.SetAngleRange(0,pi)        
109
        intervals = range(0, 261, 20)
123
        intervals = range(0, 261, 20)
Line 124... Line 138...
124
        self.speedCtrl.SetHandColour(COLOR_YELLOW)
138
        self.speedCtrl.SetHandColour(COLOR_YELLOW)
125
        self.speedCtrl.SetSpeedBackground(COLOR_BACKGROUND)  
139
        self.speedCtrl.SetSpeedBackground(COLOR_BACKGROUND)  
126
        self.speedCtrl.SetArcColour(wx.WHITE)        
140
        self.speedCtrl.SetArcColour(wx.WHITE)        
127
        self.speedCtrl.SetSpeedValue(0)
141
        self.speedCtrl.SetSpeedValue(0)
Line 128... Line -...
128
 
-
 
129
       
-
 
130
        self.running = True
-
 
131
        self.Bind(EVT_MEAS_STATUS_UPDATE, self.OnUpdate)
-
 
132
        self.Bind(EVT_MEAS_DATA, self.OnData)
-
 
133
        # The first argument that is passed to the constructor is the parent
-
 
134
        self.app = args[0].app
-
 
135
        self.error = False
-
 
136
        self.firstVoltage = True
-
 
137
 
-
 
138
 
-
 
139
    def __set_properties(self):
-
 
140
        # begin wxGlade: MeasureDialog.__set_properties
-
 
141
        self.SetTitle("Measuring Status")
-
 
142
        self.text_ctrl_1.SetMinSize((400,300))
-
 
143
        self.voltageCtrl.SetMinSize((50,-1))
-
 
144
        self.speedCtrl.SetMinSize((50,-1))
-
 
Line 145... Line 142...
145
        # end wxGlade
142
 
146
 
143
 
147
    def __do_layout(self):
144
    def __do_layout(self):
148
        # begin wxGlade: MeasureDialog.__do_layout
145
        # begin wxGlade: MeasureDialog.__do_layout
Line 779... Line 776...
779
    def onAbout(self, event): # wxGlade: MainFrame.<event_handler>
776
    def onAbout(self, event): # wxGlade: MainFrame.<event_handler>
780
         # First we create and fill the info object
777
         # First we create and fill the info object
781
        print "about"
778
        print "about"
782
        info = wx.AboutDialogInfo()
779
        info = wx.AboutDialogInfo()
783
        info.Name = "MK Vibration Test - "
780
        info.Name = "MK Vibration Test - "
784
        info.Version = "v0.9 RC3 ($Rev: 653 $)".replace("$","")
781
        info.Version = "v0.9 RC3 ($Rev: 654 $)".replace("$","")
785
        info.Copyright = ""
782
        info.Copyright = ""
786
        info.Developers=["Frederic Goddeeris  (Frederic@rc-flight.be)"]
783
        info.Developers=["Frederic Goddeeris  (Frederic@rc-flight.be)"]
787
        info.Description = "Please consult the WIKI page for a complete description of the tool:"
784
        info.Description = "Please consult the WIKI page for a complete description of the tool:"
788
        info.WebSite = ("http://www.mikrokopter.de/ucwiki/en/VibrationTest", "VibrationTest WIKI page")
785
        info.WebSite = ("http://www.mikrokopter.de/ucwiki/en/VibrationTest", "VibrationTest WIKI page")
789
        wx.AboutBox(info)
786
        wx.AboutBox(info)