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

Documentação do código #6

Merged
merged 71 commits into from
Nov 26, 2020
Merged
Show file tree
Hide file tree
Changes from 66 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
c07b219
:busts_in_silhouette: Add Code of Conduct
LucasHaug Oct 7, 2020
0d07d50
:page_facing_up: Add License
LucasHaug Oct 7, 2020
11e7863
:pencil: Add doxyfile and :art: css for generated doc
LucasHaug Oct 10, 2020
f0a1349
:see_no_evil: Add .gitignore
LucasHaug Oct 10, 2020
9b13a70
:memo: Update README
LucasHaug Oct 10, 2020
bc79a2b
:art: Update badges
LucasHaug Oct 10, 2020
abff2c0
:busts_in_silhouette: Add contributors
LucasHaug Oct 10, 2020
9691113
:busts_in_silhouette: Add @Berbardo as a contributor
LucasHaug Oct 10, 2020
4ca7043
:see_no_evil: Update .gitignore
LucasHaug Oct 18, 2020
f469e49
:truck: Create assets folder and move files
LucasHaug Oct 18, 2020
e24b68c
:pencil: Update hw config in README
LucasHaug Oct 18, 2020
96f43eb
:camera: Add hw config images
LucasHaug Oct 18, 2020
2101d36
:pencil: Add cube configuration to the README
LucasHaug Oct 19, 2020
e6c3cdf
:pencil: Update how to use the library
LucasHaug Oct 20, 2020
277167f
:art: Fix emoji
LucasHaug Oct 20, 2020
ccdcac7
:pencil: Add `rf24_delay` to the README
LucasHaug Oct 20, 2020
2bde415
:pencil: Fix spelling
LucasHaug Oct 20, 2020
a5507d0
:bug: Fix forgotten CSN
LucasHaug Oct 21, 2020
a415005
:pencil: Add initializing subsection
LucasHaug Oct 21, 2020
c07dac2
:pencil: Add detail about the tutorial
LucasHaug Oct 21, 2020
82e90c4
:pencil: Fix spelling
LucasHaug Oct 21, 2020
eb8d2c3
:pencil: Add transmissor tutorial
LucasHaug Oct 22, 2020
30fa304
:pencil: Add receiver text
LucasHaug Oct 22, 2020
aa6a743
:pencil: Fix spelling
LucasHaug Oct 22, 2020
be0a8d3
:bug: Add debug infos
LucasHaug Oct 30, 2020
69bf3aa
:art: Change emoji
LucasHaug Oct 30, 2020
732b23c
:art: Add formatting section
LucasHaug Oct 30, 2020
be38347
:sparkles: Add uncrustify
LucasHaug Oct 30, 2020
79fd1d6
:pencil: Update formatting section
LucasHaug Oct 30, 2020
d1b3c5a
:busts_in_silhouette: Add Contributing
LucasHaug Oct 30, 2020
f25b046
:truck: Rename Contributing in pt
LucasHaug Oct 30, 2020
a717b0d
:globe_with_meridians: Translate contributing
LucasHaug Oct 31, 2020
cba34de
:pencil: Fix links and gramatic
LucasHaug Oct 31, 2020
bec7d0f
:truck: Add README pt-br
LucasHaug Oct 31, 2020
7ba9387
:pencil2: Add README
LucasHaug Oct 31, 2020
0f5f651
:pencil: Add default all-contributors message
LucasHaug Oct 31, 2020
00ea236
:pencil: Update README index
LucasHaug Oct 31, 2020
047e6ba
:globe_with_meridians: Translate README
LucasHaug Oct 31, 2020
c319bd8
:pencil: Fix links and gramatics
LucasHaug Oct 31, 2020
6265f49
:pencil: Update code documentation
LucasHaug Oct 31, 2020
700afdb
:recycle: Refactor code
LucasHaug Oct 31, 2020
644b497
:pencil: Update documentation
LucasHaug Oct 31, 2020
27070ce
:memo: Update READMEs
LucasHaug Oct 31, 2020
f28f0b0
:wrench: Add uncrustify.cfg
LucasHaug Oct 31, 2020
bf031e9
:art: Format files
LucasHaug Oct 31, 2020
f306729
:art: Format rf24_debug manually
LucasHaug Oct 31, 2020
d2cf06e
:see_no_evil: Add newline to .gitignore
LucasHaug Oct 31, 2020
ab62cef
:memo: Update comments
LucasHaug Oct 31, 2020
a90d6e4
:pencil: Fix spelling
LucasHaug Oct 31, 2020
463b5cb
:pencil: Fix README section title
LucasHaug Oct 31, 2020
92ae46c
:recycle: Change bit shift macro
LucasHaug Oct 31, 2020
84105fb
:recycle: Remove magic numbers
LucasHaug Oct 31, 2020
df278dc
Update CONTRIBUTING.md
LucasHaug Oct 31, 2020
bda5a82
Update CONTRIBUTING.md
LucasHaug Oct 31, 2020
49760dd
Update CONTRIBUTING.md
LucasHaug Oct 31, 2020
79f13ca
Update CONTRIBUTING.md
LucasHaug Oct 31, 2020
834bf30
Update README.md
LucasHaug Oct 31, 2020
541fcba
:ok_hand: Update README and Contributing
LucasHaug Oct 31, 2020
e69a643
:busts_in_silhouette: Update @d-nery as a contributor
LucasHaug Oct 31, 2020
a765ce3
:busts_in_silhouette: Update @lucastrschneider as a contributor
LucasHaug Oct 31, 2020
9dea2b3
:ok_hand: Fix spelling and code consistency
LucasHaug Oct 31, 2020
6644fd4
:pencil: Correct grammar
LucasHaug Oct 31, 2020
f7bfbe4
Update CONTRIBUTING.md
LucasHaug Nov 5, 2020
1bc6473
:pencil: Fix spelling in README
LucasHaug Nov 25, 2020
aacafed
:pencil: Fix spelling in CONTRIBUTING
LucasHaug Nov 25, 2020
4b24438
:pencil: :brazil: Correct spelling in README and CONTRIBUTING
LucasHaug Nov 25, 2020
9505d5c
:pencil: Correct spelling
LucasHaug Nov 25, 2020
49fa4d6
:busts_in_silhouette: Update @FelipeGdM as a contributor
LucasHaug Nov 25, 2020
f16d498
:pencil: Add assets folder to README
LucasHaug Nov 26, 2020
a277f01
:pencil: Correct spelling
LucasHaug Nov 26, 2020
5a42775
:pencil: Correct grammar
LucasHaug Nov 26, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"projectName": "STM32RF24",
"projectOwner": "ThundeRatz",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md",
"README.pt-br.md"
],
"imageSize": 100,
"commit": true,
"commitConvention": "gitmoji",
"contributors": [
{
"login": "LucasHaug",
"name": "Lucas Haug",
"avatar_url": "https://avatars3.githubusercontent.com/u/39196309?v=4",
"profile": "https://github.com/LucasHaug",
"contributions": [
"code",
"doc",
"test",
"translation"
]
},
{
"login": "lucastrschneider",
"name": "Lucas Schneider",
"avatar_url": "https://avatars0.githubusercontent.com/u/50970346?v=4",
"profile": "https://github.com/lucastrschneider",
"contributions": [
"code",
"doc",
"test",
"translation",
"review"
]
},
{
"login": "d-nery",
"name": "Daniel Nery",
"avatar_url": "https://avatars2.githubusercontent.com/u/12468184?v=4",
"profile": "https://github.com/d-nery",
"contributions": [
"code",
"review"
]
},
{
"login": "FelipeGdM",
"name": "Felipe Gomes de Melo",
"avatar_url": "https://avatars3.githubusercontent.com/u/1054087?v=4",
"profile": "https://github.com/FelipeGdM",
"contributions": [
"ideas"
]
},
{
"login": "Berbardo",
"name": "Bernardo Coutinho",
"avatar_url": "https://avatars0.githubusercontent.com/u/48636340?v=4",
"profile": "https://github.com/Berbardo",
"contributions": [
"test"
]
}
],
"contributorsPerLine": 7
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs/Doxygen/
78 changes: 78 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Contributor Covenant Code of Conduct

