Пример #1
0
 def __init__(self):
     '''
     Constructor
     '''
     InsimClient.__init__(self, 'TESTINSIM')
     self.flags = pyinsim.ISF_HLV | pyinsim.ISF_CON | pyinsim.ISF_OBH
     self.sa = self.config.get("test", "showall")
Пример #2
0
 def __init__(self):
     '''
     Constructor
     '''
     InsimClient.__init__(self, 'TESTINSIM')
     self.flags=pyinsim.ISF_HLV| pyinsim.ISF_CON | pyinsim.ISF_OBH
     self.sa=self.config.get("test","showall")
Пример #3
0
 def __init__(self):
     '''
     Constructor
     '''
     InsimClient.__init__(self, 'CRASH LIST')
     self.version=0.1
     self.curpage=0
     self.track=''
     self.top=40
     self.left=10
     self.crash_msg_queue=deque([]) #crash msgs queue
     self.warn_color='^1'
     self.last_time_crash=0
     self.crash_list=[]
     self.crash_counter={}       
     self.tmp=0
     self.driver_focus=0
     self.flags=pyinsim.ISF_CON|pyinsim.ISF_OBH
     #read csv, previous crashes
     if(self.config.get("crash_list","read_clist")=="yes"):
         print "reading csv"
         self.read_csv()
         print "Read ",len(self.crash_list), " rows "
         #count crashes
         for cr in self.crash_list:
             self.count_crash(cr.car_A)
             self.count_crash(cr.car_B)
Пример #4
0
 def __init__(self):
     InsimClient.__init__(self, "PIT Informant")
     self.version="0.1"
     self.flags=pyinsim.ISF_LOCAL
     self.pits={}
     self.lic=self.config.get('pit_warning','licencia')
     self.posx=self.config.getint('pit_warning','posx')
     self.posy=self.config.getint('pit_warning','posy')
     self.pit_gap = self.config.getint('pit_warning','pit_gap')
     self.curlap=0
Пример #5
0
    def __init__(self):
        '''
        Constructor
        '''
        InsimClient.__init__(self, tag="Example_Insim")
        self.version = 0.1
        self.flags = pyinsim.ISF_CON | pyinsim.ISF_OBH  #connection flags

        #read a config.cfg parameter
        self.config_par = self.config.get("section", "foo")
        print self.config_par
Пример #6
0
 def __init__(self):
     '''
     Constructor
     '''
     InsimClient.__init__(self, tag="Example_Insim")
     self.version=0.1
     self.flags=pyinsim.ISF_CON|pyinsim.ISF_OBH #connection flags
     
     #read a config.cfg parameter
     self.config_par=self.config.get("section","foo")
     print self.config_par
Пример #7
0
 def __init__(self):
     InsimClient.__init__(self, "Cam_Changer")
     self.version=0.2
     self.cur_carcam=0
     #self.cams=[pyinsim.VIEW_CAM,pyinsim.VIEW_HELI,pyinsim.VIEW_DRIVER,pyinsim.VIEW_CUSTOM]
     self.cams=[str(x) for x in self.config.get("cam_changer","cams").split(",")]
     self.flags=pyinsim.ISF_LOCAL|pyinsim.ISF_MCI #TODO we need MCI for position. FIX
     self.ccam_t=None
     self.ccar_t=None
     self.msg="^7THis is example test."
     self.c_count=1
Пример #8
0
 def __init__(self):
     '''
     Constructor
     '''
     InsimClient.__init__(self, "Event_Timer")
     self.version=0.1
     self.flags=""
     self.timer_thread=None
     self.tm=0#time in seconds
     self.paused=True
     self.msg=""
     self.first=True
Пример #9
0
 def __init__(self):
     InsimClient.__init__(self, "Cam_Changer")
     self.version = 0.2
     self.cur_carcam = 0
     #self.cams=[pyinsim.VIEW_CAM,pyinsim.VIEW_HELI,pyinsim.VIEW_DRIVER,pyinsim.VIEW_CUSTOM]
     self.cams = [
         str(x) for x in self.config.get("cam_changer", "cams").split(",")
     ]
     self.flags = pyinsim.ISF_LOCAL | pyinsim.ISF_MCI  #TODO we need MCI for position. FIX
     self.ccam_t = None
     self.ccar_t = None
     self.msg = "^7THis is example test."
     self.c_count = 1
Пример #10
0
 def __init__(self):
     InsimClient.__init__(self, 'CUSTOM LAUNCHER')
     self.version="0.4.1"
     self.print_log("----"+self.tag+" v."+str(self.version) + " started."+"----")
     self.flags=pyinsim.ISF_MCI
     self.num_lights=self.config.getint("custom_launcher", "num_lights")
     self.state=self.num_lights+2
     self.pen_given=[]
     self.tmp=0
     self.interval=self.config.getint("connection", "interval")
     self.sem_styles=[(chr(149),chr(149)),(chr(166)*2,chr(166)*2),('*','*'),("["+chr(149)+"]","["+chr(149)+"]"),(chr(186)*2+' ',chr(186)*2+' '),('#','#')]
     self.bstyle=[0,pyinsim.ISB_LIGHT, pyinsim.ISB_DARK]
     self.launch_tstamp=0
     self.launch_stime=0#launch server time
     self.abort_counter=0
Пример #11
0
 def __init__(self):
     InsimClient.__init__(self, 'CUSTOM LAUNCHER')
     self.version = "0.4.1"
     self.print_log("----" + self.tag + " v." + str(self.version) +
                    " started." + "----")
     self.flags = pyinsim.ISF_MCI
     self.num_lights = self.config.getint("custom_launcher", "num_lights")
     self.state = self.num_lights + 2
     self.pen_given = []
     self.tmp = 0
     self.interval = self.config.getint("connection", "interval")
     self.sem_styles = [(chr(149), chr(149)), (chr(166) * 2, chr(166) * 2),
                        ('*', '*'),
                        ("[" + chr(149) + "]", "[" + chr(149) + "]"),
                        (chr(186) * 2 + ' ', chr(186) * 2 + ' '),
                        ('#', '#')]
     self.bstyle = [0, pyinsim.ISB_LIGHT, pyinsim.ISB_DARK]
     self.launch_tstamp = 0
     self.launch_stime = 0  #launch server time
     self.abort_counter = 0