Skip to content

Commit

Permalink
Command line args (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackerman342 authored Feb 1, 2023
1 parent 4ed89a6 commit 67c65f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

$DIR/bootstrap.sh $DIR $DIR/venv

$DIR/venv/bin/python $DIR/src/main.py --port 50051
$DIR/venv/bin/python $DIR/src/main.py $@ --port 50051

exit 0
4 changes: 2 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async def stream_camera(self, client: OakCameraClient) -> None:

# Create the stream
if response_stream is None:
response_stream = client.stream_frames(every_n=1)
response_stream = client.stream_frames(every_n=self.stream_every_n)

try:
# try/except so app doesn't crash on killed service
Expand Down Expand Up @@ -146,7 +146,7 @@ async def stream_camera(self, client: OakCameraClient) -> None:
"--address", type=str, default="localhost", help="The camera address"
)
parser.add_argument(
"--stream-every-n", type=int, default=4, help="Streaming frequency"
"--stream-every-n", type=int, default=1, help="Streaming frequency"
)
args = parser.parse_args()

Expand Down

0 comments on commit 67c65f8

Please sign in to comment.