[chronojump/michrolab] Persons shown in jumps
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/michrolab] Persons shown in jumps
- Date: Thu, 14 Jul 2022 16:37:59 +0000 (UTC)
commit e808d1c260d5466a832095ccfd64f37de5dfbbce
Author: xpadulles <x padulles gmail com>
Date: Thu Jul 14 18:02:19 2022 +0200
Persons shown in jumps
arduino/michrolab/michrolab.ino | 10 ++++++++--
arduino/michrolab/personsManage.ino | 14 ++++++++++++++
2 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/arduino/michrolab/michrolab.ino b/arduino/michrolab/michrolab.ino
index d49e89f81..e62263b11 100644
--- a/arduino/michrolab/michrolab.ino
+++ b/arduino/michrolab/michrolab.ino
@@ -1342,7 +1342,6 @@ void startJumpsCapture()
rcaFlag = false;
float flightTime = 0;
bool firstContact = true;
-
for (int i = 0; i < 10; i++)
{
bars[i] = 0;
@@ -1351,8 +1350,14 @@ void startJumpsCapture()
redrawAxes(tft, 30, 200, 290, 200, 290, 200, 0, 100, 10, "", "", "", WHITE, GREY, WHITE, WHITE, BLACK,
RED, true);
redButton.update();
int index = 0;
- while (!redButton.fell())
+ currentPerson = 0;
+ updatePersonJump();
+ while ( !redButton.fell() )
{
+ if( blueButton.fell() ){
+ currentPerson = (currentPerson + 1)%totalPersons;
+ updatePersonJump();
+ }
if (rcaFlag)
{
rcaFlag = false;
@@ -1388,6 +1393,7 @@ void startJumpsCapture()
lastRcaTime = rcaTime;
}
redButton.update();
+ blueButton.update();
}
drawMenuBackground();
diff --git a/arduino/michrolab/personsManage.ino b/arduino/michrolab/personsManage.ino
index 341745d2a..28eac7d35 100644
--- a/arduino/michrolab/personsManage.ino
+++ b/arduino/michrolab/personsManage.ino
@@ -140,6 +140,20 @@ void updatePersonSet()
tft.setTextSize(2);
}
+void updatePersonJump()
+{
+ //Deleting last string
+ tft.fillRect(141, 207, 127, 24, BLACK);
+
+ //Writing new string
+ tft.setTextSize(1);
+ tft.setTextColor(WHITE);
+ tft.setCursor(141, 207);
+ tft.print("Jump: " + addLeadingZeros(setNumber, 2) + " Person: " + addLeadingZeros(currentPerson, 2));
+ tft.setCursor(141, 223);
+ tft.print(persons[currentPerson].name + " " + persons[currentPerson].surname);
+ tft.setTextSize(2);
+}
void selectGroup()
{
group = selectValueDialog("Select the group number", "0,9", "1", 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]