Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pousseseringue-arduino
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
FabLAAS
PousseSeringue
pousseseringue-arduino
Commits
a63a5100
Commit
a63a5100
authored
1 year ago
by
Malaurie Bernard
Browse files
Options
Downloads
Patches
Plain Diff
Changing pousse-seringue.cpp to make it fit new class and methods.
parent
972a27ae
No related branches found
No related tags found
1 merge request
!17
Malaurie's work on UI + CLI interface + AccelStepper interface
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pousseseringue-arduino.cpp
+6
-5
6 additions, 5 deletions
pousseseringue-arduino.cpp
with
6 additions
and
5 deletions
pousseseringue-arduino.cpp
+
6
−
5
View file @
a63a5100
...
...
@@ -56,6 +56,7 @@ SSD1306AsciiWire oled;
#include
"motor.h"
#include
"Debouncer.h"
// local, debouncer, short counter, long detector
#include
"syringe.h"
#include
"syringefilled.h"
#include
"cli.h"
#include
"common.h"
#include
"fs.h"
...
...
@@ -88,8 +89,8 @@ float stepsPerSeconds2rpm () { return 60.0 * stepsPerSeconds / (MOTOR_STEPS * MI
int
rpming
=
0
;
// -1, 0 or +1
// single syringe global instance
Syringe
syringe
(
stepper
);
Cli
console
(
syringe
);
Syringe
Filled
syringe
filled
(
stepper
);
Cli
console
(
syringe
_filled
);
const
char
*
oledMode
()
{
...
...
@@ -178,7 +179,7 @@ void buttons (int shortp, int longp)
// log debug on serial console
Serial
.
printf
(
"button change: short:%d long:%d
\n
"
,
shortp
,
longp
);
syringe
.
stop
();
syringe
_filled
.
stop
();
auto
oldrpming
=
rpming
;
rpming
=
0
;
// anything stops rpming
...
...
@@ -272,7 +273,7 @@ void setup()
oled
.
println
(
"Booting...
\n
"
);
//syringe.setPhysical(MOTOR_STEPS * MICROSTEPS_CONF, M4_MMREV, /*forwardClockWise*/true, /*emergencySensorBehind*/false);
syringe
.
setPhysical
(
MOTOR_STEPS
*
MICROSTEPS_CONF
,
M5_MMREV
,
/*forwardClockWise*/
false
,
/*emergencySensorBehind*/
true
);
syringe
_filled
.
setPhysical
(
MOTOR_STEPS
*
MICROSTEPS_CONF
,
M5_MMREV
,
/*forwardClockWise*/
false
);
pinMode
(
SLEEP
,
OUTPUT
);
digitalWrite
(
SLEEP
,
0
);
...
...
@@ -354,7 +355,7 @@ void loop()
{
if
(
bEmergency
.
update
(
digitalRead
(
COURSE
)))
{
syringe
.
manage
E
mergency
(
bEmergency
.
pressed
(),
!!
stepper
.
distanceToGo
());
syringe
filled
.
manage
_e
mergency
(
bEmergency
.
pressed
(),
!!
stepper
.
distanceToGo
());
Serial
.
printf
(
"%sEmergency=%u (remaining steps = %lu)
\n
"
,
msgHeader
,
bEmergency
.
pressed
(),
stepper
.
distanceToGo
());
}
...
...
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