int destroyTestApp()
{
    // Remove the devices.
    printf("\nRemoving sensor with id '1': %d\n", removeDev("/sensor1"));
    printf("Removing sensor with id '2': %d\n\n", removeDev("/sensor2"));

    // Uninstall the driver.
    printf("Uninstalling driver: %d\n", uninstallDrv());
}
Exemple #2
0
FwUpgradeDialog::FwUpgradeDialog(QWidget* parent, float newV, const QByteArray& fwBlob, Kb* device) :
    QDialog(parent),
    ui(new Ui::FwUpgradeDialog),
    blob(fwBlob), kb(device), evLoop(0), exitSuccess(true)
{
    ui->setupUi(this);
    ui->curLabel->setText(kb->firmware);
    ui->newLabel->setText(QString::number(newV, 'f', 2));
    ui->devLabel->setText(kb->usbModel);

    connect(device, SIGNAL(destroyed()), this, SLOT(removeDev()));
    connect(device, SIGNAL(fwUpdateProgress(int,int)), this, SLOT(fwUpdateProgress(int,int)));
    connect(device, SIGNAL(fwUpdateFinished(bool)), this, SLOT(fwUpdateFinished(bool)));

    setFixedSize(DIALOG_WIDTH, DIALOG_HEIGHT_MIN);
}