mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
Merge remote-tracking branch 'next' into corvuscorax/OP-947_stateestimator-module
This commit is contained in:
commit
88071b1078
@ -178,16 +178,16 @@ bool PIOS_USB_CheckAvailable(__attribute__((unused)) uint32_t id)
|
|||||||
|
|
||||||
usb_found = ((usb_dev->cfg->vsense.gpio->IDR & usb_dev->cfg->vsense.init.GPIO_Pin) != 0) ^ usb_dev->cfg->vsense_active_low;
|
usb_found = ((usb_dev->cfg->vsense.gpio->IDR & usb_dev->cfg->vsense.init.GPIO_Pin) != 0) ^ usb_dev->cfg->vsense_active_low;
|
||||||
|
|
||||||
bool status = usb_found != 0 && transfer_possible ? 1 : 0;
|
bool status = usb_found != 0 && transfer_possible ? 1 : 0;
|
||||||
bool reconnect = false;
|
bool reconnect = false;
|
||||||
#ifdef PIOS_INCLUDE_FREERTOS
|
#ifdef PIOS_INCLUDE_FREERTOS
|
||||||
if(xSemaphoreTakeFromISR(usb_dev->statusCheckSemaphore, NULL) == pdTRUE) {
|
if (xSemaphoreTakeFromISR(usb_dev->statusCheckSemaphore, NULL) == pdTRUE) {
|
||||||
#endif
|
#endif
|
||||||
reconnect = (lastStatus && !status);
|
reconnect = (lastStatus && !status);
|
||||||
lastStatus = status;
|
lastStatus = status;
|
||||||
#ifdef PIOS_INCLUDE_FREERTOS
|
#ifdef PIOS_INCLUDE_FREERTOS
|
||||||
xSemaphoreGiveFromISR(usb_dev->statusCheckSemaphore, NULL);
|
xSemaphoreGiveFromISR(usb_dev->statusCheckSemaphore, NULL);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (reconnect) {
|
if (reconnect) {
|
||||||
raiseDisconnectionCallbacks();
|
raiseDisconnectionCallbacks();
|
||||||
|
@ -65,11 +65,9 @@ UAVObjectManager *ConfigPlugin::getObjectManager()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ConfigPlugin::extensionsInitialized()
|
void ConfigPlugin::extensionsInitialized()
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
void ConfigPlugin::shutdown()
|
void ConfigPlugin::shutdown()
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
Q_EXPORT_PLUGIN(ConfigPlugin)
|
Q_EXPORT_PLUGIN(ConfigPlugin)
|
||||||
|
Loading…
Reference in New Issue
Block a user