def setupFullCalibration(self): #ensure that there are no widgets in the deck when we start self.listOfCalibrationSteps = [] #load the first steps in the calibration process because they are always the same intro = Intro() self.listOfCalibrationSteps.append(intro) chooseKinematicsType = ChooseKinematicsType() self.listOfCalibrationSteps.append(chooseKinematicsType) vertDistGuess = VertDistToMotorsGuess() self.listOfCalibrationSteps.append(vertDistGuess) setTo12 = SetSprocketsVertical() self.listOfCalibrationSteps.append(setTo12) measureMotorDist = MeasureDistBetweenMotors() self.listOfCalibrationSteps.append(measureMotorDist) esw = EnterSledWeight() self.listOfCalibrationSteps.append(esw) chooseChainOverSprocketDirection = ChooseChainOverSprocketDirection() self.listOfCalibrationSteps.append(chooseChainOverSprocketDirection) reviewMeasurements = ReviewMeasurements() self.listOfCalibrationSteps.append(reviewMeasurements) computeCalibrationSteps = ComputeCalibrationSteps() computeCalibrationSteps.setupListOfSteps = self.addSteps self.listOfCalibrationSteps.append(computeCalibrationSteps)
def setupMeasureChainTolerances(self): ''' Calling this function sets up the process with the cards to measure the chain tolerances ''' #ensure that there are no widgets in the deck when we start self.listOfCalibrationSteps = [] #enter manual measurement of distance between motors enterDistanceBetweenMotors = EnterDistanceBetweenMotors() self.listOfCalibrationSteps.append(enterDistanceBetweenMotors) #enter manual measurement of distance between motors wipeOldCorrectionValues = WipeOldCorrectionValues() self.listOfCalibrationSteps.append(wipeOldCorrectionValues) #set to 12 setTo12 = SetSprocketsVertical() self.listOfCalibrationSteps.append(setTo12) #extend left chain and pull tight to measure measureOneChain = MeasureOneChain() measureOneChain.setDirection('L') self.listOfCalibrationSteps.append(measureOneChain) #set to 12 setTo12 = SetSprocketsVertical() self.listOfCalibrationSteps.append(setTo12) #extend right chain and pull tight to measure measureOneChain = MeasureOneChain() measureOneChain.setDirection('R') self.listOfCalibrationSteps.append(measureOneChain) #compute values computeChainCorrectionFactors = ComputeChainCorrectionFactors() self.listOfCalibrationSteps.append(computeChainCorrectionFactors) #finish finish = Finish() finish.done = self.done self.listOfCalibrationSteps.append(finish)
def setupJustChainsCalibration(self): ''' Calling this function sets up the calibration process to show just the steps to calibrate the chain lengths ''' #ensure that there are no widgets in the deck when we start self.listOfCalibrationSteps = [] #load steps setSprocketsVertical = SetSprocketsVertical() self.listOfCalibrationSteps.append(setSprocketsVertical) measureOutChains = MeasureOutChains() self.listOfCalibrationSteps.append(measureOutChains) finishSetChainLengths = FinishSetChainLengths() finishSetChainLengths.done = self.done self.listOfCalibrationSteps.append(finishSetChainLengths)
def on_Enter(self): ''' Called the first time the widget is created ''' App.get_running_app().data.calibrationInProcess = True #load steps setSprocketsVertical = SetSprocketsVertical() self.listOfCalibrationSteps.append(setSprocketsVertical) measureOutChains = MeasureOutChains() self.listOfCalibrationSteps.append(measureOutChains) finishSetChainLengths = FinishSetChainLengths() finishSetChainLengths.done = self.done self.listOfCalibrationSteps.append(finishSetChainLengths) self.loadStep(0)
def on_Enter(self): ''' Called the first time the widget is created ''' App.get_running_app().data.calibrationInProcess = True #generate the first two steps because they are always the same intro = Intro() self.listOfCalibrationSteps.append(intro) chooseKinematicsType = ChooseKinematicsType() self.listOfCalibrationSteps.append(chooseKinematicsType) vertDistGuess = VertDistToMotorsGuess() self.listOfCalibrationSteps.append(vertDistGuess) setTo12 = SetSprocketsVertical() self.listOfCalibrationSteps.append(setTo12) measureMotorDist = MeasureDistBetweenMotors() self.listOfCalibrationSteps.append(measureMotorDist) chooseChainOverSprocketDirection = ChooseChainOverSprocketDirection() self.listOfCalibrationSteps.append(chooseChainOverSprocketDirection) reviewMeasurements = ReviewMeasurements() self.listOfCalibrationSteps.append(reviewMeasurements) computeCalibrationSteps = ComputeCalibrationSteps() computeCalibrationSteps.setupListOfSteps = self.addSteps self.listOfCalibrationSteps.append(computeCalibrationSteps) self.loadStep(0)
def addSteps(self): ''' This function will be called when the ComputeCalibrationSteps step is reached. It will compute which steps are needed for a given frame configuration and add them to the list ''' if App.get_running_app().data.config.get('Advanced Settings', 'chainOverSprocket') == 'Top': #if we're using the top system no extra steps are needed pass else: #if we're using the bottom method we need to remove the chain now and put it back at 12 o'clock removeChains = RemoveChains() self.listOfCalibrationSteps.append(removeChains) setTo12 = SetSprocketsVertical() self.listOfCalibrationSteps.append(setTo12) if App.get_running_app().data.config.get('Advanced Settings', 'kinematicsType') == 'Triangular': #Put step with choice of Holey Calibration vs. Triangular Calibration ChoiceWid=ChooseHoleyOrTriangularCalibration() ChoiceWid.chooseHoleyCalibration=self.addHoleyCalibration ChoiceWid.chooseTriangularCalibration=self.addTriangularCalibration ChoiceWid.listOfCalibrationSteps=self.listOfCalibrationSteps ChoiceWid.done=self.done self.listOfCalibrationSteps.append(ChoiceWid) # #add rotation radius guess # rotationRadiusGuess = RotationRadiusGuess() # self.listOfCalibrationSteps.append(rotationRadiusGuess) # # #add extend chains # measureOutChains = MeasureOutChains() # self.listOfCalibrationSteps.append(measureOutChains) # # #add set z # adjustZCalibrationDepth = AdjustZCalibrationDepth() # self.listOfCalibrationSteps.append(adjustZCalibrationDepth) # # #add triangular kinematics # triangularCalibration = TriangularCalibration() # self.listOfCalibrationSteps.append(triangularCalibration) else: #add extend chains measureOutChains = MeasureOutChains() self.listOfCalibrationSteps.append(measureOutChains) #add set z adjustZCalibrationDepth = AdjustZCalibrationDepth() self.listOfCalibrationSteps.append(adjustZCalibrationDepth) #Ask for guess of attachment spacing distBetweenChainBrackets = DistBetweenChainBrackets() self.listOfCalibrationSteps.append(distBetweenChainBrackets) #Do quadrilateral test cut quadTestCut = QuadTestCut() self.listOfCalibrationSteps.append(quadTestCut) #one last review reviewMeasurements = ReviewMeasurements() self.listOfCalibrationSteps.append(reviewMeasurements) #add finish step finish = Finish() finish.done = self.done self.listOfCalibrationSteps.append(finish)
def addSteps(self): ''' This function will be called when the ComputeCalibrationSteps step is reached. It will compute which steps are needed for a given frame configuration and add them to the list ''' if App.get_running_app().data.config.get('Advanced Settings', 'chainOverSprocket') == 'Top': #if we're using the top system no extra steps are needed pass else: #if we're using the bottom method we need to remove the chain now and put it back at 12 o'clock removeChains = RemoveChains() self.listOfCalibrationSteps.append(removeChains) setTo12 = SetSprocketsVertical() self.listOfCalibrationSteps.append(setTo12) if App.get_running_app().data.config.get('Advanced Settings', 'kinematicsType') == 'Triangular': #add rotation radius guess rotationRadiusGuess = RotationRadiusGuess() self.listOfCalibrationSteps.append(rotationRadiusGuess) #add extend chains measureOutChains = MeasureOutChains() self.listOfCalibrationSteps.append(measureOutChains) #add set z adjustZCalibrationDepth = AdjustZCalibrationDepth() self.listOfCalibrationSteps.append(adjustZCalibrationDepth) #add triangular kinematics triangularCalibration = TriangularCalibration() self.listOfCalibrationSteps.append(triangularCalibration) else: #add extend chains measureOutChains = MeasureOutChains() self.listOfCalibrationSteps.append(measureOutChains) #add set z adjustZCalibrationDepth = AdjustZCalibrationDepth() self.listOfCalibrationSteps.append(adjustZCalibrationDepth) #Ask for guess of attachment spacing distBetweenChainBrackets = DistBetweenChainBrackets() self.listOfCalibrationSteps.append(distBetweenChainBrackets) #Do quadrilateral test cut quadTestCut = QuadTestCut() self.listOfCalibrationSteps.append(quadTestCut) #App.get_running_app().data.message_queue.put("Message: You have chosen a configuration which is not currently supported by the calibration process. Check back soon") #self.done() #one last review reviewMeasurements = ReviewMeasurements() self.listOfCalibrationSteps.append(reviewMeasurements) #add finish step finish = Finish() finish.done = self.done self.listOfCalibrationSteps.append(finish)