-
Notifications
You must be signed in to change notification settings - Fork 65
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
Reintroduction of centering to GPS when starting to record new feature #3509
Conversation
Pull Request Test Coverage Report for Build 9501693256Details
💛 - Coveralls |
2 similar comments
Pull Request Test Coverage Report for Build 9501693256Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9501693256Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9503484819Details
💛 - Coveralls |
2 similar comments
Pull Request Test Coverage Report for Build 9503484819Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9503484819Details
💛 - Coveralls |
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 is looking good, thanks @VitorVieiraZ 🚀
@uclaros can I ask you to have a look at this PR too? You were adjusting the centering logic recently :)
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.
What should the behavior be if location is not available yet? Just a message or should the map jump as soon as a location is available?
What should happen if the user moves before clicking record?
My take on those is that we should be setting MMMapController.centerToGPS = true
, which means we get the green dot on the GPS button plus map position is updated when location is updated.
recordingMapTool.centeredToGPS
seems to be bound to that so should be updated.
Pull Request Test Coverage Report for Build 9519440944Details
💛 - Coveralls |
2 similar comments
Pull Request Test Coverage Report for Build 9519440944Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9519440944Details
💛 - Coveralls |
This comment was marked as outdated.
This comment was marked as outdated.
2 similar comments
Pull Request Test Coverage Report for Build 9522267694Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9522267694Details
💛 - Coveralls |
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.
Let's update the code as we discussed
Pull Request Test Coverage Report for Build 9550028458Details
💛 - Coveralls |
2 similar comments
Pull Request Test Coverage Report for Build 9550028458Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9550028458Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9567578009Details
💛 - Coveralls |
2 similar comments
Pull Request Test Coverage Report for Build 9567578009Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9567578009Details
💛 - Coveralls |
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.
Hi @uclaros, can you check once again please? It looks good to me. There is one change of logic - updatePosition()
is now called after we change the state, not before. However, I could not think of a scenario where this would be an issue
app/qml/map/MMMapController.qml
Outdated
if ( __appSettings.autolockPosition ) { // center to GPS | ||
if ( gpsStateGroup.state === "unavailable" ) { | ||
__notificationModel.addError( "GPS currently unavailable." ) | ||
return; | ||
} |
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.
We completely disable recording when GPS is unavailable and autolock is on?
In that case maybe we should also handle the case when GPS is lost while recording?
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.
Good point, no, we need to continue even without GPS signal
app/qml/map/MMMapController.qml
Outdated
// We call this first because when previous state is 'view' and `centeredToGPS` is true | ||
// the map may still not be centered. It's only centered after a certain threshold is exceeded. | ||
updatePosition() |
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 comment is no longer true: we don't call this first, we actually call this last!
Does that mean we'll get a first point when root.recordingStarted()
is called which may not be on the actual GPS position?
Why not call updatePosition()
right after root.centeredToGPS = true
?
__notificationModel.addError( "GPS currently unavailable." ) | ||
} | ||
else { | ||
root.centeredToGPS = true |
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 we moved this out of the GPS availability check, does it mean the map would re-center as soon as gps position is actually available? If yes, that could be useful, but I'm OK with merging it as it is now!
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.
In this scenario, it would center even if the user decides to uncheck "auto-lock" property in recording settings.
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.
No, I mean like:
if ( __appSettings.autolockPosition ) { // center to GPS
root.centeredToGPS = true
if ( gpsStateGroup.state === "unavailable" ) {
__notificationModel.addError( "GPS currently unavailable." )
}
else {
updatePosition()
}
}
Unrelated test failure |
newGpsCenteringFeature.1.mp4
Development and functionality of the feature based on: #3506
Resolves #3506