void login(String Rov_ip, String Rov_user, String Rov_password) { string Rovio_ip; string username; string password; Rovio_ip = "http://" + Rov_ip; username = Rov_user; password = Rov_password; string Rovio_streamIP = Rov_ip; try { Rovio.Robot robot = new Rovio.Robot(Rovio_ip, username, password); var activity2 = new Intent(this, typeof(Activity1)); activity2.PutExtra("IP", Rovio_ip); activity2.PutExtra("Stream IP", Rovio_streamIP); activity2.PutExtra("Username", username); activity2.PutExtra("Password", password); StartActivity(activity2); } catch (Exception e) { DisplayAlert("Error", "Connection Failed, Rovio may be offline or incorrect login details may of been entered.", "OK"); } }
/// <summary> /// The constructor. /// </summary> /// <param name="_robot"></param> public Camera(Robot _robot) : base(_robot) { head_position = Rovio.API.Camera.HeadPosition.DOWN; resolution = Rovio.API.Camera.ImageResolution.CGA; image_compression = Rovio.API.Camera.ImageCompression.LOW; flicker_frequency = Rovio.API.Camera.CameraFlickerFrequency.AUTO; brightness = 0; framerate = 0; }
/// <summary> /// The constructor. /// </summary> public Odometry(Robot _robot) : base(_robot) { left_ticks = 0; right_ticks = 0; rear_ticks = 0; }
/// <summary> /// The constructor. /// </summary> public NavigationSensor(Robot _robot) : base(_robot) { x = 0; y = 0; theta = 0; signal_strength = 0; }
/// <summary> /// The constructor. /// </summary> public IRSensor(Robot _robot) : base(_robot) { power_on = false; detection = false; }
/// <summary> /// The constructor. /// </summary> public Drive(Robot _robot) : base(_robot) { }
/// <summary> /// The constructor. /// </summary> public Component(Robot _robot) { robot = _robot; }