-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature_ir_update' into integrate-feature-continuousrun…
…-remoteupdate
- Loading branch information
Showing
4 changed files
with
202 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
""" | ||
CLI for updating device over IR or UART. | ||
""" | ||
|
||
import click | ||
|
||
from miniscope_io.device_update import DevUpdate | ||
|
||
|
||
@click.command() | ||
@click.option( | ||
"-p", | ||
"--port", | ||
required=False, | ||
help="Serial port to connect to. Needed if multiple FTDI devices are connected.", | ||
) | ||
@click.option( | ||
"-i", | ||
"--device_id", | ||
required=False, | ||
default=0, | ||
type=int, | ||
help="ID of the device to update. 0 will update all devices.", | ||
) | ||
@click.option( | ||
"-t", | ||
"--target", | ||
required=True, | ||
type=click.Choice(["LED", "GAIN", "ROI_X", "ROI_Y"]), | ||
help="Target to update", | ||
) | ||
@click.option("-v", "--value", required=True, type=int, help="Value to set") | ||
def update(port: str, target: str, value: int, device_id: int) -> None: | ||
""" | ||
Update device configuration. | ||
""" | ||
DevUpdate(port=port, target=target, value=value, device_id=device_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters