-
-
Notifications
You must be signed in to change notification settings - Fork 600
Support of multiple zones for app_zoned_cleaning #311
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
Changes from 17 commits
168a169
9133209
5b57e23
a379648
a3ef2f6
52d1a52
bd96404
ef88a0c
f60ceb3
3c48e1c
96c9500
a0f45dd
bb8c78c
d4c5bf7
8efc932
e84ae5b
8b646f4
8b30d2d
b024c99
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,8 +81,7 @@ def goto(self, x_coord: int, y_coord: int): | |
| """Go to specific target. | ||
| :param int x_coord: x coordinate | ||
| :param int y_coord: y coordinate""" | ||
| return self.send("app_goto_target", | ||
| [x_coord, y_coord]) | ||
| return self.send("app_goto_target", [x_coord, y_coord]) | ||
|
|
||
| @command( | ||
| click.argument("x1_coord", type=int), | ||
|
|
@@ -102,6 +101,30 @@ def zoned_clean(self, x1_coord: int, y1_coord: int, | |
| return self.send("app_zoned_clean", | ||
| [x1_coord, y1_coord, x2_coord, y2_coord, iterations]) | ||
|
|
||
| @command( | ||
| click.argument("x_coord", type=int), | ||
| click.argument("y_coord", type=int), | ||
| ) | ||
| def goto(self, x_coord: int, y_coord: int): | ||
| """Go to specific target. | ||
| :param int x_coord: x coordinate | ||
| :param int y_coord: y coordinate""" | ||
| return self.send("app_goto_target", | ||
| [x_coord, y_coord]) | ||
|
|
||
| @command( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. redefinition of unused 'zoned_clean' from line 86 |
||
| click.argument("zones"), | ||
| ) | ||
| def zoned_clean(self, zones: List): | ||
| """Cleans zoned areas. | ||
| :Enter a list of zones to clean: [[x1,y1,x2,y2, iterations],[x1,y1,x2,y2, iterations]] | ||
| :param int x1: x1 coordinate bottom left corner | ||
| :param int y1: y1 coordinate bottom left corner | ||
| :param int x2: x2 coordinate top right corner | ||
| :param int y2: y2 coordinate top right corner | ||
| :param int iterations: How many times the zone should be cleaned""" | ||
| return self.send("app_zoned_clean", zones) | ||
|
|
||
| @command() | ||
| def manual_start(self): | ||
| """Start manual control mode.""" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -197,6 +197,19 @@ def home(vac: miio.Vacuum): | |
| click.echo("Requesting return to home: %s" % vac.home()) | ||
|
|
||
|
|
||
| @cli.command() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. expected 2 blank lines, found 1 |
||
| @pass_dev | ||
| def goto(vac: miio.Vacuum): | ||
| """Going to target.""" | ||
| click.echo("Going to target : %s" % vac.goto()) | ||
|
|
||
|
|
||
| @cli.command() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. expected 2 blank lines, found 1 |
||
| @pass_dev | ||
| def zoned_clean(vac: miio.Vacuum): | ||
| """Cleaning zone(s).""" | ||
| click.echo("Cleaning zone(s) : %s" % vac.zoned_clean()) | ||
|
|
||
| @cli.group() | ||
| @pass_dev | ||
| # @click.argument('command', required=False) | ||
|
|
||
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.
redefinition of unused 'goto' from line 76