feat: Flysky PL18 Support (#4105)
Co-authored-by: raphaelcoeffic <raphael.coeffic@frafos.com> Co-authored-by: rotorman <risto.koiva@web.de> Co-authored-by: Xy201207 <yaoxu@flysky.com> Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
co-authored by
raphaelcoeffic
rotorman
Xy201207
Peter Feerick
parent
5153aaeea0
commit
cc17046e7a
@@ -154,6 +154,8 @@ void GeneralSettings::init()
|
||||
strcpy(bluetoothName, "t16");
|
||||
else if (IS_FLYSKY_NV14(board))
|
||||
strcpy(bluetoothName, "nv14");
|
||||
else if (IS_FLYSKY_PL18(board))
|
||||
strcpy(bluetoothName, "pl18");
|
||||
else if (IS_FAMILY_HORUS_OR_T16(board))
|
||||
strcpy(bluetoothName, "horus");
|
||||
else if (IS_TARANIS_X9E(board) || IS_TARANIS_SMALL(board))
|
||||
@@ -269,7 +271,7 @@ void GeneralSettings::init()
|
||||
|
||||
internalModule = g.profile[g.sessionId()].defaultInternalModule();
|
||||
|
||||
if (IS_FLYSKY_NV14(board))
|
||||
if (IS_FLYSKY_NV14(board) || IS_FLYSKY_PL18(board))
|
||||
stickDeadZone = 2;
|
||||
|
||||
}
|
||||
@@ -285,7 +287,7 @@ void GeneralSettings::setDefaultControlTypes(Board::Type board)
|
||||
return;
|
||||
|
||||
// TODO: move to Boards, like with switches
|
||||
if (IS_FAMILY_HORUS_OR_T16(board) && !IS_FLYSKY_NV14(board)) {
|
||||
if (IS_FAMILY_HORUS_OR_T16(board) && !IS_FLYSKY_NV14(board) && !IS_FLYSKY_PL18(board)) {
|
||||
potConfig[0] = Board::POT_WITH_DETENT;
|
||||
potConfig[1] = Board::POT_MULTIPOS_SWITCH;
|
||||
potConfig[2] = Board::POT_WITH_DETENT;
|
||||
@@ -294,6 +296,11 @@ void GeneralSettings::setDefaultControlTypes(Board::Type board)
|
||||
potConfig[0] = Board::POT_WITHOUT_DETENT;
|
||||
potConfig[1] = Board::POT_WITHOUT_DETENT;
|
||||
}
|
||||
else if (IS_FLYSKY_PL18(board)) {
|
||||
potConfig[0] = Board::POT_WITHOUT_DETENT;
|
||||
potConfig[1] = Board::POT_WITHOUT_DETENT;
|
||||
potConfig[2] = Board::POT_WITHOUT_DETENT;
|
||||
}
|
||||
else if (IS_TARANIS_XLITE(board)) {
|
||||
potConfig[0] = Board::POT_WITHOUT_DETENT;
|
||||
potConfig[1] = Board::POT_WITHOUT_DETENT;
|
||||
|
||||
Reference in New Issue
Block a user