Skip to content

Conversation

@ctzsnooze
Copy link
Member

@ctzsnooze ctzsnooze commented Dec 24, 2021

Adds:

  • support (field names and scaling) for the new blackbox modes in 4.3
  • field names for quite a few other debugs that were not previously supported.
  • re-orders the lists so they are closer to the sequence in firmware, with most recent debugs at the bottom
  • shows RPM values as both RPM and hz
  • fixes some missing default cases
  • whitespace fixes

Screen Shot 2021-12-26 at 10 57 23

@ctzsnooze ctzsnooze requested a review from McGiverGim December 24, 2021 10:10
@ctzsnooze ctzsnooze force-pushed the new-debug-modes branch 2 times, most recently from 98f8c23 to c85f3f7 Compare December 25, 2021 23:53
@ctzsnooze ctzsnooze requested a review from asizon December 25, 2021 23:59
haslinghuis
haslinghuis previously approved these changes Dec 26, 2021
@haslinghuis
Copy link
Member

@ctzsnooze could you please fix some code smells (at least the trailing spaces)

@ctzsnooze ctzsnooze force-pushed the new-debug-modes branch 3 times, most recently from 3cdf881 to 80f390b Compare December 27, 2021 13:03
@ctzsnooze ctzsnooze self-assigned this Dec 27, 2021
@ctzsnooze ctzsnooze force-pushed the new-debug-modes branch 2 times, most recently from 5c138bf to bd56041 Compare December 27, 2021 14:11
@ctzsnooze
Copy link
Member Author

ctzsnooze commented Dec 27, 2021

A bit confused about Sonar complaining about not including breaks.
Seems like every case terminates with returns.
thanks for the advice! fixed.

Copy link
Member

@chmelevskij chmelevskij left a comment

Choose a reason for hiding this comment

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

I think to make sonar happy every nested switch should have default at least. Otherwise it's fall through case.

@ctzsnooze
Copy link
Member Author

Thanks for your help, @haslinghuis @chmelevskij !

I've addressed all the code smells that I can fix (whitespace, providing a 'default' fallback).

It still complains about the following things, most of which were there before, or are too difficult for me to fix, or don't seem worth fixing:

  • too many lines of code in the file overall
  • the concatenation method used in the RPM and Hz calculations, and how long those lines are
  • using nested case/switch statements, generally (we do it everywhere)
  • switch statements with less than three options (I think it's better to be consistent?)

There may be some fine tuning to do with the scaling of the graphs of various debugs. I'm happy to improve them, tag me here and I'll see what I can do..

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 27 Code Smells

No Coverage information No Coverage information
46.8% 46.8% Duplication

@haslinghuis haslinghuis merged commit b3e135d into betaflight:master Dec 28, 2021
Copy link

@s050506 s050506 left a comment

Choose a reason for hiding this comment

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

@ขอขอบพระคุณมากครับ

@ctzsnooze ctzsnooze deleted the new-debug-modes branch September 27, 2022 00:46
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.

4 participants