Browse files

Cleaning up outputs and other minor fixes

  • Loading branch information...
1 parent 112a0b8 commit 7853d64aab72ede653f278339d889b8985dbf8a1 cpscotti committed May 12, 2011
View
1 PushBurton2/npushrotationstick.cpp
@@ -6,6 +6,7 @@ NPushRotationsTick::NPushRotationsTick(double a_rawDegs, quint64 a_msecsToEpoch)
rawDegs = a_rawDegs;
updateCleanDegs();
+ qDebug() << "Landed a " << cleanDegs;
}
NPushRotationsTick::~NPushRotationsTick()
View
9 PushBurton2/pushn8airtimedetector.cpp
@@ -38,9 +38,6 @@ void PushN8AirTimeDetector::incoming_reading(NPushLogTick * gtick)
currentTstamp = ftick->msecsToEpoch;
runFuzzy = true;
-// if(fp < 2000) {
-// qDebug() << "Got air here";
-// }
// qDebug() << "Got Sum: " << ftick->pdata.totalRawSum;
@@ -108,12 +105,11 @@ void PushN8AirTimeDetector::handle_response_new(Response resp)
case IdleGround:
switch(resp) {
case FlyingLikeAnEagle:
- qDebug() << "Going to Counting Air";
dynamic_state = CountingAir;
takeOffTime = currentTstamp;
lastAirborneTime = takeOffTime;
- qDebug() << "take off: " << takeOffTime;
+// qDebug() << "take off: " << takeOffTime;
//NOTE: To make SpinToWinKid possible
newTick = new NPushAirTimeTick(0, false, currentTstamp, true);
@@ -148,7 +144,6 @@ void PushN8AirTimeDetector::handle_response_new(Response resp)
// qDebug() << "Sliding lika bitch";
if(lastAirborneTime >= takeOffTime) {
dynamic_state = IdleGround;
- qDebug() << "IdleGround";
}
break;
@@ -182,7 +177,7 @@ void PushN8AirTimeDetector::handle_response_new(Response resp)
case SlidingDownLikeAPenguin:
if(lastAirborneTime >= takeOffTime) {
dynamic_state = CountingGround;
- qDebug() << "CountingGround";
+// qDebug() << "CountingGround";
touchDownTime = currentTstamp;
}
break;
View
2 PushBurton2/pushn8simulationdevice.cpp
@@ -56,7 +56,7 @@ PushN8SimulationDevice::PushN8SimulationDevice()
digitalAcc = false;
timerId = 0;
- timerPeriod = 20;
+ timerPeriod = 10;
}
PushN8SimulationDevice::~PushN8SimulationDevice()
View
4 PushBurton2/rotationcounter.cpp
@@ -55,7 +55,7 @@ void RotationCounter::incoming_reading(NPushLogTick * tick)
if(airTimeTick->isOnlyHint && afterJumpDecCnter == 0) {
// qDebug() << "SpinToWinKid got hint";
- //This hint points to a possible airTime starting now. But it'll only be confirmed with the landed=true
+ //This 'hint' points to a possible airTime starting now. But it'll only be confirmed with the landed=true
onAir = true;
spinAcc = 0.0;
afterJumpDecCnter = 0;
@@ -71,7 +71,7 @@ void RotationCounter::incoming_reading(NPushLogTick * tick)
lastTstamp = airTimeTick->msecsToEpoch;
} else if(airTimeTick->landed) {
-// qDebug() << "Landed Trick; SpinAcc = " << spinAcc;
+// qDebug() << "Landed Trick; SpinAcc = " << spinAcc;
onAir = false;
afterJumpDecCnter = NEXT_SPIN_ACC_LENGTH;
}
View
6 PushBurton2/ubiqlogsaver.cpp
@@ -48,6 +48,8 @@ UbiqLogSaver::UbiqLogSaver(uint a_start_time)
runEnd = false;
this->start();
+
+ tickcount = 0;
}
UbiqLogSaver::~UbiqLogSaver()
@@ -75,6 +77,8 @@ void UbiqLogSaver::run()
tick->dump_to_xml(xml);
dataFile->flush();
ticksLock.lock();
+ tickcount++;
+// qDebug() << "saving tick = " << tickcount;
}
ticksLock.unlock();
@@ -112,7 +116,7 @@ void UbiqLogSaver::run_end()
xml.writeEndElement();//N8SensorsLog
xml.writeEndDocument();
dataFile->close();
- qDebug() << "File closed";
+ qDebug() << "File closed, dumped " << tickcount << " ticks";
}
void UbiqLogSaver::CreateRunDir()
View
2 PushBurton2/ubiqlogsaver.h
@@ -75,6 +75,8 @@ public slots:
QFile* dataFile;
QXmlStreamWriter xml;
+
+ int tickcount;
};
#endif // UBIQLOGSAVER_H

0 comments on commit 7853d64

Please sign in to comment.