void Dialog::on_startPressurePlot_released()
{
    if (window_flag == false) {
        plotWindow2 = new PlotWindow();
        plotWindow2->show();
        connect(this, &Dialog::get_pressure_data, plotWindow2, &PlotWindow::realtimeDataSlot);
        window_flag = true;
    }
    button_state = !button_state;
    if (button_state) {       // plotting started
        dialog_ui->connectUSB->setDisabled(true);
        pressureData = 0.0;
        first_read = true;
        pressure_time.start(20);
        plotWindow2->startPlotTimer();
        dialog_ui->startPressurePlot->setText("Pause Plotting");
        dialog_ui->usbStatus->setText("Status: Receiving pressure data for plotting.");
    } else {                  // plotting paused
        dialog_ui->connectUSB->setDisabled(false);
        pressure_time.stop();
        dialog_ui->startPressurePlot->setText("Re-Start Plotting");
        dialog_ui->usbStatus->setText("Status: Paused plotting pressure data.");
    }
}