⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vistest.cc

📁 该文件是包含了机器人足球比赛中的整个系统的代码
💻 CC
字号:
#include "VisTest.h"

// Test to see if the modified vision transform works properly (-CM).
VisTest::VisTest() {
  currentTiltBig = 0;
  currentTiltSmall = 15;
  currentPan = 80;
  index = 0;
  leftSwing = true;
}

void VisTest::NewReadyModel() {
  if (currentPan > 79 && !leftSwing) {
    index++;
    currentPan = 79;
    leftSwing = true;
  }

  if (index == 0) {
    currentTiltBig = 0;
    currentTiltSmall = 15;
  } else if (index == 1) {
    currentTiltBig = -20;
    currentTiltSmall = 15;
  } else if (index == 2) {
    currentTiltBig = -20;
    currentTiltSmall = 0; 
  } else if (index == 3) {
    currentTiltBig = 0;
    currentTiltSmall = 25;
  } else {
    return;
  }
  if (leftSwing) currentPan-=1.5;
  else currentPan+=1.5;
  if (currentPan < -79 && leftSwing) leftSwing = false;
  Utilities utils;
  utils.Head_MoveTo(currentTiltBig, currentPan, currentTiltSmall);
}


void VisTest::NewPlayingModel() {
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -