Device: Refactor supportsNetworkMutex

This commit is contained in:
Kyle Schwarz
2026-05-05 20:35:51 -04:00
parent 9abd9389f4
commit a68b64c641
6 changed files with 12 additions and 18 deletions
+2 -2
View File
@@ -878,8 +878,6 @@ public:
bool unlockNetworks(const std::set<Network::NetID>& networks);
bool unlockAllNetworks();
std::shared_ptr<NetworkMutexMessage> getNetworkMutexStatus(Network::NetID network);
virtual bool supportsNetworkMutex() const { return false; }
protected:
bool online = false;
@@ -998,6 +996,8 @@ protected:
std::optional<HardwareInfo::Version> bootloaderVersion = std::nullopt;
bool supportsNetworkMutex = false;
private:
neodevice_t data;
std::shared_ptr<ResetStatusMessage> latestResetStatus;
@@ -81,6 +81,7 @@ public:
}
protected:
NeoVIFIRE3(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
supportsNetworkMutex = true;
initialize<NeoVIFIRE3Settings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);
}
@@ -123,8 +124,6 @@ protected:
size_t getDiskCount() const override {
return 2;
}
bool supportsNetworkMutex() const override { return true; }
};
}
@@ -86,6 +86,7 @@ public:
}
protected:
NeoVIFIRE3FlexRay(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
supportsNetworkMutex = true;
initialize<NeoVIFIRE3FlexRaySettings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);
}
@@ -150,8 +151,6 @@ protected:
size_t getDiskCount() const override {
return 2;
}
bool supportsNetworkMutex() const override { return true; }
};
}
@@ -89,6 +89,7 @@ public:
}
protected:
NeoVIFIRE3T1SLIN(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
supportsNetworkMutex = true;
initialize<NeoVIFIRE3T1SLINSettings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);
}
@@ -132,10 +133,6 @@ protected:
return 2;
}
bool supportsNetworkMutex() const override {
return true;
}
};
}
@@ -64,6 +64,7 @@ public:
}
protected:
NeoVIRED2(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
supportsNetworkMutex = true;
initialize<NeoVIRED2Settings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);
}
@@ -104,8 +105,6 @@ protected:
size_t getDiskCount() const override {
return 2;
}
bool supportsNetworkMutex() const override { return true; }
};
}