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

DCM code fixes #29

Merged
merged 2 commits into from
Feb 24, 2025
Merged

DCM code fixes #29

merged 2 commits into from
Feb 24, 2025

Conversation

MerinoSheep
Copy link
Contributor

DCM borked on GCC 14

@MerinoSheep MerinoSheep requested a review from PtSamuel February 21, 2025 20:25
@@ -73,7 +73,17 @@ static TickType_t previousTickCount;

// ------------------------------------------------------------------------------------------------
// Function implementations

void setFastTorqueWithParallelRegen(uint8_t brakePressurePsi_u8, uint8_t throttlePos_u8);
Copy link
Contributor

Choose a reason for hiding this comment

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

why are these prototypes set in the .c?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we define the function after the point where we call it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

forward declaration

Copy link
Contributor

Choose a reason for hiding this comment

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

could this line be moved to controls.h just to be consistent with other functions?

@@ -89,7 +89,7 @@ struct cmr_can {
cmr_canRXCallback_t rxCallback;
};

void cmr_canInit(
void cmr_FDcanInit(
Copy link
Contributor

Choose a reason for hiding this comment

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

oml how did this work lmfao

@@ -16,6 +16,7 @@
#ifdef HAL_FDCAN_MODULE_ENABLED

uint32_t _platform_FDcanGPIOAF(FDCAN_GlobalTypeDef *instance, GPIO_TypeDef *port);
void _platform_rccFDCanClockEnable();
Copy link
Contributor

Choose a reason for hiding this comment

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

does this need to be in here or does it exist only in rcc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

_platform_rccFDCanClockEnable() is only called in rcc.c but defined in h725.c

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should stay in h275 imo since its platform specific

@@ -55,10 +55,11 @@ void setEnduranceTestTorque(
// Public functions

void initControls();
void integrateCurrent();
Copy link
Contributor

Choose a reason for hiding this comment

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

integrateCurrent() is called in motors.c, how did this even compile lol

@MerinoSheep MerinoSheep merged commit fca67ab into main Feb 24, 2025
1 check passed
@MerinoSheep MerinoSheep deleted the fix/DCM-implicit branch February 24, 2025 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants