-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fixed up isDataNew and implemented failsafe code in system manager #68
base: main
Are you sure you want to change the base?
Conversation
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.
It looks good from my end.
I'm curious why we're commenting out tthe watchdog, but once we clear that up it should be good.
There's a ton of merge conflicts, This might be my fault..... If you are around in person someday, we can go through them together. In the most cases with boardfiles, you'll justt take your version and overwrite the old one (because they're all autogenerated). I'll let an EFS ZP owner chime in here (Derek or Hardy) for good steps moving forward.
@@ -125,7 +126,7 @@ int main(void) | |||
MX_TIM5_Init(); | |||
MX_ADC1_Init(); | |||
MX_ICACHE_Init(); | |||
MX_IWDG_Init(); | |||
//MX_IWDG_Init(); |
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.
Any reason we needed to comment this out?
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.
Yeah I can uncomment that, Hardy just told us to comment it out before we started debugging. I think he said it would cause errors when we try to run the code.
rcInputs_.roll == prevroll && | ||
rcInputs_.pitch == prevpitch | ||
}; | ||
printf("Arm: %f\r\n", this->rcInputs_.arm); |
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 would take this out of our comitted code, or at the very least hide it under a IFDEF DEBUG flag
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.
Okay sounds good. I can meet up tomorrow at around 2:30 PM to go over some of the other merge conflicts.
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.
same this file don't need to be pushed
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 need for pushing this
@@ -266,6 +250,20 @@ void USART2_IRQHandler(void) | |||
/* USER CODE END USART2_IRQn 1 */ | |||
} | |||
|
|||
/** | |||
* @brief This function handles USART3 global interrupt / USART3 wake-up interrupt through EXTI line 28. |
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.
what is this UART3 used for out of curiosity?
@@ -218,6 +219,13 @@ void SystemClock_Config(void) | |||
|
|||
/* USER CODE BEGIN 4 */ | |||
|
|||
int __io_putchar(int ch) |
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 saw two copies of this code, maybe we only need one of them? Deleting the one in this file?
} | ||
|
||
watchdog_.refreshWatchdog(); // always hit the dog | ||
// watchdog_.refreshWatchdog(); // always hit the dog |
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.
We should uncomment back this code because the watchdog was disabled temporally for the failsafe testing
Description
What was completed, changed, or updated?
in rcreceiver_datatypes.h file, I added a line of code to copy the isDataNew flag so that it is accurately updated in rcInputs_.
In system manager, I removed the old failsafe code that used looping and added implementation using isDataNew. I set the threshold to 75 disconnection counts before disarming the drone.
Why was this done (if applicable)?
To make the failsafe detection more efficient. Changing it from checking thousands of times to only checking 75.
Testing
What manual tests were used to validate the code?
Logic analyzer, debug mode on cube ide.
What unit tests were used to validate the code?
Documentation
Milestone number and name: Milestone 1
Link to Asana task:
Link to Confluence documentation:
Reminders
Add reviewers to the PR
Mention the PR in the appropriate discord channel