Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Migra o template para CPP #46
base: develop
Are you sure you want to change the base?
Migra o template para CPP #46
Changes from 13 commits
bd10771
0050396
f93583d
aa33fbb
b0b8248
281e42c
2b08065
693fe59
345a274
545a38e
fd43d6c
6689168
42f102d
c6497cd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
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.
O uncrustify deixa essa chave aqui mesmo? Estranho ahushuashuashuThere 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.
aisduhas de fato estranho, mas o make format nao mudou isso aí
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.
Então, não sei sobre deixar esse namespace hal aqui, acho que pode deixar mais simples pro template. Não é porque existem namespaces que a gente tem que colocar vários, tem que saber dosar. Mas assim batata também.
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.
ah, na minha cabeça fazia sentido (principalmente considerando as libs), só botei pq nao vi pq nao botar sinceramente
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.
Acho que eu gosto de um namespace hal, ele ajuda a segmentar o que é baixo do que é alto. Se algo tem escrito
hal::
antes, a gente sabe que é uma abstração de algo bem baixo nível, coisa de função da ST.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.
Tenho alguns mixed feeling sobre deixar isso como classe no template. Tipo não é porque suporta classe que a gente tem que usar classe em tudo. O sleep e o init até fazem sentindo estarem numa classe assim, tanto que eles já tinham o prefixo do
mcu_
, mas aí o led toggle deixa meio estranho. Como não tem muito também onde colocar, batata também ahushuauahas.Esse e o comentário do namespace são meio batatas, é só pra pensarem quando tiverem as coisas de usar com moderação as features da linguagem.
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.
o sleep e o init foram por esse motivo q vc citou, o led_toggle eu imaginei que se referia ao led da placa asudhasiudh no caso da bluepill é o C13, mas no código estar o A5 deixa mais esquisito mesmo asduihasiu
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.
Também tenho mixed feelings mas acho que tem que ficar como classe sim. Na minha opinião, numa alternativa sem classe, ficaria meeeio estranho de acessar, ficaria algo do tipo
hal::sleep(50)
, daí ainda mais com RTOS, é um sleep do HAL? É um Sleep do RTOS? Sei lá asdhuadhuasd acho quehal::mcu::sleep(50)
é mais bonito. Posteriormente poderíamos ter umhal::rtos::sleep(50)
ou sei láhal::rtos::publish(mensagem)
, enfim, daí vai, mas é tudo hal né