Para a versão em PT-BR 🇧🇷 desse documento, [veja aqui](CODE_OF_CONDUCT.pt-br.md).

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.pt-br.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Código de Conduta para Colaboradores

## Nossa Promessa

Com o interesse de fomentar uma comunidade aberta e acolhedora, nós, como
colaboradores e administradores deste projeto, comprometemo-nos a fazer a
participação neste projeto e nesta comunidade uma experiência livre de assédio
para todes, independente da idade, porte físico, deficiência, etnia, características
sexuais, identidade ou expressão de gênero, nível de experiência, educação, status
socio=econômico, nacionalidade, aparência pessoal, raça, religião, ou identidade
e orientação sexual.

## Nossos Padrões

Exemplos de comportamentos que contribuem a criar um ambiente positivo incluem:

* Usar linguagem acolhedora e inclusiva
* Respeitar pontos de vista e experiências diferentes
* Aceitar crítica construtiva graciosamente
* Focar no que é melhor para a comunidade
* Mostrar empatia com outros membros da comunidade

Exemplos de comportamentos inaceitáveis por parte dos participantes incluem:

* Uso de linguagem ou imagens sexuais e atenção ou avanço sexual indesejada
* Comentários insultuosos e/ou depreciativos e ataques pessoais ou
políticos (Trolling)
* Assédio público ou privado
* Publicar informação pessoal de outros sem permissão explícita, como, por exemplo,
um endereço eletrônico ou residencial
* Qualquer outra forma de conduta que pode ser razoavelmente considerada
inapropriada num ambiente profissional

