mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-28 08:37:22 -08:00
N306: Fixes for USBMS
This commit is contained in:
parent
dc92af6293
commit
b2737d2f59
2 changed files with 8 additions and 10 deletions
|
@ -18,6 +18,8 @@ koboxSettings::koboxSettings(QWidget *parent) :
|
||||||
ui->pushButton->setProperty("type", "borderless");
|
ui->pushButton->setProperty("type", "borderless");
|
||||||
ui->resetKoboxBtn->setProperty("type", "borderless");
|
ui->resetKoboxBtn->setProperty("type", "borderless");
|
||||||
ui->pushButton->setStyleSheet("font-weight: bold");
|
ui->pushButton->setStyleSheet("font-weight: bold");
|
||||||
|
ui->resetKoboxBtn->setStyleSheet("font-weight: bold");
|
||||||
|
ui->okBtn->setStyleSheet("font-weight: bold");
|
||||||
|
|
||||||
// Stylesheet
|
// Stylesheet
|
||||||
QFile stylesheetFile(":/resources/eink.qss");
|
QFile stylesheetFile(":/resources/eink.qss");
|
||||||
|
|
|
@ -83,6 +83,12 @@ void usbms_splash::usbms_launch()
|
||||||
string_writeconfig("/opt/ibxd", "usbnet_stop\n");
|
string_writeconfig("/opt/ibxd", "usbnet_stop\n");
|
||||||
QThread::msleep(1000);
|
QThread::msleep(1000);
|
||||||
|
|
||||||
|
if(readFile("/opt/inkbox_device") == "n306\n" or readFile("/opt/inkbox_device") == "n873\n") {
|
||||||
|
QProcess::execute("insmod", QStringList() << "/external_root/modules/fs/configfs/configfs.ko");
|
||||||
|
QProcess::execute("insmod", QStringList() << "/external_root/modules/drivers/usb/gadget/libcomposite.ko");
|
||||||
|
QProcess::execute("insmod", QStringList() << "/external_root/modules/drivers/usb/gadget/function/usb_f_mass_storage.ko");
|
||||||
|
}
|
||||||
|
|
||||||
QString prog_1 ("insmod");
|
QString prog_1 ("insmod");
|
||||||
QStringList args_1;
|
QStringList args_1;
|
||||||
|
|
||||||
|
@ -98,16 +104,6 @@ void usbms_splash::usbms_launch()
|
||||||
proc_1->waitForFinished();
|
proc_1->waitForFinished();
|
||||||
proc_1->deleteLater();
|
proc_1->deleteLater();
|
||||||
|
|
||||||
if(readFile("/opt/inkbox_device") == "n306\n" or readFile("/opt/inkbox_device") == "n873\n") {
|
|
||||||
QString functionInsmodProg("insmod");
|
|
||||||
QStringList functionInsmodArgs;
|
|
||||||
functionInsmodArgs << "/external_root/modules/drivers/usb/gadget/function/usb_f_mass_storage.ko";
|
|
||||||
QProcess * functionInsmodProc = new QProcess();
|
|
||||||
functionInsmodProc->start();
|
|
||||||
functionInsmodProc->waitForFinished();
|
|
||||||
functionInsmodProc->deleteLater();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool exitUsbMsDone = false;
|
bool exitUsbMsDone = false;
|
||||||
QTimer *usbms_t = new QTimer(this);
|
QTimer *usbms_t = new QTimer(this);
|
||||||
usbms_t->setInterval(1000);
|
usbms_t->setInterval(1000);
|
||||||
|
|
Loading…
Reference in a new issue