-
Notifications
You must be signed in to change notification settings - Fork 665
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
nit(rename): Renames the encoded live speed properties #2998
Conversation
to make it clear that the raw values are usually not what you want. They are not measured in kph, but have on several occasions been used in that way due to the non-obvious naming. This rename adds `encoded_` to the speed properties to make it clearer that the value within may not be what you actually want. There already are getter-functions defined which should be preferred in most use-cases
5a42928
to
818db24
Compare
valhalla/baldr/traffictile.h
Outdated
} | ||
|
||
json::MapPtr json() const volatile { | ||
auto live_speed = json::map({}); | ||
if (speed_valid()) { | ||
live_speed->emplace("overall_speed", static_cast<uint64_t>(get_overall_speed())); | ||
live_speed->emplace("overall_encoded_speed", static_cast<uint64_t>(get_overall_speed())); |
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 one isn't encoded, it's accessed via the getter
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.
its also a breaking change to the locate API so we probably shouldnt change it
@purew was the pybind update on purpose? |
Nope! Mistake, one sec. |
@kevinkreiser @danpat any last thoughts on this? |
@purew just needs a changelog entry :-) |
to make it clear that the raw values are usually not what you want.
They are not measured in kph, but have on several occasions been
used in that way due to the non-obvious naming.
This rename adds
encoded_
to the speed properties to make itclearer that the value within may not be what you actually want.
There already are getter-functions defined which should be preferred
in most use-cases