Skip to content

Commit 18eec88

Browse files
authored
Merge pull request #453 from srobo/fix/r-mode-type
2 parents 4fdec15 + 7d5066e commit 18eec88

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

programming/sr/index.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,17 @@ zone
6464
: The number of the zone that the robot is associated with. Between `0` and `3`.
6565

6666
mode
67-
: Either "comp" or "dev". When in a competition match, this will be "comp", and at all other times this will be "dev".
67+
: Whether the robot is running in competition mode.
68+
When in a competition match, this will be `RobotMode.COMP`, and at all other times this will be `RobotMode.DEV`.
69+
70+
~~~~~ python
71+
from sr.robot3 import *
72+
73+
R = Robot()
74+
75+
if R.mode == RobotMode.COMP:
76+
print("This is the competition!")
77+
~~~~~
6878

6979
usbkey
7080
: The path to the USB memory stick.

0 commit comments

Comments
 (0)