Embassy ERS#18
Open
wjeffreys96 wants to merge 78 commits into
Open
Conversation
create feature flags to manage can ids between images
Ers embassy motorfix
This wrapper around the motor pins and the dac allows for much simpler and less verbose interaction with the peripherals related to the motors. Instead of having to lock each peripheral's mutex and pass each pin into functions that require the motor interface, we can now simply lock and use the Motor struct. Additionally, to change the mode of the motor, simply pass in a MotorMode enum variant for whichever mode you'd like to set it to.
not handling the error thrown when with_timeout times out was causing the panic. To avoid these panics in the future, whenever something can throw an error, be sure to handle it in some way.
Watch is more suitable for this application as it discards the previous value when it is no longer useful data whereas Channel will wait until a value was received before updating it, leading to stale data.
This is a comprehensive overhaul of the project structure that aims to
improve ergonomics as it pertains to the motor and the sensors.
key changes:
- moved everything in the shared dir to the project src dir
- moved all motor logic into motor.rs.
- motor functions are now impls
- created the ring struct in ring.rs
- sensor functions are now ring impls
- created ring and motor mutex's
- updated "u" and "l" commands to accept pulse and force flags
as well as to utilize the motor struct.
- updated CAN reader to utilize the motor struct.
This use case fits watch much better than channel. See embassy_sync docs for more info as to why.
sender will spam unlock message until it receives an acknowledgement. This will have main/drogue send those messages when it receives the fire can message.
add the same command that's on the sender board to the parachute boards. sending "batt" over picocom will print the last read of the battery voltage from the adc.
flashing blinky with "--features=main" will now flash blinky onto an actual ers board. Before it would only work on a nucleo
This also renames some things to have their intended purpose be clearer. Namely,the can ids and the names of the frames
When the command "beep" is received over uart, access the buzzer's mode and update it accordingly. If it's off turn it to low. If it's anything else, turn it off.
Clarify that there is no separate build command to call when building/flashing, but add build command if needed.
Member
This is a good idea, it could go in |
Because firmware-rs was added and then deleted from master it looks like when trying to merge ers-embassy git really wants to delete firmware-rs to resolve the merge. I've gone and edited things by hand to keep it around so that when the merge back to master happens there will be no conflicts.
0 is the ring position, 5 is the ready state
ERR doesn't really make sense. ok or not ready is clearer.
position 2 is inbetween, 3 is locked
the uart pos command will now show both the raw adc values as well as the calculated ring state of those values for debugging purposes
Now there is an Id field for each board that will print its name, which is different from how the chute boards were before. They would only print a number and the sender didn't have a id field at all. Keep in mind the sender doesnt have an actual field in its state for this because its static. I also print a delta from the last seen values rather than a time stamp so you dont have to do the math in your head when looking at the last seen fields on each board. The actual state field is still a time stamp, the display impl just does the math for you now.
b902283 to
deee64b
Compare
iwdg to recover from hard crashes
There are some arcane transient errors happening once every 15 to 20 avionics system tests where the sender will not send a CAN message in response to the telemetrum signal to deploy. Buffered CAN should be more resilient in theory and so might help with this issue.
c79561a to
51cd959
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds new Rust-based ERS firmware for our STM32F091RCs in its entirety to the repository. The firmware is located at
./controlSystem/RecoveryBoard/firmware-rs. It also adds Rust build files and dirs to the.gitignore.