N306: Fixes for USBMS

This commit is contained in:
Nicolas Mailloux 2022-03-06 13:37:01 -05:00
parent dc92af6293
commit b2737d2f59
2 changed files with 8 additions and 10 deletions

View file

@ -18,6 +18,8 @@ koboxSettings::koboxSettings(QWidget *parent) :
ui->pushButton->setProperty("type", "borderless");
ui->resetKoboxBtn->setProperty("type", "borderless");
ui->pushButton->setStyleSheet("font-weight: bold");
ui->resetKoboxBtn->setStyleSheet("font-weight: bold");
ui->okBtn->setStyleSheet("font-weight: bold");
// Stylesheet
QFile stylesheetFile(":/resources/eink.qss");

View file

@ -83,6 +83,12 @@ void usbms_splash::usbms_launch()
string_writeconfig("/opt/ibxd", "usbnet_stop\n");
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");
QStringList args_1;
@ -98,16 +104,6 @@ void usbms_splash::usbms_launch()
proc_1->waitForFinished();
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;
QTimer *usbms_t = new QTimer(this);
usbms_t->setInterval(1000);