mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 23:57:22 -08:00
USBMS prompt
This commit is contained in:
parent
e19f3867ca
commit
49e6a7167f
3 changed files with 23 additions and 1 deletions
|
@ -37,6 +37,7 @@ namespace global {
|
|||
}
|
||||
inline bool updateDialog;
|
||||
inline bool lowBatteryDialog;
|
||||
inline bool usbmsDialog;
|
||||
}
|
||||
namespace settings {
|
||||
inline bool settingsRebootDialog;
|
||||
|
|
|
@ -350,6 +350,26 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
} );
|
||||
batteryWatchdog->start();
|
||||
|
||||
// USB mass storage prompt
|
||||
QTimer *usbmsPrompt = new QTimer(this);
|
||||
usbmsPrompt->setInterval(2000);
|
||||
connect(usbmsPrompt, &QTimer::timeout, [&]() {
|
||||
if(global::mainwindow::usbmsDialog != true) {
|
||||
;
|
||||
}
|
||||
else {
|
||||
string_checkconfig_ro("/sys/devices/platform/fsl-usb2-udc/gadget/suspended");
|
||||
if(checkconfig_str_val != "0\n") {
|
||||
// Loop again...
|
||||
;
|
||||
}
|
||||
else {
|
||||
// An USB cable is connected!
|
||||
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
// We set the brightness level saved in the config file
|
||||
int brightness_value = brightness_checkconfig(".config/03-brightness/config");
|
||||
set_brightness(brightness_value);
|
||||
|
|
|
@ -28,8 +28,9 @@ usbms_splash::usbms_splash(QWidget *parent) :
|
|||
stylesheetFile.close();
|
||||
|
||||
ui->label->setText("Launching KoBox subsystem");
|
||||
ui->label->setStyleSheet("font-size: 14pt");
|
||||
ui->label_3->setText("Please wait, this could take a while.");
|
||||
ui->label_3->setStyleSheet("font-size: 9pt");
|
||||
ui->label_3->setStyleSheet("font-size: 10pt");
|
||||
|
||||
QPixmap pixmap(":/resources/kobox-icon.png");
|
||||
QPixmap scaledPixmap = pixmap.scaled(stdIconWidth, stdIconHeight, Qt::KeepAspectRatio);
|
||||
|
|
Loading…
Reference in a new issue