Skip to content

Commit

Permalink
update branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Hethsron committed Jun 19, 2020
1 parent 12fbe8c commit 6ddab02
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 6 deletions.
Binary file modified resources/assets/qhc/summary.qhc
Binary file not shown.
48 changes: 42 additions & 6 deletions vera/src/view/mainview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -918,15 +918,51 @@ void MainView::seek(int second) {
}

void MainView::nameClicked(QListWidgetItem* item) {
// Check accelerometer graph data X is empty
if (!accelX->data()->isEmpty()) {
// Clear graph data
accelX->data()->clear();
}

// Check accelerometer graph data Y is empty
if (!accelY->data()->isEmpty()) {
// Clear graph data
accelY->data()->clear();
}

// Check accelerometer graph data Z is empty
if (!accelZ->data()->isEmpty()) {
// Clear graph data
accelZ->data()->clear();
}

// Check gyroscope graph data X is empty
if (!gyroX->data()->isEmpty()) {
// Clear graph data
gyroX->data()->clear();
}

// Check gyroscope graph data Y is empty
if (!gyroY->data()->isEmpty()) {
// Clear graph data
gyroY->data()->clear();
}

// Check gyroscope graph data Z is empty
if (!gyroZ->data()->isEmpty()) {
// Clear graph data
gyroZ->data()->clear();
}

// Setting accelerometer graph data
accelX->setData(wearables->get(item->text())->getTime(), wearables->get(item->text())->getAccelX());
accelY->setData(wearables->get(item->text())->getTime(), wearables->get(item->text())->getAccelY());
accelZ->setData(wearables->get(item->text())->getTime(), wearables->get(item->text())->getAccelZ());
accelX->addData(wearables->get(item->text())->getTime(), wearables->get(item->text())->getAccelX());
accelY->addData(wearables->get(item->text())->getTime(), wearables->get(item->text())->getAccelY());
accelZ->addData(wearables->get(item->text())->getTime(), wearables->get(item->text())->getAccelZ());

// Setting gyroscope graph data
gyroX->setData(wearables->get(item->text())->getTime(), wearables->get(item->text())->getGyroX());
gyroY->setData(wearables->get(item->text())->getTime(), wearables->get(item->text())->getGyroY());
gyroZ->setData(wearables->get(item->text())->getTime(), wearables->get(item->text())->getGyroZ());
gyroX->addData(wearables->get(item->text())->getTime(), wearables->get(item->text())->getGyroX());
gyroY->addData(wearables->get(item->text())->getTime(), wearables->get(item->text())->getGyroY());
gyroZ->addData(wearables->get(item->text())->getTime(), wearables->get(item->text())->getGyroZ());

// Setting accelerometer graph range
accelX->valueAxis()->setRange(wearables->get(item->text())->getMinAccelX(), wearables->get(item->text())->getMaxAccelX());
Expand Down

0 comments on commit 6ddab02

Please sign in to comment.