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

[miio] improve viewer with coordinates #8168

Merged
merged 5 commits into from
Aug 20, 2020
Merged

Conversation

marcelrv
Copy link
Contributor

Print coordinates to allow finding the room clean details

Signed-off-by: Marcel Verpaalen marcel@verpaalen.com

Print coordinates to allow finding the room clean details

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
@marcelrv marcelrv requested a review from cpmeister July 21, 2020 20:07
@marcelrv marcelrv added the enhancement An enhancement or new feature for an existing add-on label Jul 21, 2020
@marcelrv
Copy link
Contributor Author

@TravisBuddy
Copy link

Travis tests have failed

Hey @marcelrv,
please read the following log in order to understand the failure reason. There might also be some helpful tips along the way.
It will be awesome if you fix what is wrong and commit the changes.

for (int i = 0; i < area.length; i++) {
pw.printf("\t%.1f", area[i]);
}
pw.print("\r\n");
Copy link
Member

Choose a reason for hiding this comment

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

I think you should not directly write new lines, Just as done above use:

Suggested change
pw.print("\r\n");
pw.println();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, agree. done

@@ -299,6 +300,16 @@ public String toString() {
return sw.toString();
}

private void printAreaDetails(ArrayList<float[]> areas, PrintWriter pw) {
areas.forEach(area -> {
pw.printf("\tArea details:");
Copy link
Member

Choose a reason for hiding this comment

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

If there are more areas does it make sense to include some information about what area these details are about. With your change you would get several generic "Area details" printed next to each other.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Improved the text slightly to make it area coordinates to give hint on what the numbers are.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

btw, in each case, just before this is called, it prints out the area type.

No Go zones:	2
	Area coordinates:	356.0	218.0	340.0	218.0	340.0	207.0	356.0	207.0
	Area coordinates:	329.0	222.0	321.0	222.0	321.0	205.0	329.0	205.0
Walls:	1
	Area coordinates:	274.0	363.0	273.0	291.0
Zones:	0

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
@TravisBuddy
Copy link

Travis tests have failed

Hey @marcelrv,
please read the following log in order to understand the failure reason. There might also be some helpful tips along the way.
It will be awesome if you fix what is wrong and commit the changes.

@marcelrv marcelrv requested a review from Hilbrand July 24, 2020 21:41
Copy link
Member

@Hilbrand Hilbrand left a comment

Choose a reason for hiding this comment

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

LGTM

@marcelrv marcelrv requested a review from fwolter August 10, 2020 12:35
@fwolter
Copy link
Member

fwolter commented Aug 10, 2020

@Hilbrand can this be merged?

Further calculation of the goto coordinates to be used for zone cleaning

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
@TravisBuddy
Copy link

Travis tests were successful

Hey @marcelrv,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

* Parser prints real coordinates (robot,goto, zones etc)
* Offline viewer provides zone clean command
* Offline viewer provides goto command
* Offline viewer provides coordinates on mouseover

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
@TravisBuddy
Copy link

Travis tests were successful

Hey @marcelrv,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
@TravisBuddy
Copy link

Travis tests were successful

Hey @marcelrv,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@fwolter fwolter merged commit 15981a8 into openhab:2.5.x Aug 20, 2020
@fwolter fwolter added this to the 2.5.8 milestone Aug 20, 2020
taboneclayton pushed a commit to taboneclayton/openhab-addons that referenced this pull request Aug 23, 2020
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
Signed-off-by: Clayton Tabone <taboneclayton@gmail.com>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this pull request Sep 1, 2020
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
Signed-off-by: Daan Meijer <daan@studioseptember.nl>
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Sep 12, 2020
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
@marcelrv marcelrv deleted the miio-mapview branch December 6, 2021 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants