Skip to content
Snippets Groups Projects
Commit 4380891d authored by Malaurie Bernard's avatar Malaurie Bernard
Browse files

creation of constructors of syringe and syringefilled (not finished but it is the first step

parent b49fa079
No related branches found
No related tags found
1 merge request!17Malaurie's work on UI + CLI interface + AccelStepper interface
...@@ -3,6 +3,16 @@ ...@@ -3,6 +3,16 @@
#include "syringe.h" #include "syringe.h"
//CONSTRUCTORS
Syringe :: Syringe(float total_volume_mL, float internal_diameter_mm, string id)
{
set_total_volume_mL(total_volume_mL);
set_internal_diameter_mm(internal_diameter_mm);
set_id(id);
}
//SET METHODS //SET METHODS
void Syringe :: set_total_volume_mL(float total_volume_mL) void Syringe :: set_total_volume_mL(float total_volume_mL)
......
...@@ -21,6 +21,9 @@ class Syringe ...@@ -21,6 +21,9 @@ class Syringe
public : public :
//CONSTRUCTORS
Syringe(float total_volume_mL, float internal_diameter_mm, string id); //There are arguments because we need to know what values to add in the Json document (no default syringe)
//SET METHODS //SET METHODS
void set_total_volume_mL(float total_volume_mL); void set_total_volume_mL(float total_volume_mL);
void set_internal_diameter_mm(float internal_diameter_mm); void set_internal_diameter_mm(float internal_diameter_mm);
......
#include "syringefilled.h" #include "syringefilled.h"
/*
//CONSTRUCTORS //CONSTRUCTORS
SyringeFilled :: SyringeFilled() : Motor(&ISRStepper) _exchange_throughput_uL_per_sec(0), _exchange_volume_mL(0), _remaining_volume_mL(0), _push(true), id_syringe(SyringeJSON["1"]) SyringeFilled :: SyringeFilled() : Motor (&ISRStepper) //pb with my motor constructor
*/ {
set_exchange_throughput_uL_per_sec(1);
set_exchange_volume_mL(1);
set_remaining_volume_mL(1);
set_push(true);
set_id_syringe(??); //put one of the syringes stored by default, undefined for now
set_screw_thread_mm(4);
set_clockwise_equals_push(true);
set_emergency(false);
}
//SET METHODS //SET METHODS
void SyringeFilled :: set_exchange_throughput_uL_per_sec(float exchange_throughput_uL_per_sec) void SyringeFilled :: set_exchange_throughput_uL_per_sec(float exchange_throughput_uL_per_sec)
......
#pragma once #pragma once
#include "syringe.h" #include "syringe.h"
#include "motor.h"
#include <ArduinoJson.h> #include <ArduinoJson.h>
#include "math.h" #include "math.h"
#include <interrupts.h> // InterruptLock #include <interrupts.h> // InterruptLock
...@@ -38,11 +39,10 @@ class SyringeFilled : public Motor ...@@ -38,11 +39,10 @@ class SyringeFilled : public Motor
bool _emergency; bool _emergency;
public : public :
/*
//CONSTRUCTORS //CONSTRUCTORS
SyringeFilled(); SyringeFilled();
SyringeFilled(float exchange_throughput_uL_per_sec, float exchange_volume_mL, float remaining_volume_mL, bool push, int* id);
*/
//SET METHODS //SET METHODS
void set_exchange_throughput_uL_per_sec(float exchange_throughput_uL_per_sec); void set_exchange_throughput_uL_per_sec(float exchange_throughput_uL_per_sec);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment