[chronojump] Bars show speed & power. more data treeview capture realtime



commit 22abb96d1ddc43c89be684e24a2f95d16609be53
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Jan 20 01:48:27 2015 +0100

    Bars show speed & power. more data treeview capture realtime

 encoder/capture.R  |   10 +++++++---
 src/gui/encoder.cs |   19 +++++++++++++------
 2 files changed, 20 insertions(+), 9 deletions(-)
---
diff --git a/encoder/capture.R b/encoder/capture.R
index 863f12e..65580b6 100644
--- a/encoder/capture.R
+++ b/encoder/capture.R
@@ -54,11 +54,13 @@ while(input[1] != "Q") {
                                      )
        start = reduceTemp[1]
        end = reduceTemp[2]
+       write("printing reduceTemp2", stderr())
+       write(reduceTemp[2], stderr())
        if(end > length(displacement))
                end = length(displacement)
        
-       #print("printing reduceTemp")
-       #print(c(start, end, length(displacement)))
+       write("printing reduceTemp", stderr())
+       write(c(start, end, length(displacement)),stderr())
 
        displacement = displacement[start:end]
 
@@ -92,7 +94,9 @@ while(input[1] != "Q") {
        #print(paf)
 
        #do not use print because it shows the [1] first. Use cat:
-       cat(paste(paf$meanSpeed, paf$maxSpeed, paf$maxSpeedT, paf$meanPower, paf$peakPower, paf$peakPowerT, 
paf$pp_ppt, sep=", "))
+       cat(paste(#start, #start is not used because we have no data of the initial zeros
+                 (end-start), (position[end]-position[start]),
+                 paf$meanSpeed, paf$maxSpeed, paf$maxSpeedT, paf$meanPower, paf$peakPower, paf$peakPowerT, 
paf$pp_ppt, sep=", "))
        cat("\n") #mandatory to read this from C#, but beware, there we will need a trim to remove the 
windows \r\n
 
 
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 0a3b432..e3090a7 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -4780,12 +4780,19 @@ LogB.Debug("D");
 
                        encoderCaptureStringR += 
string.Format("\n{0},2,a,3,4,{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},7",
                                        0,
-                                       0, 0,
-                                       0,
-                                       strs[0], strs[1], strs[2],
-                                       strs[3], strs[4], strs[5],
-                                       strs[6]);
+                                       0, strs[0],                     //start, width
+                                       strs[1],                        //height
+                                       strs[2], strs[3], strs[4],      //speeds
+                                       strs[5], strs[6], strs[7],      //powers
+                                       strs[8]);                       //pp/ppt
                        
+
+                       double meanSpeed = Convert.ToDouble(Util.ChangeDecimalSeparator(strs[2]));
+                       double maxSpeed = Convert.ToDouble(Util.ChangeDecimalSeparator(strs[3]));
+                       double meanPower = Convert.ToDouble(Util.ChangeDecimalSeparator(strs[5]));
+                       double peakPower = Convert.ToDouble(Util.ChangeDecimalSeparator(strs[6]));
+                       captureCurvesBarsData.Add(new EncoderBarsData(meanSpeed, maxSpeed, meanPower, 
peakPower));
+
                        //executed on GTK thread pulse method
                        needToRefreshTreeviewCapture = true;
                }
@@ -4854,7 +4861,7 @@ LogB.Debug("D");
                                                double mainVariableLower = 
encoderCaptureOptionsWin.GetMainVariableLower(mainVariable);
                                                //TODO:
                                                //captureCurvesBarsData.Add(new EncoderBarsData(meanSpeed, 
maxSpeed, meanPower, peakPower));
-                                               captureCurvesBarsData.Add(new EncoderBarsData(20, 39, 10, 
40));
+                                               //captureCurvesBarsData.Add(new EncoderBarsData(20, 39, 10, 
40));
 
                                                plotCurvesGraphDoPlot(mainVariable, mainVariableHigher, 
mainVariableLower, captureCurvesBarsData, 
                                                                true);  //capturing


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