Merged
Conversation
Co-authored-by: rexblade21 <zkhuang4968@gmail.com>
| @@ -0,0 +1,386 @@ | |||
| /* | |||
| * File: BLDC_controller_data.c | |||
Contributor
There was a problem hiding this comment.
where'd this come from?
| set_gpio_output(IGNITION_ON_PORT, IGNITION_ON_PIN, 0); | ||
| } | ||
|
|
||
| board board_body = { |
Contributor
There was a problem hiding this comment.
can you make a separate PR to name everything body v2 now?
| self._rpmr: int = 0 | ||
|
|
||
| @property | ||
| def rpml(self) -> int: |
Contributor
There was a problem hiding this comment.
let's expand these out to be more readable
Comment on lines
+29
to
+33
| static inline void dotstar_delay(void) { | ||
| for (volatile uint32_t i = 0U; i < 40U; i++) { | ||
| __asm__ volatile("nop"); | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
panda has its own helper for this
Comment on lines
+46
to
+47
| #define MICI_POWER_ON_PORT GPIOB | ||
| #define MICI_POWER_ON_PIN 12 |
Contributor
There was a problem hiding this comment.
idk what this is, needs a better name
Contributor
There was a problem hiding this comment.
OBD-C port power supply for comma device
MICI_POWER_ON_PORT --> OBDC_POWER_ON_PORT
IGNITION_ON_PORT --> OBDC_IGNITION_ON_PORT
Comment on lines
+48
to
+54
| CANPacket_t pkt; | ||
| pkt.bus = bus; | ||
| pkt.addr = BODY_CAN_ADDR_VAR_VALUES; | ||
| pkt.returned = 0; | ||
| pkt.rejected = 0; | ||
| pkt.extended = 0; | ||
| pkt.fd = 0; |
Contributor
There was a problem hiding this comment.
should be able to default initialize like this to save some lines
Suggested change
| CANPacket_t pkt; | |
| pkt.bus = bus; | |
| pkt.addr = BODY_CAN_ADDR_VAR_VALUES; | |
| pkt.returned = 0; | |
| pkt.rejected = 0; | |
| pkt.extended = 0; | |
| pkt.fd = 0; | |
| CANPacket_t pkt = {}; |
Comment on lines
+67
to
+70
| pkt.returned = 0; | ||
| pkt.rejected = 0; | ||
| pkt.extended = 0; | ||
| pkt.fd = 0; |
Comment on lines
+81
to
+82
| rpml = (int)(((float)left_target_deci_rpm) * 0.1f); | ||
| rpmr = (int)(((float)right_target_deci_rpm) * 0.1f); |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uh oh!
There was an error while loading. Please reload this page.