added c++11 fixes

removed old components
disabled activity (for compiling reasons)
added wifi 2.4ghz hack
This commit is contained in:
k-a-z-u
2018-07-11 13:23:18 +02:00
parent b0712ec005
commit bb974d3871
18 changed files with 107 additions and 80 deletions

View File

@@ -156,25 +156,25 @@ public:
}
void add(const Timestamp ts, const ActivityData& data) {
// void add(const Timestamp ts, const ActivityData& data) {
static int skip = 0;
if ((++skip % 8) != 0) {return;}
// static int skip = 0;
// if ((++skip % 8) != 0) {return;}
float offset = 0;
switch(data.curActivity) {
case ActivityButterPressure::Activity::DOWN: offset = -0.5; break;
case ActivityButterPressure::Activity::UP: offset = +0.5; break;
case ActivityButterPressure::Activity::STAY: offset = +0.1; break;
}
// float offset = 0;
// switch(data.curActivity) {
// case ActivityButterPressure::Activity::DOWN: offset = -0.5; break;
// case ActivityButterPressure::Activity::UP: offset = +0.5; break;
// case ActivityButterPressure::Activity::STAY: offset = +0.1; break;
// }
addLineNode(ts, line[0].getData().front().val + offset, 1);
if (needsRefresh(ts)) {
limit();
refresh(ts);
}
// addLineNode(ts, line[0].getData().front().val + offset, 1);
// if (needsRefresh(ts)) {
// limit();
// refresh(ts);
// }
}
// }
void limit() {
@@ -224,8 +224,8 @@ SensorDataWidget::SensorDataWidget(QWidget* parent) : QWidget(parent) {
SensorFactory::get().getSteps().addListener(this);
SensorFactory::get().getTurns().addListener(this);
SensorFactory::get().getWiFi().addListener(this);
SensorFactory::get().getActivity().addListener(this);
SensorFactory::get().getCompass().addListener(this);
// SensorFactory::get().getActivity().addListener(this);
// SensorFactory::get().getCompass().addListener(this);
SensorFactory::get().getGPS().addListener(this);
}
@@ -253,20 +253,20 @@ void SensorDataWidget::onSensorData(Sensor<BarometerData>* sensor, const Timesta
((PlotBaro*)plotBaro)->add(ts, data);
}
void SensorDataWidget::onSensorData(Sensor<ActivityData>* sensor, const Timestamp ts, const ActivityData& data) {
(void) sensor;
((PlotBaro*)plotBaro)->add(ts, data);
}
//void SensorDataWidget::onSensorData(Sensor<ActivityData>* sensor, const Timestamp ts, const ActivityData& data) {
// (void) sensor;
// ((PlotBaro*)plotBaro)->add(ts, data);
//}
void SensorDataWidget::onSensorData(Sensor<TurnData>* sensor, const Timestamp ts, const TurnData& data) {
(void) sensor;
((PlotTurns*)plotTurn)->add(ts, data);
}
void SensorDataWidget::onSensorData(Sensor<CompassData>* sensor, const Timestamp ts, const CompassData& data) {
(void) sensor;
((PlotTurns*)plotTurn)->add(ts, data);
}
//void SensorDataWidget::onSensorData(Sensor<CompassData>* sensor, const Timestamp ts, const CompassData& data) {
// (void) sensor;
// ((PlotTurns*)plotTurn)->add(ts, data);
//}
void SensorDataWidget::onSensorData(Sensor<GPSData>* sensor, const Timestamp ts, const GPSData& data) {
(void) sensor;