import Pass as p if __name__ == '__main__': # There are five different functions for uploading and download calibration to and from files: # updateCalibrationsInFile - Update calibration parameters in a parameter file # uploadCalibrationsToFileAll - Upload all calibration parameters in ECU to file # uploadCalibrationsToFileSelected - Upload a selection of calibration parameters in ECU to file # downloadCalibrationFromFile - Download all calibration parameters in a file to ECU # downloadCalibrationsFromFileSelected - Download a selection of calibration parameters in a file to ECU # # Both CDFX and DCM file formats are supported. # Note that A2L filename needs to be a raw string if it contains backslash # Empty string for device to connect through => Use first found physical device p.addXcpEcu("eps", r"C:\Repos\sumac\Test\G001_1_GTT_SinX3\G001_1_GTT.a2l", p.XcpConnectionType.XCP_CAN_CLASSIC, "") print("Connecting to ECU...") p.connectToXcpEcus() print("Uploading all to DCM...") p.uploadCalibrationsToFileAll("eps", r'C:\tmp\upload.dcm', p.PageType.WORKING) # Can upload from reference page as well. print("Uploading all to CDFX...") p.uploadCalibrationsToFileAll("eps", r'C:\tmp\upload.cdfx', p.PageType.WORKING) print("Uploading some calibration parameters to CDFX...") p.uploadCalibrationsToFileSelected("eps", r'C:\tmp\upload_selected.cdfx', ['T_SinA_AmpMap', 'T_SinA_AmpMapXAxisInput'], p.PageType.WORKING) p.disconnectFromAllXcpEcus()