## Nossas Responsibilidades

Os administradores do projeto são responsáveis por esclarecer os padrões de
comportamento e deverão tomar ação corretiva apropriada e justa em resposta a
qualquer instância de comportamento inaceitável.

Os administradores do projeto têm o direito e a responsabilidade de remover, editar ou
rejeitar comentários, commits, código, edições na wiki, issues ou outras formas de
contribuição que não estejam de acordo com este Código de Conduta, bem como banir
temporariamente ou permanentemente qualquer colaborador por qualquer outro
comportamento que se considere impróprio, perigoso, ofensivo ou problemático.

## Escopo

Este Código de Conduta aplica-se dentro dos espaços do projeto ou qualquer espaço
público onde alguém represente o mesmo ou a sua comunidade. Exemplos de
representação do projeto ou comunidade incluem usar um endereço de email oficial do
projeto, postar por uma conta de mídia social oficial, ou agir como um representante
designado num evento online ou offline. A representação de um projeto pode ser ainda
definida e esclarecida pelos administradores do projeto.

## Aplicação

Comportamento abusivo, de assédio ou de outros tipos podem ser comunicados
contatando a equipe do projeto em [email protected]. Todas as queixas serão
revistas investigadas e resultarão numa resposta necessária e apropriada à
situação. A equipe é obrigada a manter a confidencialidade em relação a quem
reportou o incidente. Demais detalhes de políticas de aplicação podem ser
postadas separadamente.

Administradores do projeto que não sigam ou não mantenham o Código de Conduta em
boa fé podem enfrentar repercussões temporárias ou permanentes determinadas por
outros membros da liderança do projeto.

## Atribuição

Este Código de Conduta é adaptado do [Contributor Covenant][homepage], versão 1.4,
disponível em https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

Para obter respostas a perguntas comuns sobre este código de conduta, veja
https://www.contributor-covenant.org/faq
124 changes: 124 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Contributing to STM32RF24 🚀

Para a versão em PT-BR 🇧🇷 desse documento, [veja aqui](CONTRIBUTING.pt-br.md).

First of all, thanks for your interest! We really appreciate the participation of the community! ✨

Here we describe a set of guidelines when contributing to STM32RF24. These are not strict rules, so use your best judgment, and in case you have questions, contact us on [email protected].

