Skip to content
This repository has been archived by the owner on Jan 31, 2019. It is now read-only.

Emulate competition switch using CLI #31

Open
ItsMurf opened this issue Mar 5, 2017 · 5 comments
Open

Emulate competition switch using CLI #31

ItsMurf opened this issue Mar 5, 2017 · 5 comments

Comments

@ItsMurf
Copy link

ItsMurf commented Mar 5, 2017

Expected Behavior: Competition Switch through Command Line Interface.

Actual Behavior: Non.

Steps to reproduce:

System information:

Operating System: (Windows, OS X, Ubuntu)

PROS Version: (run pros --version)

Additional Information

I am not sure if this is already a feature, if it is in development, or whatever the case is, I just thought that Pros should be able to start and stop autonomous programs to the robot from the CLI. One example program with this capability is seen in EasyC.

Screenshots/Output Dumps/Stack Traces

@HotelCalifornia
Copy link
Contributor

As discussed internally, this suggestion is different from the ability to flash to the cortex while it is connected to a physical competition switch. Rather, this suggestion seems to seek the ability to emulate the competition switch using CLI commands.

@brenapp
Copy link

brenapp commented Apr 28, 2017

I would love to see support for this! Is this a currently developing feature?

@pingbird
Copy link
Collaborator

I suggest implementing a general command system using a special character for the PROS kernel and CLI to communicate

This would allow automatic fault reporting https://github.com/purduesigbots/pros/issues/2

But RN you can easily just have a background task fread stdin, I prefer testing auton using an LCD though.

@HotelCalifornia HotelCalifornia changed the title Competition Switch through CLI - Suggestion Emulate competition switch using CLI Jun 27, 2017
@HotelCalifornia
Copy link
Contributor

we should look into this again following purduesigbots/pros#17

@edjubuh
Copy link
Member

edjubuh commented Jun 30, 2017

Thoughts: what if we add a task that runs only if field control isn't connected - i.e.: https://github.com/purduesigbots/pros/blob/master/src/invoke.c#L68

So opcontrol and this other user-registered task would start up. You'd register it in initIO as something to the effect of invokeOfflineTask(&myControllingFunction) which wouldn't have any particularly special abilities except you could program some logic to control the opcontrol/autonomous tasks. We can provide a template for simulating a competition through a time based control and a template for controlling via the terminal (type 'auto' + enter to invoke the auto task, etc.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants