Skip to content

Commit

Permalink
Merge pull request #275 from MelbourneHighSchoolRobotics/quick_fix
Browse files Browse the repository at this point in the history
Ensure we check the correct script for bot loading.
  • Loading branch information
glipR authored Jun 1, 2021
2 parents 39e3e0f + 2a22259 commit 3340b72
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ev3sim/visual/menus/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ def playSim(self, preset):
bot_config = yaml.safe_load(f)
if not BotValidator.validate_json(bot_config):
to_remove.append(index)
fname = bot_config.get("script", "code.py")
if bot_config.get("type", "python") == "python":
fname = bot_config.get("script", "code.py")
else:
fname = bot_config.get("script", "program.ev3")
if not os.path.exists(os.path.join(find_abs(sim_config["bots"][index], bot_locations()), fname)):

def action():
Expand Down

0 comments on commit 3340b72

Please sign in to comment.