Skip to content

Commit de42798

Browse files
authored
Merge pull request #134 from robotpy/run-romi-xrp
Update ROMI/XRP examples to use run-romi/run-xrp
2 parents 8a658b0 + 2b914c4 commit de42798

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

RomiReference/robot.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,29 @@
2222
# Run the program
2323
# ---------------
2424
#
25-
# To run the program you will need to explicitly use the ws-client option:
25+
# Use the dedicated ROMI command:
2626
#
2727
# # Windows
28-
# py -3 robotpy sim --ws-client
28+
# py -3 -m robotpy run-romi
2929
#
3030
# # Linux/macOS
31-
# python robotpy sim --ws-client
31+
# python -m robotpy run-romi
32+
#
33+
# If your ROMI isn't at the default address, use --host/--port:
34+
#
35+
# python -m robotpy run-romi --host 10.0.0.2 --port 3300
3236
#
3337
# By default the WPILib simulation GUI will be displayed. To disable the display
34-
# you can add the --nogui option
38+
# you can add the --nogui option.
3539
#
3640

37-
import os
3841
import typing
3942

4043
import wpilib
4144
import commands2
4245

4346
from robotcontainer import RobotContainer
4447

45-
# If your ROMI isn't at the default address, set that here
46-
os.environ["HALSIMWS_HOST"] = "10.0.0.2"
47-
os.environ["HALSIMWS_PORT"] = "3300"
48-
4948

5049
class MyRobot(commands2.TimedCommandRobot):
5150
"""

XrpReference/robot.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,29 @@
2222
# Run the program
2323
# ---------------
2424
#
25-
# To run the program you will need to explicitly use the XRP option:
25+
# Use the dedicated XRP command:
2626
#
2727
# # Windows
28-
# py -3 robotpy sim --xrp
28+
# py -3 -m robotpy run-xrp
2929
#
3030
# # Linux/macOS
31-
# python robotpy sim --xrp
31+
# python -m robotpy run-xrp
32+
#
33+
# If your XRP isn't at the default address, use --host/--port:
34+
#
35+
# python -m robotpy run-xrp --host 192.168.42.1 --port 3540
3236
#
3337
# By default the WPILib simulation GUI will be displayed. To disable the display
34-
# you can add the --nogui option
38+
# you can add the --nogui option.
3539
#
3640

37-
import os
3841
import typing
3942

4043
import wpilib
4144
import commands2
4245

4346
from robotcontainer import RobotContainer
4447

45-
# If your XRP isn't at the default address, set that here
46-
os.environ["HALSIMXRP_HOST"] = "192.168.42.1"
47-
os.environ["HALSIMXRP_PORT"] = "3540"
48-
4948

5049
class MyRobot(commands2.TimedCommandRobot):
5150
"""

0 commit comments

Comments
 (0)