Skip to content

Commit

Permalink
fix: updates sample to use sc_status() method.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuckya committed May 19, 2023
1 parent 35cd5ca commit 7c48171
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/python/cp_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def main():
while True:
cp.refresh()

if (count % 100) == 99 and cp.is_sc_active(PD_0):
if (count % 100) == 99 and bool(cp.sc_status() & 1 << PD_0):
# send a random command to the PD_0
r = random.randint(PD_0, len(commands)-1)
cp.send_command(PD_0, commands[r])
Expand Down

0 comments on commit 7c48171

Please sign in to comment.