[Companion] Radio conversion improvements (#5534)
* Move MultiposPots & MultiposPotsPositions capability lookups and getAnalogInputName() to Boards class.
* Add RawSource::isAvailable() and RawSwitch::isAvailable(); Add board type param to various RawSource lookup functions.
* Add CustomFunctionData::toString(), FlightModeData::toString(), FactoryInstalledPots board capability, MAX_SWITCH_TYPE, & break out GeneralSettings source/switch defaults to own function.
* Add RadioDataConversionState class for tracking conversion actions.
* Implement RadioDataConversionState handler, add conversion process report, and improve/fix conversion issues:
* Make sure all switches/pots/knobs have default configs for destination board type;
* Try to move more custom control names, intelligently;
* Convert model timers and throttle source;
* Adjust for Horus 6P switch in place of Taranis S2 knob;
* Adjust for extra sliders on X12 and X9E to move LS and RS to proper slots as needed;
* Make sure ALL controls are validated, eg. to always account for extra trims/analogs/switches/etc which don't exist on destination;
* Properly indicate invalid RawSource::toString() items with "???".
* Allow user to cancel out of file conversions & provide ample warnings if switching radio type/profile with unsaved file(s) still open;
Also: Fix bug with some orphaned MdiChild windows never being deleted; Create static bool Storage::isBoardCompatible(b1, b2).
* Add maxLibQt "stub" (will not compile).
* Add ExportableTableView for better presentation of conversion results table.
* Move getFourCC() and isBoardCompatible() to Boards class.
This commit is contained in:
committed by
Bertrand Songis
parent
e63a877ed6
commit
0dbad182e8
@@ -67,42 +67,6 @@ class StorageFormat
|
||||
return board;
|
||||
}
|
||||
|
||||
static uint32_t getFourCC(Board::Type board)
|
||||
{
|
||||
switch (board) {
|
||||
case Board::BOARD_X12S:
|
||||
return 0x3478746F;
|
||||
case Board::BOARD_X10:
|
||||
return 0x3778746F;
|
||||
case Board::BOARD_TARANIS_X7:
|
||||
return 0x3678746F;
|
||||
case Board::BOARD_TARANIS_X9E:
|
||||
return 0x3578746F;
|
||||
case Board::BOARD_TARANIS_X9D:
|
||||
case Board::BOARD_TARANIS_X9DP:
|
||||
return 0x3378746F;
|
||||
case Board::BOARD_SKY9X:
|
||||
case Board::BOARD_AR9X:
|
||||
case Board::BOARD_9XRPRO:
|
||||
return 0x3278746F;
|
||||
case Board::BOARD_MEGA2560:
|
||||
case Board::BOARD_GRUVIN9X:
|
||||
return 0x3178746F;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t getFourCC()
|
||||
{
|
||||
return getFourCC(board);
|
||||
}
|
||||
|
||||
virtual bool isBoardCompatible(Board::Type board)
|
||||
{
|
||||
return getFourCC() == getFourCC(board);
|
||||
}
|
||||
|
||||
protected:
|
||||
void setError(const QString & error)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user