-
Notifications
You must be signed in to change notification settings - Fork 4
Launch control + Internal speed controller #31
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
base: launch-control
Are you sure you want to change the base?
Changes from all commits
5b01836
9eec3fb
b3966b2
006034d
03e951e
c10deee
db4525c
2d7e90d
8da3f67
b4d0d6b
2622873
4a10cb6
f4f3404
eca848d
890393f
27aa862
4c1a06f
cfc25f6
82cea62
a57023e
0f9ef25
edf9a9f
cf4b8db
608e157
0ac25e8
595b8ff
bf496d3
236b71a
5290511
5d62ad6
4f1f29b
8a2ae6a
f293b5c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -108,6 +108,10 @@ void dispatch_init() { | |
| carstats.vcu_controls_received = false; | ||
| carstats.vcu_lc_controls_received = false; | ||
|
|
||
| carstats.rpm_setpoint.rpm_setpoint = 0; | ||
| carstats.ki.ki_times_1000 = 1000; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd recommend you just zero this when init'ing
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or loading in the default vals (we might want to start putting kp, ki as defines in a header for speed controller |
||
| carstats.kp.kp_times_1000 = 0; | ||
|
|
||
| init_button_state(&carstats.buttons.left); | ||
| init_button_state(&carstats.buttons.right); | ||
| init_button_state(&carstats.buttons.A); | ||
|
|
@@ -177,6 +181,9 @@ void send_dash_controls(void) { | |
| LIMIT(can0_DashRequest_period); | ||
| handle_can_error(can0_DashRequest_Write(&carstats.controls)); | ||
| handle_can_error(can0_DashRequestLC_Write(&carstats.lc_controls)); | ||
| handle_can_error(can0_DashSpeedCntrlKpTimes1000_Write(&carstats.kp)); | ||
| handle_can_error(can0_DashSpeedCntrlKiTimes1000_Write(&carstats.ki)); | ||
| handle_can_error(can0_DashSpeedCntrlRPMSetpoint_Write(&carstats.rpm_setpoint)); | ||
| } | ||
|
|
||
| void vcu_controls_update(void) { | ||
|
|
||
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.
2 space after
:gore