tests/wxHMI/HMI@wxglade_hmi/pyfile.xml
author Edouard Tisserant
Fri, 19 Jun 2015 21:36:35 +0200
changeset 1465 9011e2ceea85
parent 1462 9ee3a2dea7e8
child 1691 9a42f12a973e
permissions -rw-r--r--
Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
1465
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
     1
<?xml version='1.0' encoding='utf-8'?>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
     2
<PyFile xmlns:xhtml="http://www.w3.org/1999/xhtml">
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
     3
  <variables>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
     4
    <variable name="Power_ON" type="BOOL"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
     5
    <variable name="Power_OFF" type="BOOL"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
     6
    <variable name="DrawTest" type="BOOL"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
     7
    <variable name="DrawLogo" type="BOOL"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
     8
    <variable name="DrawEscher" type="BOOL"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
     9
    <variable name="Detect_Circle" type="BOOL"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    10
    <variable name="XaxisPos" type="INT"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    11
    <variable name="YaxisPos" type="INT"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    12
    <variable name="ZaxisPos" type="INT"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    13
    <variable name="TaxisPos" type="INT"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    14
    <variable name="XaxisMinus" type="BOOL"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    15
    <variable name="YaxisMinus" type="BOOL"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    16
    <variable name="ZaxisMinus" type="BOOL"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    17
    <variable name="TaxisMinus" type="BOOL"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    18
    <variable name="XaxisPlus" type="BOOL"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    19
    <variable name="YaxisPlus" type="BOOL"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    20
    <variable name="ZaxisPlus" type="BOOL"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    21
    <variable name="TaxisPlus" type="BOOL"/>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    22
  </variables>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    23
  <globals>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    24
    <xhtml:p><![CDATA[
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    25
import ctypes
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    26
import wx, sys
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    27
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    28
AxisList = ["X","Y","Z","T"]
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    29
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    30
PwrButtons = ['Power_ON',
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    31
              'Power_OFF']
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    32
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    33
ActionButtons = ['Detect_Circle',
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    34
                 'DrawTest',
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    35
                 'DrawLogo',
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    36
                 'DrawEscher']
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    37
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    38
class ThreeDee(wx.StaticText):
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    39
    def __init__(self, *args, **kwargs):
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    40
        self.initialized = False
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    41
        kwargs["style"] = wx.ALIGN_CENTRE_HORIZONTAL
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    42
        super(ThreeDee, self).__init__(*args, **kwargs)
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    43
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    44
        self.SetFont(wx.Font(24, wx.SWISS, wx.NORMAL, wx.BOLD))
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    45
        
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    46
        self.positions = [0.]*4
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    47
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    48
        self.Message = None
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    49
        self.NegLimits = None
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    50
        self.Disk = None
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    51
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    52
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    53
    def UpdatePositions(self, positions):
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    54
        # get globals from PLC
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    55
        self.positions = positions
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    56
        self.SetLabel(
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    57
            ((self.Message  +'\n\n') if self.Message else '' )+
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    58
            " ".join(["%s %+.2f"%(axis,self.positions[i])
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    59
                          for i,axis in enumerate(AxisList)]))
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    60
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    61
def MakeButtonFunc(window, sizer, btname):
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    62
    def ButtonDown(event):
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    63
        setattr(PLCGlobals,btname,1)
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    64
        event.Skip()
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    65
    def ButtonUp(event):
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    66
        setattr(PLCGlobals,btname,0)
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    67
        event.Skip()
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    68
    obj = wx.BitmapButton(window, -1, wx.Bitmap('%s.png'%btname))
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    69
    sizer.Add(obj, 2, wx.EXPAND, 0)
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    70
    obj.Bind(wx.EVT_LEFT_DOWN, ButtonDown)
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    71
    obj.Bind(wx.EVT_LEFT_UP, ButtonUp)
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    72
    return obj
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    73
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    74
def UpdPos(self):
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    75
    positions = [getattr(PLCGlobals,axname+"axisPos") for axname in AxisList]
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    76
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    77
    self.window_1.UpdatePositions(positions)
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    78
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    79
Class_wxglade_hmi.UpdPos = UpdPos
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    80
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    81
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    82
#def UpdatePositions(self, event):
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    83
#
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    84
#    positions = [getattr(PLCGlobals,axname+"axisPos") for axname in AxisList]
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    85
#
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    86
#    self.window_1.UpdatePositions(positions)
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    87
#
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    88
#    event.Skip()
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    89
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    90
#Class_wxglade_hmi.UpdatePositions = UpdatePositions
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    91
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    92
initorig = Class_wxglade_hmi.__init__
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    93
def Init(self,*args,**kargs):
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    94
    initorig(self,*args,**kargs)
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    95
    sizer = self.GetSizer().GetItem(1).GetSizer().GetItem(0).GetSizer()
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    96
    self.main_buttons = map(
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    97
        lambda btname: MakeButtonFunc(self, sizer, btname), PwrButtons)
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    98
    sizer = self.GetSizer().GetItem(1).GetSizer().GetItem(1).GetSizer()
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
    99
    self.main_buttons = map(
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   100
        lambda btname: MakeButtonFunc(self, sizer, btname), ActionButtons)
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   101
    self.axis_buttons = map(
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   102
        lambda axis:( MakeButtonFunc(self, sizer, axis+"axisMinus"), 
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   103
                        MakeButtonFunc(self, sizer, axis+"axisPlus")),
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   104
        AxisList)
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   105
    # self.timer = wx.Timer(self, -1)
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   106
    # self.Bind(wx.EVT_TIMER, self.UpdatePositions, self.timer)
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   107
    # self.ShowFullScreen(True,wx.FULLSCREEN_ALL)
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   108
    # wx.CallAfter(self.timer.Start,200)
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   109
    
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   110
Class_wxglade_hmi.__init__ = Init
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   111
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   112
def SetPLCGlobalVar(self, evt):
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   113
    tglbtname = evt.GetEventObject().GetName()
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   114
    setattr(PLCGlobals, tglbtname, evt.GetEventObject().GetValue())
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   115
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   116
]]></xhtml:p>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   117
  </globals>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   118
  <init>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   119
    <xhtml:p><![CDATA[
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   120
]]></xhtml:p>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   121
  </init>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   122
  <cleanup>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   123
    <xhtml:p><![CDATA[
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   124
]]></xhtml:p>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   125
  </cleanup>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   126
  <start>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   127
    <xhtml:p><![CDATA[
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   128
]]></xhtml:p>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   129
  </start>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   130
  <stop>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   131
    <xhtml:p><![CDATA[
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   132
]]></xhtml:p>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   133
  </stop>
9011e2ceea85 Fixed win32 runtime crashing when attempting to log before errors before PLC start. Added pictures to wxHMI and fixed it so that it loads on windows as well
Edouard Tisserant
parents: 1462
diff changeset
   134
</PyFile>