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

Can Message Rate Limiting #132

Merged
merged 14 commits into from
Nov 12, 2024
Merged

Can Message Rate Limiting #132

merged 14 commits into from
Nov 12, 2024

Conversation

caiodasilva2005
Copy link
Contributor

@caiodasilva2005 caiodasilva2005 commented Nov 1, 2024

Changes

added an interface to rate limit can messages

Closes #127

Sabramz
Sabramz previously requested changes Nov 2, 2024
Copy link
Contributor

@Sabramz Sabramz left a comment

Choose a reason for hiding this comment

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

your google doc

0x156; // 0x0A is the dcl id, 0x22 is the device id set by us
mc_msg.len = 8;
memcpy(mc_msg.data, &discharge_data, sizeof(discharge_data));
bms_can_msgs[DISCHARGE].len = 8;
Copy link
Contributor

Choose a reason for hiding this comment

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

The length of the message should be defined where the CAN message is defined now where it should be sent.

charge_msg.id =
CHARGE_CANID; // 0x0A is the dcl id, 0x157 is the device id set by us

can_msg_t acc_status_msg;
Copy link
Contributor

Choose a reason for hiding this comment

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

You should put message lengths in the config since they do not change and are properties of the message.

@jr1221
Copy link
Contributor

jr1221 commented Nov 7, 2024

This is gonna hella conflict with my CAN busy fixups, so you merge first and ill refactor it.

Copy link
Contributor

@Sabramz Sabramz left a comment

Choose a reason for hiding this comment

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

It works

@Sabramz Sabramz merged commit d9a421f into develop Nov 12, 2024
2 checks passed
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.

Configurable Rate Limiting for CAN Messages
3 participants