-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The app now has a start activity where setting can be launched or a flight path may be created. The setting screen displays the IP addresses for two physical drones for live demonstration as well as specify the IP address for the simulator and the number of drones to simulate in flight. The map screen allows the user to create either a line or shape flight path that the drone(s) will follow as a mission. From here an arraylist is created that stores the latitude-longitude coordinates of the points along the shape that will be passed on to the rest of the program. Upon completion the Go command launches a screen where the user will select either simulation or live drones for execution. At this point the user is returned to the map screen to watch the results as they occur.
- Loading branch information
Russell Folk
committed
Nov 10, 2014
1 parent
3bae671
commit b59aca0
Showing
14 changed files
with
550 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
app/src/main/java/guru/clevercoder/dronefleet/GoScreen.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package guru.clevercoder.dronefleet; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.Button; | ||
|
||
/** | ||
* Created by russell on 11/9/14. | ||
*/ | ||
public class GoScreen extends Activity implements View.OnClickListener | ||
{ | ||
private Button startLive; | ||
private Button startSim; | ||
|
||
@Override | ||
public void onCreate ( Bundle savedInstanceState ) | ||
{ | ||
super.onCreate( savedInstanceState ); | ||
setContentView( R.layout.go_screen ); | ||
startLive = ( Button ) findViewById( R.id.btn_real ); | ||
startLive.setOnClickListener( this ); | ||
startSim = ( Button ) findViewById( R.id.btn_simulator ); | ||
startSim.setOnClickListener( this ); | ||
} | ||
|
||
@Override | ||
public void onClick ( View view ) | ||
{ | ||
Intent intent; | ||
switch ( view.getId() ) | ||
{ | ||
case R.id.btn_real: | ||
intent = new Intent( this, MapScreen.class ); | ||
startActivity( intent ); | ||
finish(); | ||
break; | ||
case R.id.btn_simulator: | ||
intent = new Intent( this, MapScreen.class ); | ||
startActivity( intent ); | ||
finish(); | ||
break; | ||
} | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
app/src/main/java/guru/clevercoder/dronefleet/MainScreen.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package guru.clevercoder.dronefleet; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.Button; | ||
|
||
/** | ||
* Created by russell on 11/9/14. | ||
*/ | ||
public class MainScreen extends Activity implements View.OnClickListener | ||
{ | ||
Button flightPath; | ||
Button settings; | ||
|
||
@Override | ||
protected void onCreate ( Bundle savedInstanceState ) | ||
{ | ||
super.onCreate( savedInstanceState ); | ||
setContentView( R.layout.main_screen ); | ||
flightPath = ( Button ) findViewById( R.id.btn_flightPath ); | ||
flightPath.setOnClickListener( this ); | ||
settings = ( Button ) findViewById( R.id.btn_settings ); | ||
settings.setOnClickListener( this ); | ||
} | ||
|
||
@Override | ||
public void onClick ( View view ) | ||
{ | ||
Intent intent; | ||
switch ( view.getId() ) | ||
{ | ||
case R.id.btn_flightPath: | ||
intent = new Intent( this, MapScreen.class ); | ||
startActivity( intent ); | ||
finish(); | ||
break; | ||
case R.id.btn_settings: | ||
intent = new Intent( this, SettingsScreen.class ); | ||
startActivity( intent ); | ||
finish(); | ||
break; | ||
} | ||
} | ||
} |
Oops, something went wrong.