Skip to content
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

Make all the configuration objects have nicer toString values #348

Merged
merged 1 commit into from Mar 2, 2019

Conversation

ansman
Copy link
Contributor

@ansman ansman commented Feb 21, 2019

Previously doing Flash.Off.toString() would return something like io.fotoapparat.parameter.Flash$Off@a486ccc, now it will return Flash.Off.


/**
* The camera can only support a variable zoom level between (and including) 0 and [maxZoom] values.
* [zoomRatios] is a list of all zoom values. Ratios are in 1/100 increments. For example, zoom of
* 2.7x is returned as 270. The number of elements is [maxZoom] + 1. List is sorted from small to
* large. First element is always 100. The last element is the zoom ratio of the maximum zoom value.
*/
data class VariableZoom(val maxZoom: Int, val zoomRatios: List<Int>) : Zoom()
data class VariableZoom(val maxZoom: Int, val zoomRatios: List<Int>) : Zoom() {
override fun toString(): String = "Zoom.VariableZoom(maxZoom=$maxZoom, zoomRatios=$zoomRatios)"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes so that it can keep the standard of doing <parent>.<child>, the default data class implementation does not do this.

@Diolor Diolor merged commit b1f6f49 into RedApparat:master Mar 2, 2019
@Diolor
Copy link
Member

Diolor commented Mar 2, 2019

Thanks!

@ansman ansman deleted the feature/object-toString branch March 2, 2019 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants