-
Notifications
You must be signed in to change notification settings - Fork 909
Leave circular dependency hell (adopt source/header model) #2175
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
Closed
Closed
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
5a0010a
dedup opendbc code!
aubsw 49cfa72
a gentler approach
aubsw 8a14579
fix misra invocation
aubsw c3bab4c
cleanup drivers/can_common
aubsw 98dd5eb
revive can_check_checksum
aubsw a67d2a5
sneaky missing declaration of can_check_checksum in opendbc
aubsw 313bfd1
can_panda
aubsw c9d56ef
big refactor, fix a lot of stuff
aubsw 4cac3bb
no more _panda (dedup code)
aubsw 4c0fd18
clean up a few cppcheck issues
aubsw 8b81492
port fake siren
aubsw a8ac929
update misra_tests, fix some violations
aubsw 86d6229
revert jenkinsfile change
aubsw f244738
smol fixes
aubsw 559da46
fix build
aubsw bb7fad7
unbonk lib
aubsw 7899845
unbonk lib
aubsw c251518
sconscript cleanup
aubsw 60319f1
smol clarification
aubsw e719035
errant blankspace
aubsw aebe2d9
revert unused funcs for diffs sake
aubsw 6132b5e
unrefactor harness configuration, fix lladc for jungle
aubsw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 13 additions & 6 deletions
19
board/bootstub_declarations.h → board/bootstub_definitions.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,25 @@ | ||
| // ******************** Prototypes ******************** | ||
| #include "bootstub_definitions.h" | ||
| #include "utils.h" | ||
|
|
||
| void print(const char *a){ UNUSED(a); } | ||
| void puth(uint8_t i){ UNUSED(i); } | ||
| void puth2(uint8_t i){ UNUSED(i); } | ||
| void puth4(uint8_t i){ UNUSED(i); } | ||
| void hexdump(const void *a, int l){ UNUSED(a); UNUSED(l); } | ||
| typedef struct board board; | ||
| typedef struct harness_configuration harness_configuration; | ||
| void pwm_init(TIM_TypeDef *TIM, uint8_t channel); | ||
| void pwm_set(TIM_TypeDef *TIM, uint8_t channel, uint8_t percentage); | ||
| // No UART support in bootloader | ||
| typedef struct uart_ring {} uart_ring; | ||
| uart_ring uart_ring_som_debug; | ||
| uart_ring uart_ring_debug; | ||
| uart_ring *get_ring_by_number(int a); | ||
| void uart_init(uart_ring *q, int baud) { UNUSED(q); UNUSED(baud); } | ||
| bool put_char(uart_ring *q, char elem); | ||
|
|
||
| // ********************* Globals ********************** | ||
| uint8_t hw_type = 0; | ||
| board *current_board; | ||
|
|
||
| uint32_t uptime_cnt; | ||
| bool ignition_can; | ||
| bool heartbeat_lost; | ||
| bool bootkick_reset_triggered; | ||
|
|
||
| void refresh_can_tx_slots_available(void); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #include "can.h" | ||
|
|
||
| const unsigned char dlc_to_len[] = {0U, 1U, 2U, 3U, 4U, 5U, 6U, 7U, 8U, 12U, 16U, 20U, 24U, 32U, 48U, 64U}; |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
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.
is it possible to use something like
f"{panda_root}/include/**"to avoid having to list every folder?Uh oh!
There was an error while loading. Please reload this page.
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.
Suprisingly, niether GCC nor SCons provides recursive directory include search. We have a few options:
#include "registers.h"would become#include "drivers/registers.h"everywhere.I kind of prefer option 3 because it clarifies the directory structure of included headers in the source code.