| | |
| | | APP_ADDR_LOCATION_OFFSET = 8 |
| | | APP_LENGTH_LOCATION_OFFSET = 12 |
| | | logger = logging.getLogger() |
| | | logger.setLevel(logging.DEBUG) |
| | | logger.setLevel(logging.INFO) |
| | | formatter = logging.Formatter( |
| | | '%(asctime)s - %(name)s - %(levelname)s - %(message)s') |
| | | |
| | | consoleHandler = logging.StreamHandler() |
| | | consoleHandler.setLevel(logging.DEBUG) |
| | | consoleHandler.setLevel(logging.ERROR) |
| | | |
| | | fileHandler = logging.FileHandler('./log/ShiftTool.log', |
| | | mode='a', |
| | | encoding='UTF-8') |
| | | fileHandler.setLevel(logging.NOTSET) |
| | | fileHandler.setLevel(logging.INFO) |
| | | |
| | | consoleHandler.setFormatter(formatter) |
| | | fileHandler.setFormatter(formatter) |
| | |
| | | self.UI.pushButton_4.clicked.connect(self.ReadVIN) |
| | | self.UI.pushButton_6.clicked.connect(self.ReadMfgDate) |
| | | self.UI.pushButton_14.clicked.connect(self.ReadDataByID) |
| | | self.UI.pushButton_3.clicked.connect(self.WriteDataByID) |
| | | self.UI.pushButton_9.clicked.connect(self.StartCalibraiton) |
| | | self.UI.pushButton_11.clicked.connect(self.Calibraiton_Z) |
| | | self.UI.pushButton_13.clicked.connect(self.Calibraiton_M) |
| | |
| | | if data is not None and len(str(data[tempdid])): |
| | | self.UI.lineEdit_2.setText(str(data[tempdid]) + ' ') |
| | | |
| | | def WriteDataByID(self): |
| | | tempdid = DID_dic[self.UI.comboBox_6.currentText()] |
| | | writedata = self.UI.lineEdit_2.text() |
| | | try: |
| | | response = self.udsclient.write_data_by_identifier( |
| | | tempdid, writedata) |
| | | if response.positive: |
| | | values = response.service_data.values |
| | | except Exception as e: |
| | | g_signal.sig_Disp_str.emit(e) |
| | | |
| | | def communicationControl_req(self): |
| | | req = 0x00 |
| | | select = self.UI.comboBox_9.currentText() |