Device: Report whether the current driver supports DFU

pull/35/head
Paul Hollinsky 2021-05-04 22:53:28 -04:00
parent 805ff4f549
commit b104b34919
4 changed files with 11 additions and 0 deletions

View File

@ -210,6 +210,11 @@ public:
NODISCARD("If the Lifetime is not held, disconnects will be immediately unsuppressed")
Lifetime suppressDisconnects();
/**
* Some alternate communication protocols do not support DFU
*/
virtual bool currentDriverSupportsDFU() const { return true; }
const device_eventhandler_t& getEventHandler() const { return report; }
std::shared_ptr<Communication> com;

View File

@ -50,6 +50,8 @@ public:
productId = PRODUCT_ID;
}
bool currentDriverSupportsDFU() const override { return false; }
protected:
void setupSettings(IDeviceSettings& ssettings) override {
// TODO Check firmware version, old firmwares will reset Ethernet settings on settings send

View File

@ -56,6 +56,8 @@ public:
return supportedNetworks;
}
bool currentDriverSupportsDFU() const override { return false; }
protected:
virtual void setupSupportedRXNetworks(std::vector<Network>& rxNetworks) override {
for(auto& netid : GetSupportedNetworks())

View File

@ -56,6 +56,8 @@ public:
return supportedNetworks;
}
bool currentDriverSupportsDFU() const override { return false; }
protected:
virtual void setupSupportedRXNetworks(std::vector<Network>& rxNetworks) override {
for(auto& netid : GetSupportedNetworks())