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
Refactored Dshot enabled checks. #9937
Refactored Dshot enabled checks. #9937
Conversation
src/main/drivers/dshot_command.h
Outdated
@@ -73,4 +73,4 @@ bool dshotCommandQueueEmpty(void); | |||
bool dshotCommandIsProcessing(void); | |||
uint8_t dshotCommandGetCurrent(uint8_t index); | |||
bool dshotCommandOutputIsEnabled(uint8_t motorCount); | |||
bool dshotCommandsAreEnabled(dshotCommandType_e commandType); | |||
bool dshotStreamingCommandsAreEnabled(); |
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.
Is think you forgot (void)
?
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.
-s (line 76)
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.
line 75 puzzles me; still using this function in dshot_command.c , maybe it is declared in another header file?
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.
Fixed. Not sure what is puzzling about line 75?
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.
Sorry I mean removing line 76, it looks to me declaration of function bool dshotCommandsAreEnabled(dshotCommandType_e commandType);
is still used?
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's only used internally, so it's not part of the interface of the unit (i.e. the header file) any more.
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.
Changing the function declaration to static should already have told me this was for internal use only. Thanks for solving my little puzzle 🥇
0741235
to
cdf63f3
Compare
cdf63f3
to
c2812ec
Compare
No description provided.