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
12095e28
Commit
12095e28
authored
1 year ago
by
Malaurie Bernard
Browse files
Options
Downloads
Patches
Plain Diff
Implementation of distance_to_volume method (and also a bit of code editting.
parent
3a250db9
No related branches found
Branches containing commit
No related tags found
1 merge request
!17
Malaurie's work on UI + CLI interface + AccelStepper interface
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
syringefilled.cpp
+13
-0
13 additions, 0 deletions
syringefilled.cpp
syringefilled.h
+3
-3
3 additions, 3 deletions
syringefilled.h
with
16 additions
and
3 deletions
syringefilled.cpp
+
13
−
0
View file @
12095e28
...
@@ -124,6 +124,19 @@ float SyringeFilled::volume_to_distance(float volume_mL, Syringe* id_syringe)
...
@@ -124,6 +124,19 @@ float SyringeFilled::volume_to_distance(float volume_mL, Syringe* id_syringe)
return
distance_mm
;
return
distance_mm
;
}
}
float
SyringeFilled
::
distance_to_volume
(
float
distance_mm
,
Syringe
*
id_syringe
)
/***
-Argument : distance in mm.
-Return : The volume associated in mL.
-Action : /
***/
{
float
piston_surface_mm2
=
id_syringe
->
get_internal_diameter_mm
();
float
volume_mm3
=
distance_mm
*
piston_surface_mm2
;
return
volume_mm3
;
}
//MOVEMENTS
//MOVEMENTS
...
...
This diff is collapsed.
Click to expand it.
syringefilled.h
+
3
−
3
View file @
12095e28
...
@@ -71,6 +71,7 @@ class SyringeFilled : public Motor
...
@@ -71,6 +71,7 @@ class SyringeFilled : public Motor
//CONVERSIONS
//CONVERSIONS
float
volume_to_distance
(
float
volume_mL
,
Syringe
*
id_syringe
);
float
volume_to_distance
(
float
volume_mL
,
Syringe
*
id_syringe
);
float
distance_to_volume
(
float
distance_mm
,
Syringe
*
id_syringe
);
//CLI
//MOVEMENTS
//MOVEMENTS
float
move
();
float
move
();
...
@@ -78,13 +79,12 @@ class SyringeFilled : public Motor
...
@@ -78,13 +79,12 @@ class SyringeFilled : public Motor
//LIMIT SWITCH
//LIMIT SWITCH
void
manage_emergency
(
bool
pressed
,
bool
stepperMoving
);
void
manage_emergency
(
bool
pressed
,
bool
stepperMoving
);
void
run_from_emergency
();
//CLI
//METHODS CLI
//METHODS CLI
bool
check_configuration
();
//a implementer
bool
check_configuration
();
//a implementer
void
show_configuration
();
//a implementer
void
show_configuration
();
//a implementer
float
distance_to_volume
(
float
distance
,
Syringe
*
id_syringe
);
//a implementer
void
run_from_emergency
();
};
};
extern
SyringeFilled
syringe_filled
;
extern
SyringeFilled
syringe_filled
;
\ No newline at end of file
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