void Camera::moveOrientation() { glm::vec3 oldOrientation = orientation_; if (input_.isMouseMoving()) { orientate(input_.mouseXRel(), input_.mouseYRel()); } if (input_.oculus()->isMoving()) { if (input_.oculus()->isUsingDebugHmd()) { float x = input_.mouseXRel(); float y = input_.mouseYRel(); spdlog::get("console")->debug() << "Oculus is moving (debug): x = " << x << ", y = " << y; orientate(x, y); } else { spdlog::get("console")->debug() << "dAngle x: " << input_.oculus()->dAngles().x; float xRad = Utils::radToDegree(input_.oculus()->dAngles().x); float yRad = Utils::radToDegree(input_.oculus()->dAngles().y); spdlog::get("console")->info() << "Oculus is moving (real): xRad = " << xRad << ", yRad = " << yRad; orientate( - xRad, - yRad); } } if (oldOrientation != orientation_) { spdlog::get("console")->debug() << "Move camera orientation from " << Utils::toString(oldOrientation) << " to " << Utils::toString(orientation_); } }
int main(void) { initialize(); int prog=0, bool_=1; led_on(); delay_ms(200); led_off(); delay_ms(200); led_on(); delay_ms(200); led_off(); delay_ms(200); print_string("Start Up"); next_line(); print_string("Select a Prog"); delay_ms(1500); clear_screen(); while(bool_){ print_string("prog " ); print_int(prog); delay_ms(500); if(get_sw1()==257) { prog++; //if(prog>10); // prog=0; } else bool_=0; clear_screen(); } clear_screen(); print_string("Ready" ); next_line(); print_string("Prog " ); print_int(prog); print_string(" Selected"); delay_ms(2000); clear_screen(); if(prog==1) { orientate(); /* print_string("Collection"); one_row(); deposite(); clear_screen(); print_string("DONE"); forward(0);*/ } else if(prog==0) { print_string("sensor test"); delay_ms(500); clear_screen(); while(1) { forward(100); if(digital(0)==1) { break; } } clear_screen(); print_string("DONE"); reverse(0, 1000); //stop(); } else if(prog==2) { print_string("ATTACK"); forward(100); //swing_left(100,250); clear_screen(); print_string("DONE"); return 0; //return code? } return 0; }