Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move SOCD settings to profiles #1195

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions www/server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ const { pico: picoController } = JSON.parse(

// Structure pin mappings to include masks and profile label
const createPinMappings = ({ profileLabel = 'Profile' }) => {
let pinMappings = { profileLabel, enabled: true };
let pinMappings = {
profileLabel,
enabled: true,
socdMode: 1, // SOCD Neutral,
};

for (const [key, value] of Object.entries(picoController)) {
pinMappings[key] = {
Expand Down Expand Up @@ -95,7 +99,6 @@ app.get('/api/getGamepadOptions', (req, res) => {
return res.send({
dpadMode: 0,
inputMode: 4,
socdMode: 2,
switchTpShareForDs4: 0,
forcedSetupMode: 0,
lockHotkeys: 0,
Expand Down
10 changes: 10 additions & 0 deletions www/src/Locales/en/PinMapping.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ export default {
'profile-pins-warning':
'Try to avoid changing the buttons and/or directions used for the switch profile hotkeys. Otherwise, it will be difficult to understand what profile is being selected!',
'profile-copy-base': 'Copy base profile',
'socd-mode-label': 'SOCD Cleaning Mode',
'socd-mode-description':
'PS4, PS3, Nintendo Switch, and mini series modes do not support setting SOCD Cleaning to Off and will default to Neutral SOCD Cleaning mode.',
'socd-modes': {
SOCD_MODE_UP_PRIORITY: 'Up Priority',
SOCD_MODE_NEUTRAL: 'Neutral',
SOCD_MODE_SECOND_INPUT_PRIORITY: 'Last Win',
SOCD_MODE_FIRST_INPUT_PRIORITY: 'First Win',
SOCD_MODE_BYPASS: 'Off',
},
errors: {
conflict: 'Pin {{pin}} is already assigned to {{conflictedMappings}}',
required: '{{button}} is required',
Expand Down
10 changes: 0 additions & 10 deletions www/src/Locales/en/SettingsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,6 @@ export default {
'left-analog': 'Left Analog',
'right-analog': 'Right Analog',
},
'socd-cleaning-mode-label': 'SOCD Cleaning Mode',
'socd-cleaning-mode-note':
'Note: PS4, PS3, Nintendo Switch, and mini series modes do not support setting SOCD Cleaning to Off and will default to Neutral SOCD Cleaning mode.',
'socd-cleaning-mode-options': {
'up-priority': 'Up Priority',
neutral: 'Neutral',
'last-win': 'Last Win',
'first-win': 'First Win',
off: 'Off',
},
'profile-label': 'Profile',
'debounce-delay-label': 'Debounce Delay in milliseconds',
'ps4-mode-explanation-text':
Expand Down
12 changes: 12 additions & 0 deletions www/src/Locales/ja-JP/PinMapping.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ export default {
'profile-pins-warning':
'プロファイルの変更ホットキーに設定しているボタンや方向キーの設定変更は、現在のプロファイル選択状況がわからなくなる原因となるため非推奨です。',
'profile-copy-base': 'Baseプロファイルをコピー',

'socd-mode-label': 'SOCDクリーニングモード',
'socd-mode-description':
'注:PS4、PS3、任天堂SwitchおよびミニコンソールシリーズのモードではSOCDクリーニングモード無効設定はできないため、ニュートラルSOCDクリーニングに設定されます。',
'socd-modes': {
SOCD_MODE_UP_PRIORITY: '上優先',
SOCD_MODE_NEUTRAL: 'ニュートラル',
SOCD_MODE_SECOND_INPUT_PRIORITY: '後入力優先',
SOCD_MODE_FIRST_INPUT_PRIORITY: '先入力優先',
SOCD_MODE_BYPASS: '無効',
},

errors: {
conflict: '{{pin}} 番端子は既に{{conflictedMappings}}に割り当て済みです',
required: '{{button}}の設定は必須です',
Expand Down
10 changes: 0 additions & 10 deletions www/src/Locales/ja-JP/SettingsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,6 @@ export default {
'left-analog': '左アナログ',
'right-analog': '右アナログ',
},
'socd-cleaning-mode-label': 'SOCDクリーニングモード',
'socd-cleaning-mode-note':
'注:PS4、PS3、任天堂SwitchおよびミニコンソールシリーズのモードではSOCDクリーニングモード無効設定はできないため、ニュートラルSOCDクリーニングに設定されます。',
'socd-cleaning-mode-options': {
'up-priority': '上優先',
neutral: 'ニュートラル',
'last-win': '後入力優先',
'first-win': '先入力優先',
off: '無効',
},
'profile-label': 'プロファイル',
'debounce-delay-label': 'チャタリング除去ディレイ(ミリ秒)',
'ps4-mode-explanation-text':
Expand Down
16 changes: 14 additions & 2 deletions www/src/Locales/ko-KR/PinMapping.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export default {
'header-text': '단자 할당 설정',
'sub-header-text': '여기에서는 어떤 핀에 어떤 기능을 할당할지 설정할 수 있습니다. 어떤 버튼이 어떤 핀에 할당되어 있는지 모르겠다면 핀 확인 기능을 사용해 보세요',
'sub-header-text':
'여기에서는 어떤 핀에 어떤 기능을 할당할지 설정할 수 있습니다. 어떤 버튼이 어떤 핀에 할당되어 있는지 모르겠다면 핀 확인 기능을 사용해 보세요',
'alert-text':
'연결되지 않거나 구현되지 않은 핀에 할당 설정을 하면 컨트롤러가 작동하지 않는 상태가 될 수 있습니다. 잘못된 설정을 초기화하고 싶다면 <2>설정 초기화</2> 페이지에서 초기화를 실행해 주세요.',
'pin-viewer': '단자 확인',
Expand All @@ -18,8 +19,19 @@ export default {
'profile-pins-warning':
'프로파일 변경 핫키로 설정된 버튼이나 방향키의 설정 변경은 현재 프로파일 선택상황을 햇갈리게 할 수 있으므로 권장하지 않습니다',
'profile-copy-base': 'Base 프로파일을 복사',
'socd-mode-label': 'SOCD 클리닝 모드',
'socd-mode-description':
'주의:PS4、PS3、닌텐도Switch 또는 미니 콘솔 시리즈 모드에서는 SOCD 클리닝 모드 끄기 설정이 불가능하므로, 중립 SOCD 클리닝으로 설정됩니다.',
'socd-modes': {
SOCD_MODE_UP_PRIORITY: '위 우선',
SOCD_MODE_NEUTRAL: '중립',
SOCD_MODE_SECOND_INPUT_PRIORITY: '후 입력 우선',
SOCD_MODE_FIRST_INPUT_PRIORITY: '선 입력 우선',
SOCD_MODE_BYPASS: '끄기',
},
errors: {
conflict: '{{pin}} 번 단자에 이미 {{conflictedMappings}}에 할당 되어 있습니다.',
conflict:
'{{pin}} 번 단자에 이미 {{conflictedMappings}}에 할당 되어 있습니다.',
required: '{{button}}의 설정은 필수 입니다.',
invalid: '{{pin}}번 단자는 이 보드에서는 사용 할 수 없습니다.',
used: '{{pin}}번 단자는 이미 다른기능에 할당 되어 있습니다.',
Expand Down
10 changes: 0 additions & 10 deletions www/src/Locales/ko-KR/SettingsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,6 @@ export default {
'left-analog': '왼쪽 아날로그',
'right-analog': '오른쪽 아날로그',
},
'socd-cleaning-mode-label': 'SOCD 클리닝 모드',
'socd-cleaning-mode-note':
'주의:PS4、PS3、닌텐도Switch 또는 미니 콘솔 시리즈 모드에서는 SOCD 클리닝 모드 끄기 설정이 불가능하므로, 중립 SOCD 클리닝으로 설정됩니다.',
'socd-cleaning-mode-options': {
'up-priority': '위 우선',
neutral: '중립',
'last-win': '후 입력 우선',
'first-win': '선 입력 우선',
off: '끄기',
},
'profile-label': '프로파일',
'debounce-delay-label': '채터링 제거 딜레이(밀리 초)',
'ps4-mode-explanation-text':
Expand Down
10 changes: 10 additions & 0 deletions www/src/Locales/pt-BR/PinMapping.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ export default {
'pin-header-label': 'Pino',
'profile-pins-warning':
'Tente evitar alterar os botões/direções usados para seus atalhos de perfil de troca, caso contrário, ficará difícil entender qual perfil você está selecionando!',
'socd-mode-label': 'Modo de Limpeza SOCD',
'socd-mode-description':
'Observação: Os modos PS4, PS3 e Nintendo Switch não suportam a configuração SOCD Cleaning como Desativado e padrão para o modo de Limpeza SOCD Neutra.',
'socd-modes': {
SOCD_MODE_UP_PRIORITY: 'Prioridade para Cima',
SOCD_MODE_NEUTRAL: 'Neutra',
SOCD_MODE_SECOND_INPUT_PRIORITY: 'Última Vitória',
SOCD_MODE_FIRST_INPUT_PRIORITY: 'Primeira Vitória',
SOCD_MODE_BYPASS: 'Desativado',
},
errors: {
conflict: 'O Pino {{pin}} já está atribuído a {{conflictedMappings}}',
required: '{{button}} é obrigatório',
Expand Down
10 changes: 0 additions & 10 deletions www/src/Locales/pt-BR/SettingsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ export default {
'left-analog': 'Analógico Esquerdo',
'right-analog': 'Analógico Direito',
},
'socd-cleaning-mode-label': 'Modo de Limpeza SOCD',
'socd-cleaning-mode-note':
'Observação: Os modos PS4, PS3 e Nintendo Switch não suportam a configuração SOCD Cleaning como Desativado e padrão para o modo de Limpeza SOCD Neutra.',
'socd-cleaning-mode-options': {
'up-priority': 'Prioridade para Cima',
neutral: 'Neutra',
'last-win': 'Última Vitória',
'first-win': 'Primeira Vitória',
off: 'Desativado',
},
'profile-label': 'Perfil',
'hotkey-settings-label': 'Configurações de Teclas de Atalho',
'hotkey-settings-sub-header':
Expand Down
19 changes: 13 additions & 6 deletions www/src/Locales/zh-CN/PinMapping.jsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
export default {
'header-text': '引脚映射',
'sub-header-text':
'使用引脚查看器来查看按键到引脚的连接。',
'sub-header-text': '使用引脚查看器来查看按键到引脚的连接。',
'alert-text':
'将按键映射到未连接或不可用的引脚可能会导致设备无法正常工作。要清除无效配置,请转到 <2>恢复默认设置</2> 页面。',
'pin-viewer': '引脚查看器',
'pin-pressed': '按下的引脚:{{pressedPin}}',
'pin-header-label': '引脚',
'profile-label-title': '档案名称',
'profile-label-description':
'最多16个字符。允许使用字母、数字和空格。',
'profile-label-description': '最多16个字符。允许使用字母、数字和空格。',
'profile-pin-mapping-title': '{{profileLabel}} - 引脚映射',
'profile-label-default': 'Profile {{profileNumber}}',
'profile-add-button': '+ 新增档案',
'profile-disabled': ' - (禁用)',
'profile-enabled-tooltip':
'禁用的档案在使用快捷键切换档案时将不可用。',
'profile-enabled-tooltip': '禁用的档案在使用快捷键切换档案时将不可用。',
'profile-pins-warning':
'尽量避免修改已设置为切换档案快捷键的按键或方向键,否则之后将很难理解你选择的档案配置!',
'profile-copy-base': '复制基础档案',
'socd-mode-label': 'SOCD 覆盖模式',
'socd-mode-description':
'注意:PS4、PS3、Nintendo Switch以及迷你系列模式不支持将 SOCD 覆盖模式设置为关闭,默认设置为回中模式。',
'socd-modes': {
SOCD_MODE_UP_PRIORITY: '上优先',
SOCD_MODE_NEUTRAL: '回中',
SOCD_MODE_SECOND_INPUT_PRIORITY: '后输入优先',
SOCD_MODE_FIRST_INPUT_PRIORITY: '先输入优先',
SOCD_MODE_BYPASS: '关闭',
},
errors: {
conflict: '引脚 {{pin}} 已分配给 {{conflictedMappings}}',
required: '{{button}} 是必需的',
Expand Down
10 changes: 0 additions & 10 deletions www/src/Locales/zh-CN/SettingsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,6 @@ export default {
'left-analog': '左模拟摇杆',
'right-analog': '右模拟摇杆',
},
'socd-cleaning-mode-label': 'SOCD 覆盖模式',
'socd-cleaning-mode-note':
'注意:PS4、PS3、Nintendo Switch以及迷你系列模式不支持将 SOCD 覆盖模式设置为关闭,默认设置为回中模式。',
'socd-cleaning-mode-options': {
'up-priority': '上优先',
neutral: '回中',
'last-win': '后输入优先',
'first-win': '先输入优先',
off: '关闭',
},
'profile-label': '档案',
'debounce-delay-label': '去抖动延迟 (以毫秒为单位)',
'ps4-mode-explanation-text':
Expand Down
6 changes: 0 additions & 6 deletions www/src/Pages/InputMacroAddonPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,13 @@ const ButtonMasksComponent = (props) => {
onChange,
error,
isInvalid,
className,
buttonLabelType,
buttonMasks,
} = props;
return (
// <div key={key} className={className}>
<Form.Select
size="sm"
name={`${key}.buttonMask`}
// className="form-control"
value={value}
error={error}
isInvalid={isInvalid}
Expand All @@ -128,7 +125,6 @@ const ButtonMasksComponent = (props) => {
</option>
))}
</Form.Select>
// </div>
);
};

Expand Down Expand Up @@ -200,7 +196,6 @@ const MacroInputComponent = (props) => {
<Col xs="auto">
<ButtonMasksComponent
id={`${key}.buttonMaskPlaceholder`}
className="col-sm-auto"
value={0}
onChange={(e) => {
setFieldValue(`${key}.buttonMask`, buttonMask | e.target.value);
Expand Down Expand Up @@ -397,7 +392,6 @@ const MacroComponent = (props) => {
</Col>
<Col sm={'auto'}>
<ButtonMasksComponent
className="col-sm-auto"
value={macroTriggerButton}
onChange={(e) => {
setFieldValue(
Expand Down
Loading