1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00

Suppress the "plug other devices in" dialog for revo bootloader, at least until

we can have other connected devices.
This commit is contained in:
James Cotton 2012-05-12 13:22:46 -05:00
parent 46fc5fa4fb
commit 9a32e637e9
3 changed files with 7 additions and 9 deletions

View File

@ -1049,7 +1049,7 @@ int DFUObject::receiveData(void * data,int size)
#define BOARD_ID_INS 2
#define BOARD_ID_PIP 3
#define BOARD_ID_CC 4
//#define BOARD_ID_PRO ?
#define BOARD_ID_REVO 9
/**
Gets the type of board connected
@ -1074,11 +1074,9 @@ OP_DFU::eBoardType DFUObject::GetBoardType(int boardNum)
case BOARD_ID_CC: // CopterControl family
brdType = eBoardCC;
break;
#if 0 // Someday ;-)
case BOARD_ID_PRO: // Pro board
brdType = eBoardPro;
case BOARD_ID_REVO: // Revo board
brdType = eBoardRevo;
break;
#endif
}
return brdType;
}

View File

@ -98,9 +98,9 @@ namespace OP_DFU {
eBoardUnkwn = 0,
eBoardMainbrd = 1,
eBoardINS,
eBoardPip,
eBoardCC,
eBoardPro,
eBoardPip = 3,
eBoardCC = 4,
eBoardRevo = 9,
};
struct device

View File

@ -510,7 +510,7 @@ void UploaderGadgetWidget::systemRescue()
m_config->rescueButton->setEnabled(true);
return;
}
if ((eBoardCC != dfu->GetBoardType(0)) && (QMessageBox::question(this,tr("OpenPilot Uploader"),tr("If you want to search for other boards connect power now and press Yes"),QMessageBox::Yes,QMessageBox::No)==QMessageBox::Yes))
if ((dfu->GetBoardType(0) != eBoardRevo) && (eBoardCC != dfu->GetBoardType(0)) && (QMessageBox::question(this,tr("OpenPilot Uploader"),tr("If you want to search for other boards connect power now and press Yes"),QMessageBox::Yes,QMessageBox::No)==QMessageBox::Yes))
{
log("\nWaiting...");
QTimer::singleShot(3000, &m_eventloop, SLOT(quit()));