-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix/teleop stutter #76
base: master
Are you sure you want to change the base?
Conversation
…ferences to robotutils library. Updated to Mapbox 4.2.2
…en thumb is not moved enough to generate unique commands. Previous behavior was boat would eventually stop if joystick was held in a single position for too long. New behavior is boat will continue to move as long as a connection is maintained and the joystick is held in a non zero positon.
…op_stutter Lots of general cleanup. # Conflicts: # .idea/libraries/animated_vector_drawable_23_4_0.xml # .idea/libraries/appcompat_v7_23_4_0.xml # .idea/libraries/design_23_4_0.xml # .idea/libraries/lost_1_1_1.xml # .idea/libraries/recyclerview_v7_23_4_0.xml # .idea/libraries/support_vector_drawable_23_4_0.xml # app/build.gradle # app/src/main/AndroidManifest.xml # app/src/main/java/com/platypus/android/tablet/ConnectScreen.java # app/src/main/java/com/platypus/android/tablet/SettingsActivity.java # app/src/main/java/com/platypus/android/tablet/TeleOpPanel.java # app/src/main/res/drawable-hdpi/arrow.png # app/src/main/res/drawable-hdpi/ic_launcher.png # app/src/main/res/drawable-mdpi/arrow.png # app/src/main/res/drawable-mdpi/ic_launcher.png # app/src/main/res/drawable-xhdpi/ic_launcher.png # app/src/main/res/drawable-xxhdpi/ic_launcher.png # app/src/main/res/layout/maptest.xml # app/src/main/res/menu/loading_screen.xml # build.gradle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for fighting the good fight @christomaszewski
@@ -29,6 +29,7 @@ repositories { | |||
|
|||
android { | |||
compileSdkVersion 25 | |||
buildToolsVersion '25.0.2' | |||
buildToolsVersion "25.0.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line got duplicated for no reason.
@@ -457,13 +446,15 @@ public void run() { | |||
} | |||
case "Satellite Map": { | |||
if (mMapboxMap != null) { | |||
mMapboxMap.setStyle(Style.SATELLITE); | |||
mMapboxMap.setStyleUrl("mapbox://styles/mapbox/satellite-v9"); | |||
//mMapboxMap.setStyle(Style.SATELLITE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get rid of old comments.
|
||
mMapboxMap.setStyle(Style.MAPBOX_STREETS); //vector map | ||
mMapboxMap.setStyleUrl("mapbox://styles/mapbox/streets-v9"); | ||
//mMapboxMap.setStyle(Style.MAPBOX_STREETS); //vector map | ||
//mMapboxMap.setStyle(Style.SATELLITE_STREETS); //satalite | ||
//mMapboxMap.setMyLocationEnabled(true); //show current location |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get rid of unused comments.
} | ||
if (connected == false) { | ||
else if (!connected) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a boolean, you can just do else
instead of else if
. Or you can do a ternary like:
ipAddressBox.setBackgroundColor(connected ? Color.GREEN : Color.Red)
//if (currentBoat.getConnected() == true) | ||
{ | ||
if (old_thrust != thrustTemp || old_rudder!=rudderTemp) { | ||
//if (old_thrust != thrustTemp || old_rudder!=rudderTemp) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just get rid of these old comments. I have no idea what this is supposed to be doing but it looks like garbage.
@@ -2307,9 +2285,10 @@ public boolean isWaypointWithinDistance(LatLng a, LatLng b, double dist) | |||
// double distanceBetweenPoints = Math.sqrt(x+y); | |||
// //if (distanceBetweenPoints < dist)//0.0000449) | |||
if (a.distanceTo(b) <= dist) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can just be:
return a.distanceTo(b) <= dist;
@@ -2451,7 +2427,7 @@ public void run() { | |||
}); | |||
deleteWaypoint.setOnClickListener(new View.OnClickListener() { | |||
public void onClick(View v) { | |||
if (containsRegion == true) | |||
if (containsRegion) | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird bracket indent, pull back to end of last line.
Can we test and merge this into master? It should have fix issues Paul was experiencing in Mexico and Colombia. Also gets rid of the teleop stutter.