Please note that this project is released with a [Contributor Code of Conduct](./CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.

## How can I contribute?

### Issues

Most contributions are made with [GitHub Issues](https://guides.github.com/features/issues/). They will be primarily used for

1. Tracking bugs - `bug`
2. Suggesting Enhancements - `enhancement`
3. Improving documentation - `documentation`

For each of these, there is a specific [label](https://docs.github.com/en/enterprise/2.17/user/github/managing-your-work-on-github/applying-labels-to-issues-and-pull-requests). We strongly recommend that every issue created has at least one of the three labels described above.

But before creating an issue, first check if there is already one with the same subject. You can search and filter by labels, for example, [here](https://github.com/ThundeRatz/STM32RF24/labels/bug) we only see the issues that are active and have the `bug` label.

#### Reporting Bugs 🐛

- Use a clear title
- Specify the version of the library
- Specify OS, VM (if applicable), project's microcontroller, and other configurations that may be useful
- Describe the steps to reproduce the bug
- Describe the observed and the expected behavior
- Include screenshots, gifs, any type of reference that helps to explain the problem

#### Suggesting Enhancements ✨

- Use a clear title
- Describe the suggestion step-by-step
- Describe the expected behavior after implementing this idea
- Explain why this new feature or update can be usefull

#### Improving documentation 📝

- Use a clear title
- Specify the files that need to be documented
- Explain your suggestion and why would it be better/clearer

### Pull Requests

If you want to contribute with code to the project, search for an open issue and start developing. When you are ready, open a Pull Request and we will review it.

A few recommendations:

- Describe exactly what you've done, always as clear as possible
- Link the applicable issue in your Pull Request (if there is none, please, create a new one)
- Make sure that you are following the [Syleguide 💄](#styleguide-)

## Styleguide 💄

### Code formatting

The code is formatted following specific rules, for more information on how to ensure that your code is formatted correctly, see the [🎨 Formatting](./README.md#-formatting) section on the README.

### Coding in C

There are some guidelines for organizing C code that should be followed.

> "Programs must be written for people to read,
> and only incidentally for machines to execute."

― Harold Abelson, Structure and Interpretation of Computer Programs

#### Variables and functions scopes

Always reduce the scopes of the variables to the minimum possible, avoiding global, external and static, giving preference to local variables. The same is true for functions, do not create public functions if they are only to be used within a file, leave them private.

#### Nomenclature

> "You should name a variable using the same care
> with which you name a first-born child."

― Robert C. Martin, Clean Code: A Handbook of Agile Software Craftsmanship

First, to maintain the standard, leave all the names of variables, functions, constants, files, among others, in English.

Choose meaningful names, the names should show what the variable, for example, is used in the code, so never use variables with only one letter, besides saying nothing about what it is, it is also difficult to find the variable in the code.

For variables or constants, for example, that have a unit of measure, include this unit of measure in the name, this makes it easier to understand its meaning.

In order to indicate that a variable is a pointer, add `p_` to the beginning of the variable name, if it is a pointer to a pointer, for example, add `pp_`.

Global variables in a file and external variables should be avoided, especially external ones, but if they are really necessary, they should be identified to facilitate the understanding of isolated parts of the code. Add `m_` to the beginning of a variable name to indicate that it is a global variable in a file. And to indicate that a variable is a global external, add `g_` at the beginning of its name. If you had an external pointer, for example, you would use `gp_`.

For more naming tips, see the article ["How To Create Meaningful Names In Code"](https://medium.com/better-programming/how-to-create-meaningful-names-in-code-20d7476537d4).

#### Variable types

Make coherent choices for your variable types and your functions return and parameters types. For examples, do not use `float` if your variable is a unit counter.

Besides that, for integer variables, distinguish between `signed` and `unsigned` and specify their size in bits, this ensures more control over the values that each variable can have, as well as optimizes the memory occupation. To do this, use the `stdint.h` library, than, for example, you can use the types `uint8_t` for unsigned 8-bit integers and `int16_t` for signed 16-bit integers.

#### Magic numbers/Constants

Avoid [magic numbers](https://en.wikipedia.org/wiki/Magic_number_(programming)) in your code. In addition to decreasing readability, they also make maintenance difficult. To solve this, use constants defined with `#define` at the beginning of your code.

### Git commit messages

- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- It is strongly recommended to start a commit message with a related emoji
- 📝 `:memo:` for documentation
- 🐛 `:bug:` for bug issues
- 🚑 `:ambulance:` for critical fixes
- 🎨 `:art:` for improving structure
- ✨ `:sparkles:` for new features

For more examples, see [this reference](https://gitmoji.carloscuesta.me/).

### Git workflow

The project workflow is based on [Git Flow](https://nvie.com/posts/a-successful-git-branching-model/).

### Documentation

The documentation is generated with [Doxygen](https://www.doxygen.nl/index.html) and should follow its documenting manual. A well-documented code is crucial for understanding it.
Loading