-
Notifications
You must be signed in to change notification settings - Fork 0
stepper rewrite merge to main branch #11
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
Open
saucesaft
wants to merge
31
commits into
main
Choose a base branch
from
stepper_rewrite
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
9c54146
New cmake lists for vscode
romi2002 0fcf080
Initial stepper lib version
romi2002 38cf6c1
Removed old tasks from main
romi2002 7793e5b
Tested basic step functionality
romi2002 bb06ce1
Added new encoder task
romi2002 54bd8f8
CAN interface re-write
romi2002 af0e8cd
Updated CANLib
romi2002 f844538
Working encoder tests
romi2002 861cf81
Updated canlib
romi2002 05d5237
Fixed some can message lengths
romi2002 5448aab
Working! Still needs CAN testing
romi2002 9a14066
Initial stepper can bus testing
romi2002 84fda88
Reverted incorrect can bus byte order
romi2002 5ce749e
vscode convertion (steering)
saucesaft 4c81060
17 de marzo
saucesaft f1b3f91
ya funciona el joystick
saucesaft 621d099
better motor period
saucesaft a3fdbd0
mode change on pcb
saucesaft 8527714
Now works
romi2002 3ff5d7e
error in mode setting
saucesaft 2f2f691
configured to work with st-util
saucesaft 5a68f32
updated gitignore
saucesaft fee2195
updated to new filters library
saucesaft 2f4fdc4
updated canlib version
saucesaft e070452
brake almost there
saucesaft 99ec8e8
pre timer change
saucesaft 7836b27
post timer change (needs testing)
saucesaft aeb7845
timer change successful
saucesaft 4f43efc
Just to check changes for Debug, not really relevant
katzgo 504c7db
NOW WORKING: Changed function files from branch brake_test into this …
katzgo a8079d8
Now brake actually works with no oscillation in pedal
katzgo 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,2 @@ | ||
| .vscode/ | ||
|
|
||
| build/ | ||
| debug/ |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,29 @@ | ||
| { | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
| { | ||
| "name": "Launch", | ||
| "type": "cppdbg", | ||
| "request": "launch", | ||
| "cwd": "${workspaceFolder}", | ||
| "program": "${command:cmake.launchTargetPath}", | ||
| "MIMode": "gdb", | ||
| "miDebuggerPath": "${command:vscode-embedded.st.gdb}", | ||
| "miDebuggerServerAddress": "localhost:3333", | ||
| "debugServerPath": "${command:vscode-embedded.st.gdbserver}", | ||
| "debugServerArgs": "--stm32cubeprogrammer-path ${command:vscode-embedded.st.cubeprogrammer} --swd --port-number 3333", | ||
| "serverStarted": "Waiting for connection on port .*\\.\\.\\.", | ||
| "stopAtConnect": true, | ||
| "postRemoteConnectCommands": [ | ||
| // Use IntelliSense to learn about possible attributes. | ||
| // Hover to view descriptions of existing attributes. | ||
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
| { | ||
| "text": "load build/debug/build/SteeringVanttec.elf" | ||
| "name": "Cortex Debug", | ||
| "cwd": "${workspaceFolder}", | ||
| "executable": "./build/debug/build/SteeringVanttec.elf", | ||
| "program": "${command:cmake.launchTargetPath}", | ||
| "request": "launch", | ||
| "type": "cortex-debug", | ||
| "runToEntryPoint": "main", | ||
| "servertype": "openocd", | ||
| "configFiles": [ | ||
| "interface/stlink.cfg", | ||
| "target/stm32l4x.cfg" | ||
| ], | ||
| "device": "stm32l431rc", | ||
| "preLaunchTask": "Build", | ||
| //"svdPath": "${command:vscode-embedded.st.svd}/STM32L4x1.svd", | ||
| "liveWatch": { | ||
| "enabled": true, | ||
| "samplesPerSecond": 4 | ||
| } | ||
| } | ||
| ], | ||
| "logging": { | ||
| "engineLogging": true | ||
| }, | ||
| "preLaunchTask": "Build", | ||
| "svdPath": "${command:vscode-embedded.st.svd}/STM32L4x1.svd" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,35 @@ | ||
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "Build", | ||
| "type": "cmake", | ||
| "command": "build", | ||
| "problemMatcher": "$gcc", | ||
| "group": { | ||
| "kind": "build", | ||
| "isDefault": true | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "Build", | ||
| "type": "cmake", | ||
| "command": "build", | ||
| "problemMatcher": "$gcc", | ||
| "group": "build" | ||
| }, | ||
| { | ||
| "type": "cppbuild", | ||
| "label": "C/C++: gcc build active file", | ||
| "command": "/usr/bin/gcc", | ||
| "args": [ | ||
| "-fdiagnostics-color=always", | ||
| "-g", | ||
| "${file}", | ||
| "-o", | ||
| "${fileDirname}/${fileBasenameNoExtension}" | ||
| ], | ||
| "options": { | ||
| "cwd": "${fileDirname}" | ||
| }, | ||
| "problemMatcher": [ | ||
| "$gcc" | ||
| ], | ||
| "group": { | ||
| "kind": "build", | ||
| "isDefault": true | ||
| }, | ||
| "detail": "Task generated by Debugger." | ||
| } | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #pragma once | ||
|
|
||
| #include "stm32l4xx_hal.h" | ||
|
|
||
| HAL_StatusTypeDef encoder_setup_can(CAN_HandleTypeDef *hcan); | ||
|
|
||
| HAL_StatusTypeDef encoder_initialize_op_mode(CAN_HandleTypeDef *hcan); | ||
|
|
||
| HAL_StatusTypeDef encoder_initialize_briter(CAN_HandleTypeDef *hcan); | ||
|
|
||
| void encoder_task(void *attrs_hcan); | ||
|
|
||
| extern float g_ifm_encoder_position; | ||
| extern float g_briter_encoder_position; | ||
| extern uint32_t g_ifm_encoder_tick_last_update; | ||
| extern uint32_t g_briter_encoder_tick_last_update; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #pragma once | ||
| #include "stepper.h" | ||
|
|
||
| typedef struct { | ||
| uint8_t stepper_id; | ||
| Stepper *stepper; | ||
| float *encoder_value; | ||
| uint32_t *encoder_tick_value; | ||
| } stepper_task_attrs; | ||
|
|
||
| void steering_stepper_task(void *task_attrs); | ||
| void braking_stepper_task(void *task_attrs); |
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.
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.