[Companion] Ensure proper number of model slots after radio data conversion.
This commit is contained in:
@@ -307,4 +307,9 @@ void RadioData::convert(Board::Type before, Board::Type after)
|
|||||||
if (IS_HORUS(after)) {
|
if (IS_HORUS(after)) {
|
||||||
fixModelFilenames();
|
fixModelFilenames();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ensure proper number of model slots
|
||||||
|
if (getCurrentFirmware()->getCapability(Models) && getCurrentFirmware()->getCapability(Models) != (int)models.size()) {
|
||||||
|
models.resize(getCurrentFirmware()->getCapability(Models));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user