Fix startup bug in usb mode
This commit is contained in:
parent
03ad005f80
commit
4e2ebcdd4a
@ -29,7 +29,6 @@
|
|||||||
#include <QFont>
|
#include <QFont>
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
#include <QRect>
|
#include <QRect>
|
||||||
#include <QProcess>
|
|
||||||
|
|
||||||
namespace f1x
|
namespace f1x
|
||||||
{
|
{
|
||||||
@ -426,12 +425,12 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load configured brightness values
|
// Load configured brightness values
|
||||||
QProcess processbrigthness;
|
system("/usr/local/bin/autoapp_helper getbrightnessvalues");
|
||||||
processbrigthness.start("/usr/local/bin/autoapp_helper getbrightnessvalues");
|
QFile paramFile(QString("/tmp/br_values"));
|
||||||
processbrigthness.waitForFinished();
|
paramFile.open(QIODevice::ReadOnly);
|
||||||
QString brigthness = processbrigthness.readAllStandardOutput();
|
QTextStream data_param(¶mFile);
|
||||||
brigthness.resize(brigthness.size()-1); // remove last line break
|
QStringList brigthnessvalues = data_param.readAll().split("#");
|
||||||
QStringList brigthnessvalues = brigthness.split("#");
|
paramFile.close();
|
||||||
|
|
||||||
// set brightness slider attribs
|
// set brightness slider attribs
|
||||||
ui_->horizontalSliderBrightness->setMinimum(brigthnessvalues[0].toInt());
|
ui_->horizontalSliderBrightness->setMinimum(brigthnessvalues[0].toInt());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user