Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
ucbus-stepper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jake Read
ucbus-stepper
Commits
c731284b
Commit
c731284b
authored
2 years ago
by
Jake Read
Browse files
Options
Downloads
Patches
Plain Diff
set position, better homing
parent
0ddf452a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
firmware/axl-stepper/src/axl
+1
-1
1 addition, 1 deletion
firmware/axl-stepper/src/axl
firmware/axl-stepper/src/main.cpp
+20
-5
20 additions, 5 deletions
firmware/axl-stepper/src/main.cpp
with
21 additions
and
6 deletions
axl
@
eb34931b
Compare
71bf9021
...
eb34931b
Subproject commit
71bf90214692c6a2fb82d121708b91692648376a
Subproject commit
eb34931b0991d7c6e257968fe60af13b90b1f629
This diff is collapsed.
Click to expand it.
firmware/axl-stepper/src/main.cpp
+
20
−
5
View file @
c731284b
...
@@ -12,7 +12,15 @@
...
@@ -12,7 +12,15 @@
#include
"osape_arduino/vp_arduinoSerial.h"
#include
"osape_arduino/vp_arduinoSerial.h"
#include
"osape_ucbus/vb_ucBusDrop.h"
#include
"osape_ucbus/vb_ucBusDrop.h"
OSAP
osap
(
"axl-stepper_x"
);
//OSAP osap("axl-stepper_z-rear-left");
//OSAP osap("axl-stepper_z-front-left");
//OSAP osap("axl-stepper_z-rear-right");
//OSAP osap("axl-stepper_z-front-right");
OSAP
osap
(
"axl-stepper_y-left"
);
//OSAP osap("axl-stepper_y-right");
//OSAP osap("axl-stepper_x");
//OSAP osap("axl-stepper_e");
VPort_ArduinoSerial
vpUSBSerial
(
&
osap
,
"arduinoUSBSerial"
,
&
Serial
);
VPort_ArduinoSerial
vpUSBSerial
(
&
osap
,
"arduinoUSBSerial"
,
&
Serial
);
...
@@ -34,10 +42,17 @@ EP_ONDATA_RESPONSES onStateData(uint8_t* data, uint16_t len){
...
@@ -34,10 +42,17 @@ EP_ONDATA_RESPONSES onStateData(uint8_t* data, uint16_t len){
}
}
// set or target?
// set or target?
if
(
set
){
if
(
set
){
if
(
mode
==
AXL_MODE_POSITION
){
switch
(
mode
){
OSAP
::
error
(
"axl set-pos... havne't written it yet"
);
case
AXL_MODE_POSITION
:
}
else
{
if
(
axl_isMoving
()){
OSAP
::
error
(
"we can only 'set' position, others are targs"
);
OSAP
::
error
(
"AXL can't set pos while moving"
);
break
;
}
axl_setPosition
(
targ
);
break
;
default
:
OSAP
::
error
(
"we can only 'set' position, others are targs"
);
break
;
}
}
}
else
{
}
else
{
switch
(
mode
){
switch
(
mode
){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment