[chronojump/michrolab] Added person, exercise and person info in encoder file



commit 024cc21c9bd38ba496d0e9f2fe49b6978e55e43b
Author: Xavier Padullés <testing chronojump org>
Date:   Mon Aug 29 17:02:47 2022 +0200

    Added person, exercise and person info in encoder file

 arduino/michrolab/michrolab.ino | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/arduino/michrolab/michrolab.ino b/arduino/michrolab/michrolab.ino
index 031cf7df7..a9f883feb 100644
--- a/arduino/michrolab/michrolab.ino
+++ b/arduino/michrolab/michrolab.ino
@@ -48,6 +48,7 @@ String version = "0.1";
 Encoder encoder(8, 9);
 IntervalTimer encoderTimer;
 long position = 0;
+float load = 0.0;
 bool inertialMode = false;
 long lastEncoderPosition = 0;
 long lastSamplePosition;
@@ -1135,6 +1136,9 @@ void captureBars(float fullScreen)
 
   fullFileName = "/" + dirName + "/" + fileName + ".txt";
   dataFile = SD.open(fullFileName.c_str(), FILE_WRITE);
+  dataFile.println("Person:" + String(persons[currentPerson].index) + "," + persons[currentPerson].name + " 
" + persons[currentPerson].surname);
+  dataFile.println("Exercise:" + String(gravTypes[currentExerciseType].id) + "," + 
gravTypes[currentExerciseType].name);
+  dataFile.println("Load:" + String(load));
 
   tft.fillScreen(BLACK);
   
@@ -1368,7 +1372,7 @@ void startEncoderCapture(void)
   readExercisesFile(gravitatory);
   selectPersonDialog();
   selectExerciseType(gravitatory);
-  selectValueDialog("Select the load you are\ngoing to move", "0,5,20,200", "0.5,1,5", 1);
+  load = selectValueDialog("Select the load you are\ngoing to move", "0,5,20,200", "0.5,1,5", 1);
   //captureRaw();
   encoderTimer.begin(saveEncoderSpeed, 1000);
   captureBars(false);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]