示例#1
0
文件: servo.py 项目: smunix/brickv
 def minimum_voltage_button_pressed(self):
     qid = QInputDialog(self)
     qid.setInputMode(QInputDialog.IntInput)
     qid.setIntMinimum(5000)
     qid.setIntMaximum(0xFFFF)
     qid.setIntStep(100)
     try:
         qid.setIntValue(self.servo.get_minimum_voltage())
     except ip_connection.Error:
         return
     qid.intValueSelected.connect(self.minimum_voltage_selected)
     qid.setLabelText("Choose minimum servo voltage in mV.")
     qid.open()
示例#2
0
文件: servo.py 项目: smunix/brickv
 def minimum_voltage_button_pressed(self):
     qid = QInputDialog(self)
     qid.setInputMode(QInputDialog.IntInput)
     qid.setIntMinimum(5000)
     qid.setIntMaximum(0xFFFF)
     qid.setIntStep(100)
     try:
         qid.setIntValue(self.servo.get_minimum_voltage())
     except ip_connection.Error:
         return
     qid.intValueSelected.connect(self.minimum_voltage_selected)
     qid.setLabelText("Choose minimum servo voltage in mV.")
     qid.open()
示例#3
0
文件: servo.py 项目: smunix/brickv
    def output_voltage_button_clicked(self):
        qid = QInputDialog(self)
        qid.setInputMode(QInputDialog.IntInput)
        qid.setIntMinimum(5000)
        qid.setIntMaximum(27000)
        qid.setIntStep(100)
        try:
            qid.setIntValue(self.servo.get_output_voltage())
        except ip_connection.Error:
            return
        qid.intValueSelected.connect(self.output_voltage_selected)
        qid.setLabelText("Choose Output Voltage in mV.")
#                         "<font color=red>Setting this too high can destroy your servo.</font>")
        qid.open()
示例#4
0
文件: servo.py 项目: smunix/brickv
 def output_voltage_button_clicked(self):
     qid = QInputDialog(self)
     qid.setInputMode(QInputDialog.IntInput)
     qid.setIntMinimum(5000)
     qid.setIntMaximum(27000)
     qid.setIntStep(100)
     try:
         qid.setIntValue(self.servo.get_output_voltage())
     except ip_connection.Error:
         return
     qid.intValueSelected.connect(self.output_voltage_selected)
     qid.setLabelText("Choose Output Voltage in mV.")
     #                         "<font color=red>Setting this too high can destroy your servo.</font>")
     qid.open()
示例#5
0
    def motor_current_button_pressed(self):
        qid = QInputDialog(self)
        qid.setInputMode(QInputDialog.IntInput)
        qid.setIntMinimum(0)
        qid.setIntMaximum(2500)
        qid.setIntStep(100)
        try:
            qid.setIntValue(self.stepper.get_motor_current())
        except ip_connection.Error:
            return
        qid.intValueSelected.connect(self.motor_current_selected)
        qid.setLabelText("Choose motor current in mA.")
#                         "<font color=red>Setting this too high can destroy your Motor.</font>")
        qid.open()
示例#6
0
 def motor_current_button_pressed(self):
     qid = QInputDialog(self)
     qid.setInputMode(QInputDialog.IntInput)
     qid.setIntMinimum(0)
     qid.setIntMaximum(2500)
     qid.setIntStep(100)
     try:
         qid.setIntValue(self.stepper.get_motor_current())
     except ip_connection.Error:
         return
     qid.intValueSelected.connect(self.motor_current_selected)
     qid.setLabelText("Choose motor current in mA.")
     #                         "<font color=red>Setting this too high can destroy your Motor.</font>")
     qid.open()