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()
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()
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()