Julius Bernth / Mbed OS Cuvette_Centrifuge_Test_v1-2_ParallelMode

Dependencies:   QEI LIS3DH_spi

Revision:
5:e9bb800a3742
Parent:
4:d04afc466198
Child:
6:004dc33f4081
--- a/Settings.h	Sun Aug 08 14:59:54 2021 +0000
+++ b/Settings.h	Mon Aug 09 18:59:04 2021 +0000
@@ -4,7 +4,11 @@
 #define STATE_READY     0x01
 #define STATE_RUNNING   0x02
 #define STATE_ERROR     0x03
-#define STATE_HALT     0x04
+
+#define SPI_MOSI    PB_15
+#define SPI_MISO    PB_15
+#define SPI_SCLK    PB_13
+#define SPI_CS      PB_1
 
 #define SPIN_WARMUP     0x10
 #define SPIN_ACCEL      0x11
@@ -12,18 +16,9 @@
 #define SPIN_DECEL      0x13
 #define SPIN_COOLDOWN   0x14
 
-#define ERROR_ACCEL     0x20
-#define ERROR_MAN_STOP  0x21
-
-#define SPI_MOSI    PB_15
-#define SPI_MISO    PB_15
-#define SPI_SCLK    PB_13
-#define SPI_CS      PB_1
-
 const double BUTTON_HOLD_TIME_S = 3.0;
 const double BUTTON_READ_SAMPLETIME_S = 0.01;
 
-const double VIBRATION_THRESHOLD = 1.0;
 
 const double FILTER_CUTOFF_FREQ = 100.0;
 const double PULSES_PER_REV = 256;
@@ -31,11 +26,9 @@
 const double SAMPLE_TIME_US = 1000;
 const double PRINT_TIME_S = 0.1;
 
-const double MOTOR_STOP_TIMEOUT = 5.0;
-
 const double Kp = 0.02;
 const double Ki = 0.00;
-const double Kd = 0;
+const double Kd = 0.001;
 
 const double INTEGRAL_TERM_LIMIT = 0.8;