Exemple #1
0
 def __init__(self, cb_name, label, array_index):
     self.cb_name = cb_name
     self.label = label
     self.array_index = array_index
     self.value = 0
     #SydDataReader.addCallback(name, proxy(ROOT, self.read))
     SydDataReader.addCallback(cb_name, self.set_value)
Exemple #2
0
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        self.line_buffer = N.zeros(64)
        self.line_pointer = 0


        self.chart = SydChart(
                self,
                height=300, width=500,
                bd=2, relief=SUNKEN)

        self.scale_min = Scale(self,
                from_=2000, to=0,
                label="min",
                command=self.cb_scale_min)

        self.scale_max = Scale(self,
                from_=2000, to=0,
                label="max",
                command=self.cb_scale_max)

        self.chart.pack(side=LEFT)

        self.scale_min.pack(side=LEFT, fill=BOTH, expand=True)
        self.scale_max.pack(side=LEFT, fill=BOTH, expand=True)

        self.scale_min.set(CRANGE[0])
        self.scale_max.set(CRANGE[1])

        SydDataReader.addCallback("line_data", proxy(self, self.plot_line_data))
Exemple #3
0
    def __init__(self, master, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        self.odo_buffer = N.zeros((64, 2))
        self.odo_buffer_avg = N.zeros((64, 2))
        self.odo_avg = [0,0]
        self.odo_pointer = 0


        self.chart_l = SydChart(
                self,
                height=400, width=400,
                bd=2, relief=SUNKEN)
        self.chart_l.pack(fill=BOTH, expand=True, side=LEFT)

        self.chart_r = SydChart(
                self,
                height=400, width=400,
                bd=2, relief=SUNKEN)
        self.chart_r.pack(fill=BOTH, expand=True, side=LEFT)

        self.scale_min = Scale(self,
                from_=2000, to=0,
                label="min",
                command=self.cb_scale_min)

        self.scale_max = Scale(self,
                from_=2000, to=0,
                label="max",
                command=self.cb_scale_max)

        self.scale_min.pack(side=LEFT, fill=BOTH, expand=True)
        self.scale_max.pack(side=LEFT, fill=BOTH, expand=True)

        self.scale_min.set(CRANGE[0])
        self.scale_max.set(CRANGE[1])

        SydDataReader.addCallback("odo_data", proxy(self, self.plot_od_data))
        SydDataReader.addCallback("avg", proxy(self, self.plot_avg))
        self.pack()
 def __init__(self, cb_name, label):
     self.label = label
     self.value = 0
     SydDataReader.addCallback(cb_name, self.set_value)
 def __init__(self, cb_name, label, array_index):
     self.label = label
     self.array_index = array_index
     self.value = 0
     SydDataReader.addCallback(cb_name, self.set_value)