def doModify(self, evt):
    if self.selection is None:
      return
    nm = []
    for s in self.sensors:
      nm.append(s[0])

    s = self.sensors[self.selection]
    if s[3] is None:
      params = []
    else:
      params = s[3]

    dlg = AddSensorDlg(self, nm, self.validPins, self.heatersPage, self.font,
                       name = s[0], stype = s[1], pin = s[2],
                       params = params, modify = True)
    rc = dlg.ShowModal()
    if rc == wx.ID_OK:
      tt = dlg.getValues()

    dlg.Destroy()

    if rc != wx.ID_OK:
      return

    self.assertModified(True)

    self.sensors[self.selection] = tt
    self.lb.updateList(self.sensors)
    self.validateTable()
    self.assertModified(True)
Beispiel #2
0
  def doModify(self, evt):
    if self.selection is None:
      return
    nm = []
    for s in self.sensors:
      nm.append(s[0])

    s = self.sensors[self.selection]
    if s[3] is None:
      params = []
    else:
      params = s[3]

    dlg = AddSensorDlg(self, nm, self.validPins, self.heatersPage, self.font,
                       name = s[0], stype = s[1], pin = s[2],
                       params = params, modify = True)
    rc = dlg.ShowModal()
    if rc == wx.ID_OK:
      tt = dlg.getValues()

    dlg.Destroy()

    if rc != wx.ID_OK:
      return

    self.assertModified(True)

    self.sensors[self.selection] = tt
    self.lb.updateList(self.sensors)
    self.validateTable()
    self.assertModified(True)
  def doAdd(self, evt):
    nm = []
    for s in self.sensors:
      nm.append(s[0])

    dlg = AddSensorDlg(self, nm, self.validPins, self.heatersPage, self.font)
    rc = dlg.ShowModal()
    if rc == wx.ID_OK:
      tt = dlg.getValues()

    dlg.Destroy()

    if rc != wx.ID_OK:
      return

    self.sensors.append(tt)
    self.lb.updateList(self.sensors)
    self.validateTable()
    self.assertModified(True)
Beispiel #4
0
  def doAdd(self, evt):
    nm = []
    for s in self.sensors:
      nm.append(s[0])

    dlg = AddSensorDlg(self, nm, self.validPins, self.heatersPage, self.font)
    rc = dlg.ShowModal()
    if rc == wx.ID_OK:
      tt = dlg.getValues()

    dlg.Destroy()

    if rc != wx.ID_OK:
      return

    self.sensors.append(tt)
    self.lb.updateList(self.sensors)
    self.validateTable()
    self.assertModified(True)