/*
  電源を入れてからの情報を表示
  Satofumi KAMIMURA
  $Id: noResetPos.cpp 286 2008-10-20 09:40:22Z satofumi $
*/

#include "runCtrl.h"
#include <cstdio>
#include <cstdlib>

using namespace VXV;


int main(int argc, char *argv[]) {
  try {
    RunCtrl run;
    if (run.connect(argc, argv) < 0) {
      printf("RunCtrl::connect: %s\n", run.what());
      exit(1);
    }

    run.servoCtrl(false);
    for (int i = 0; i < 10; ++i) {
      VXV::Position pos = run.getNoResetRunPosition();
      printf("%d, %d, %d\n", pos.x, pos.y, pos.zt.to_deg());
      VXV::Delay(1000);
    }

  } catch (std::exception& e) {
    printf("exception: %s\n", e.what());
  }
  return 0;
}
