minor changes to grid walking

This commit is contained in:
k-a-z-u
2017-12-13 16:37:51 +01:00
parent 1114331fd2
commit d48b0b8fd4
7 changed files with 41 additions and 24 deletions

View File

@@ -36,7 +36,7 @@ private:
Timestamp blockUntil;
bool waitForUp = false;
const Timestamp blockTime = Timestamp::fromMS(250); // 150-250 looks good
const Timestamp blockTime; // 150-250 looks good
const float upperThreshold = +0.4*0.6f; // + is usually smaller than down (look at graphs)
const float lowerThreshold = -1.5*0.6f; // the 0.8 is for testing!
@@ -57,7 +57,7 @@ private:
public:
/** ctor */
StepDetection() : avgLong(Timestamp::fromMS(500), 0), avgShort(Timestamp::fromMS(40), 0) {
StepDetection(const Timestamp blockTime = Timestamp::fromMS(200)) : blockTime(blockTime), avgLong(Timestamp::fromMS(500), 0), avgShort(Timestamp::fromMS(40), 0) {
#ifdef WITH_DEBUG_PLOT
gp << "set autoscale xfix\n";