-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add standalone operational mode #17
Conversation
Testing checklist:
|
@@ -194,7 +194,7 @@ void svSynchronize() { | |||
// HELLO message! | |||
kwait(50); | |||
print("\r\nPowered by PROS " FW_VERSION "\r\n" FW_DISCLAIMER | |||
"\r\nPROS (C)2011-2014 Purdue ACM SIGBOTS\r\n"); | |||
"\r\nPROS (C)2011-2017 Purdue ACM SIGBOTS\r\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's not strictly related, but while we're here and editing supervisor.c
...
Standalone mode no longer interacts with the spi communication at its initialization phase but instead changes the mode flag during its normal communication in the initializeIO() routine. Update the API header to point out that the Cortex will run the operator control task when in standalone mode.
- Re-added synchronization of the supervisor in svSynchronize - Simplified logic for setting the standalone mode flag
src/supervisor.c
Outdated
@@ -137,7 +137,9 @@ void _svNextByte() { | |||
|
|||
// standaloneModeEnable - enable standalone operation | |||
void standaloneModeEnable() { | |||
svInitFlags = 0x1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This didn't work because svInit runs before initIO, so the actual TX SPI buffer never gets updated.
The final version of this feature implements standalone mode by setting a flag in the outgoing SPI communication buffer between the user and master processors to specify to the master processor that the controller should run in standalone mode. Because this process occurs during the Succesful test cases include:
|
@baylessj, can you test no standalone mode with a joystick (one of USB A-A or VEXNet - don't care which) |
Bonus points if you test them both |
To test, extract the files to |
// standaloneModeEnable - enable standalone operation | ||
void standaloneModeEnable() { | ||
// set flag in outgoing SPI buffer to enable standlone mode | ||
SV_OUT->flags |= 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we aware currently of what the remaining bits of this flags
byte (I assume it to be uint8_t
) do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we'll have to take a look at the other bit values during the fall semester.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got a thumbs up from a user, changes make sense and look good. We'll do another PR to release 2.12.0
This needs testing. I had a dubious rig set up, but then I lost the toolchain. Oh 🐳.