Last active
February 28, 2022 20:01
-
-
Save raacampbell/aefbd345f1fe94282848a46f58f6a83f to your computer and use it in GitHub Desktop.
Test swipe moves in BT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function swipeTester | |
% Test if BakingTray swipe moves are causing a failure | |
% How large the swipe size should be. | |
swipeSize = 4; | |
% Pull in BT object | |
evalin('base','clear ans') %Because it sometimes makes a copy of BT in ans when it fails | |
hBT=BakingTray.getObject(true); | |
fprintf('Go to stage zero\n') | |
hBT.moveXYto(0,0) | |
fprintf('First swipe move\n') | |
hBT.moveXYby(0,swipeSize, 1, 0.3,1); %swipe (with 1 second time-out) | |
fprintf('ENTERING SWIPE LOOP: PRESS ctrl-C to quit') | |
n = 1; | |
while 1 | |
fprintf('Double size move %d\n', n+1) | |
swipeSize = swipeSize*-1; | |
hBT.moveXYby(0,swipeSize*2, 1, 0.3, 1); %swipe (with 1 second time-out) | |
n=n+1; | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment