[chronojump] Forcesensor: Triggers shown on forceSensor Analyze
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Forcesensor: Triggers shown on forceSensor Analyze
- Date: Fri, 19 Mar 2021 12:01:20 +0000 (UTC)
commit 03e45f769e9be09bdca9be87555e9fc82ef9a6d4
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Mar 19 13:00:40 2021 +0100
Forcesensor: Triggers shown on forceSensor Analyze
src/gui/app1/forceSensorAnalyze.cs | 30 ++++++++++++++++++++----------
1 file changed, 20 insertions(+), 10 deletions(-)
---
diff --git a/src/gui/app1/forceSensorAnalyze.cs b/src/gui/app1/forceSensorAnalyze.cs
index d6009102..5fc33ef1 100644
--- a/src/gui/app1/forceSensorAnalyze.cs
+++ b/src/gui/app1/forceSensorAnalyze.cs
@@ -1604,19 +1604,29 @@ public partial class ChronoJumpWindow
}
}
- /*
- // triggers
- double lowerMs = fsAI.GetTimeMS(hscaleLower);
- double higherMs = fsAI.GetTimeMS(hscaleHigher);
- foreach(Trigger trigger in triggerListForceSensor)
+ // triggers. Right now only show triggers on not zoom
+ if(! forceSensorZoomApplied)
{
- if(trigger.Ms > lowerMs && trigger.Ms < HigherMs)
+ int lastCount = fsAI.GetLength() -1;
+ double lastMs = fsAI.GetTimeMS(lastCount);
+ int xLastPos = fsAI.GetXFromSampleCount(lastCount);
+
+ foreach(Trigger trigger in triggerListForceSensor.GetList())
+ {
//write the vertical start line
- force_sensor_ai_pixmap.DrawLine(pen_green_force_ai,
- ???, textHeight +6, ???, allocation.Height - textHeight -6);
- //TODO: do green for on, red for off
+ //int tempX = fsAI.GetXFromSampleCount(trigger.Ms); not because is not a count
+
+ double triggerPercent1 = UtilAll.DivideSafe(trigger.Ms, lastMs);
+ int xtrigger = Convert.ToInt32(triggerPercent1 * xLastPos);
+
+ if(trigger.InOut)
+ force_sensor_ai_pixmap.DrawLine(pen_green_force_ai,
+ xtrigger, textHeight +6, xtrigger, allocation.Height
- textHeight -6);
+ else
+ force_sensor_ai_pixmap.DrawLine(pen_red_force_ai,
+ xtrigger, textHeight +6, xtrigger, allocation.Height
- textHeight -6);
+ }
}
- */
LogB.Information("forceSensorAnalyzeManualGraphDo() END");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]