Skip to content
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

Merged
merged 1 commit into from Jul 26, 2020

Conversation

mikeller
Copy link
Member

No description provided.

@mikeller mikeller added this to the 4.3 milestone Jun 21, 2020
@@ -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();
Copy link
Member

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) ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-s (line 76)

Copy link
Member

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?

Copy link
Member Author

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?

Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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 🥇

@mikeller mikeller force-pushed the refactor_dshot_enabled_checks branch from 0741235 to cdf63f3 Compare June 21, 2020 20:35
@mikeller mikeller force-pushed the refactor_dshot_enabled_checks branch from cdf63f3 to c2812ec Compare June 21, 2020 22:05
@mikeller mikeller merged commit 9ae9b32 into betaflight:master Jul 26, 2020
@mikeller mikeller deleted the refactor_dshot_enabled_checks branch July 26, 2020 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants