feat(setup): Disallow split w/ wired controller.
For now, disallow wired split combination during setup.
This commit is contained in:
parent
8bbbf530a7
commit
6227866e8c
3 changed files with 19 additions and 0 deletions
|
@ -30,6 +30,7 @@ function generateSetupScripts() {
|
|||
if (item.features?.includes("keys")) {
|
||||
agg.keyboards.push(item);
|
||||
} else {
|
||||
item.usb_only = !item.outputs?.includes("ble");
|
||||
agg.boards.push(item);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -125,12 +125,23 @@ if ($keyboard_type -eq "shield") {
|
|||
{{id}} = "{{{name}}}";
|
||||
{{/boards}}
|
||||
}
|
||||
$boards_usb_only = [ordered]@{
|
||||
{{#boards}}
|
||||
{{id}} = "{{usb_only}}";
|
||||
{{/boards}}
|
||||
}
|
||||
|
||||
Write-Host "$title"
|
||||
Write-Host ""
|
||||
Write-Host "MCU Board Selection:"
|
||||
|
||||
$choice = Get-Choice-From-Options -Options $boards.values -Prompt $prompt
|
||||
|
||||
if ($keyboard_split -eq "true" -and $($($boards_usb_only.values)[$choice]) -eq "true") {
|
||||
Write-Host "Wired split is not yet supported by ZMK."
|
||||
exit 1
|
||||
}
|
||||
|
||||
$shields = $keyboard_siblings
|
||||
$board = $($($boards.keys)[$choice])
|
||||
$boards = ( $board )
|
||||
|
|
|
@ -120,6 +120,7 @@ if [ "$keyboard_shield" == "y" ]; then
|
|||
prompt="Pick an MCU board:"
|
||||
options=({{#boards}}"{{{name}}}" {{/boards}})
|
||||
board_ids=({{#boards}}"{{id}}" {{/boards}})
|
||||
boards_usb_only=({{#boards}}"{{#usb_only}}y{{/usb_only}}{{^usb_only}}n{{/usb_only}}" {{/boards}})
|
||||
|
||||
echo ""
|
||||
echo "MCU Board Selection:"
|
||||
|
@ -134,6 +135,12 @@ if [ "$keyboard_shield" == "y" ]; then
|
|||
echo "Invalid option. Try another one."
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ -n "${!keyboard_sibling_first}" ] && [ "${boards_usb_only[$board_index]}" = "y" ] ; then
|
||||
echo "Wired split is not yet supported by ZMK."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
board_index=$(( $REPLY-1 ))
|
||||
board=${board_ids[$board_index]}
|
||||
board_title=${options[$board_index]}
|
||||
|
|
Loading…
Reference in a new issue