Project Process/KRC-FTC (Team TC(5031, 5048))
[FTC] FTC block programming (3) - 파일 저장 + Tip (확실한 정지방법)
DrawingProcess
2020. 1. 21. 00:47
반응형
saving & running
- 1. Save Op Mode 클릭!
- 2. Driver Station의 left : autonomous, right : teleop 선택 후 실행하고 싶은 name 선택.
- 3. init 후 play
using saving flie (saving early, saving often)
- 1. flie name 앞의 select box 선택 후 Download Selected Op Mode.(내 파일 백업)
- 2. Upload Op mode에서 flie select 후 open.(다른 사람 파일 upload)
Ensuring STOP!!!! (If a stop is pressed during operation, the robot continues to act without stopping, causing damage to the motor.)
- 1. repeat until value 2가지 조건을 or 연산자로 묶어 약간의 term을 두어 stop!
- 1) call (fileName).isStopRequested
- 2) (call (fileName).getRuntime - StartTime) > 3
- + StartTime는 변수! [set StartTime to (call (fileName).getRuntime)]
- 2. repeat until do 내부에는, 즉 loop문 내에는 아무것도 없어도 됨.
- + if 정지버튼을 눌렀을 때 앞으로 가다가 갑자기 뒤로 이동한다면? set up(전처리)를 제외한 모든 block을 if not call (fileName).isStopRequested를 만든 후 내부에 넣기.
- + if 정지버튼을 눌렀을 때 target position에 도달하기 위해 멈추지 않는다면? until에 조건으로 넣었던 not call (motorName).isBusy and ~를 다시 or의 한 인수로 넣고 다른 인수로 call (fileName).isStopRequested를 넣기.
- -> opModelsActive is False(True) when StopRequested is True(False).
참고 : https://www.youtube.com/playlist?list=PLEuGrYl8iBm4A4yrRcatGcK7q0od0LYov
Blocks Tutorials - YouTube
www.youtube.com
반응형