AlkaMotors / AM32-MultiRotor-ESC-firmware

Firmware for stm32f051 based speed controllers for use with mutirotors
GNU General Public License v3.0
754 stars 266 forks source link

Correct Indentation for main.c #59

Closed Voodoobrew101 closed 2 years ago

Voodoobrew101 commented 2 years ago

This is a basic file clean up to main.c, it could be applied to a few of the files. The process was automated with STM32CubeIDE > Source > Correct Indentation Command. Build was successful after formatting as nothing was really changed except that many spaces were replaced with tab indents. I think it makes the code much easier to read.

Voodoobrew101 commented 2 years ago

There were quite a few places where the indentation with spaces was missing or 2 spaces were used instead of 4. I think @DusKing1 wanted to use 4 spaces instead, but that wasn't in the automated options, and nobody has taken the time to do the cleanup to 4 spaces. I am looking to find a way to possibly convert the tabs back to 4 spaces. Edit- It looks like Alka has been using tabs when editing code recently so I will leave it as is with tabs for indentions. I think the tabs are easier to keep clean, but the downside is not all editors use them the same, It appears even in github in some views tabs are 4 spaces and 8 spaces in others.

Voodoobrew101 commented 2 years ago

here is main.c with indentions fixed but with 4 spaces instead of Indentions if you prefer spaces. But I am not creating the pull request for it because it may just be confusing. https://github.com/AlkaMotors/AM32-MultiRotor-ESC-firmware/compare/master...Voodoobrew101:patch-6

Voodoobrew101 commented 2 years ago

Once a decision is made for 4 spaces vs tab indents, other files should be processed. Some files such as targets.h might only look correct if spaces are used.

Voodoobrew101 commented 2 years ago

I use the chrome addon stylus and the github-better-sized-tabs-in-code theme for it which converts the tab indents to 4. Because GitHub doesn't as far as I know always let you view tabs as 4