diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a2950cd7..3e3cde6c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,8 +73,8 @@ npm start -- --reset-cache - Reference: https://www.iosdev.recipes/simctl/ - `xcrun simctl listapps booted` to list installed simulator apps. -- `open \`xcrun simctl get_app_container booted com.ham2k.polo data\`/Documents` to open PoLo's Documents folder. -- `open \`xcrun simctl get_app_container booted com.apple.DocumentsApp groups |grep FileProvider.LocalStorage|sed "s/group.com.apple.FileProvider.LocalStorage//g"\`/File\ Provider\ Storage` to open simulator Files local storage. +- ``open `xcrun simctl get_app_container booted com.ham2k.polo data`/Documents`` to open PoLo's Documents folder. +- ``open `xcrun simctl get_app_container booted com.apple.DocumentsApp groups |grep FileProvider.LocalStorage|sed "s/group.com.apple.FileProvider.LocalStorage//g"`/File\ Provider\ Storage`` to open simulator Files local storage. ## Resources diff --git a/src/screens/OperationScreens/OpLoggingTab/components/LoggingPanel.jsx b/src/screens/OperationScreens/OpLoggingTab/components/LoggingPanel.jsx index bf6eadc9..49bc5eb7 100644 --- a/src/screens/OperationScreens/OpLoggingTab/components/LoggingPanel.jsx +++ b/src/screens/OperationScreens/OpLoggingTab/components/LoggingPanel.jsx @@ -249,6 +249,12 @@ export default function LoggingPanel ({ } else if (fieldId === 'power') { updateQSO({ power: value }) if (qso?._isNew) dispatch(setVFO({ power: value })) + } else if (fieldId === 'rig') { + updateQSO({ rig: value }) + if (qso?._isNew) dispatch(setVFO({ rig: value })) + } else if (fieldId === 'antenna') { + updateQSO({ antenna: value }) + if (qso?._isNew) dispatch(setVFO({ antenna: value })) } else if (fieldId === 'eventNote') { updateQSO({ event: { note: value } }) } else if (fieldId === 'eventData') { @@ -773,6 +779,8 @@ function prepareNewQSO (operation, qsos, vfo, settings) { freq: vfo.freq, mode: vfo.mode, power: vfo.power, + rig: vfo.rig, + antenna: vfo.antenna, _isNew: true } if (operation.local?._nextManualTime) { diff --git a/src/screens/OperationScreens/OpLoggingTab/components/LoggingPanel/SecondaryExchangePanel.jsx b/src/screens/OperationScreens/OpLoggingTab/components/LoggingPanel/SecondaryExchangePanel.jsx index fae7637f..0d6ea3b5 100644 --- a/src/screens/OperationScreens/OpLoggingTab/components/LoggingPanel/SecondaryExchangePanel.jsx +++ b/src/screens/OperationScreens/OpLoggingTab/components/LoggingPanel/SecondaryExchangePanel.jsx @@ -11,6 +11,8 @@ import { timeControl } from './SecondaryExchangePanel/TimeControl' import { radioControl } from './SecondaryExchangePanel/RadioControl' import { notesControl } from './SecondaryExchangePanel/NotesControl' import { powerControl } from './SecondaryExchangePanel/TxPowerControl' +import { rigControl } from './SecondaryExchangePanel/RigControl' +import { antennaControl } from './SecondaryExchangePanel/AntennaControl' import { SecondaryControlManagementSubPanel } from './SecondaryExchangePanel/SecondaryControlManagementSubPanel' import { SecondaryControlSelectionsubPanel } from './SecondaryExchangePanel/SecondaryControlSelectionSubPanel' import { findHooks } from '../../../../../extensions/registry' @@ -31,7 +33,9 @@ export const SecondaryExchangePanel = (props) => { radio: radioControl, notes: notesControl, edit: editQSOControl, - power: powerControl + power: powerControl, + rig: rigControl, + antenna: antennaControl } const activityHooks = findHooks('activity') diff --git a/src/screens/OperationScreens/OpLoggingTab/components/LoggingPanel/SecondaryExchangePanel/AntennaControl.jsx b/src/screens/OperationScreens/OpLoggingTab/components/LoggingPanel/SecondaryExchangePanel/AntennaControl.jsx new file mode 100644 index 00000000..5dc9866f --- /dev/null +++ b/src/screens/OperationScreens/OpLoggingTab/components/LoggingPanel/SecondaryExchangePanel/AntennaControl.jsx @@ -0,0 +1,57 @@ +/* + * Copyright ©️ 2024-2026 Sebastian Delmont + * + * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. + * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + +import React, { useEffect, useRef } from 'react' +import { View } from 'react-native' +import { useTranslation } from 'react-i18next' + +import GLOBAL from '../../../../../../GLOBAL' + +import { H2kTextInput } from '../../../../../../ui' + +const AntennaControl = ({ qso, operation, settings, disabled, icon, style, styles, themeColor, handleFieldChange, onSubmitEditing, focusedRef }) => { + const { t } = useTranslation() + + const ref = useRef() + useEffect(() => { setTimeout(() => ref?.current?.focus(), 200) }, []) + + return ( + + + + ) +} + +export const antennaControl = { + key: 'antenna', + icon: 'antenna', + order: 5, + label: ({ qso, operation, settings }) => { + if (qso?.antenna) { + return qso.antenna + } else { + return GLOBAL?.t?.('screens.opLoggingTab.antennaLabel', 'Antenna') || 'Antenna' + } + }, + accessibilityLabel: GLOBAL?.t?.('screens.opLoggingTab.antennaControls-a11y', 'Antenna Controls') || 'Antenna Controls', + InputComponent: AntennaControl, + inputWidthMultiplier: 30, + optionType: 'optional' +} diff --git a/src/screens/OperationScreens/OpLoggingTab/components/LoggingPanel/SecondaryExchangePanel/RigControl.jsx b/src/screens/OperationScreens/OpLoggingTab/components/LoggingPanel/SecondaryExchangePanel/RigControl.jsx new file mode 100644 index 00000000..afa61504 --- /dev/null +++ b/src/screens/OperationScreens/OpLoggingTab/components/LoggingPanel/SecondaryExchangePanel/RigControl.jsx @@ -0,0 +1,57 @@ +/* + * Copyright ©️ 2024-2026 Sebastian Delmont + * + * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. + * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + +import React, { useEffect, useRef } from 'react' +import { View } from 'react-native' +import { useTranslation } from 'react-i18next' + +import GLOBAL from '../../../../../../GLOBAL' + +import { H2kTextInput } from '../../../../../../ui' + +const RigControl = ({ qso, operation, settings, disabled, icon, style, styles, themeColor, handleFieldChange, onSubmitEditing, focusedRef }) => { + const { t } = useTranslation() + + const ref = useRef() + useEffect(() => { setTimeout(() => ref?.current?.focus(), 200) }, []) + + return ( + + + + ) +} + +export const rigControl = { + key: 'rig', + icon: 'radio', + order: 4, + label: ({ qso, operation, settings }) => { + if (qso?.rig) { + return qso.rig + } else { + return GLOBAL?.t?.('screens.opLoggingTab.rigLabel', 'Rig') || 'Rig' + } + }, + accessibilityLabel: GLOBAL?.t?.('screens.opLoggingTab.rigControls-a11y', 'Rig Controls') || 'Rig Controls', + InputComponent: RigControl, + inputWidthMultiplier: 30, + optionType: 'optional' +} diff --git a/src/tools/qsonToADIF.js b/src/tools/qsonToADIF.js index e58a4cf6..adc7dcf8 100644 --- a/src/tools/qsonToADIF.js +++ b/src/tools/qsonToADIF.js @@ -198,6 +198,8 @@ function adifFieldsForOneQSO({ qso, operation, common, privateData, templates, t { GRIDSQUARE: privateData && (qso.their?.grid ?? qso.their?.guess?.grid) }, { MY_GRIDSQUARE: privateData && (qso?.our?.grid ?? common.grid) }, { MY_STATE: qso?.our?.state ?? common.state }, + { MY_RIG: qso?.rig }, + { MY_ANTENNA: qso?.antenna }, { MY_CNTY: privateData && _cleanCounty(qso?.our?.county ?? common.county, qso?.our?.state ?? common.state) }, { NAME: privateData && (qso.their?.name ?? qso.their?.guess?.name) }, { DXCC: qso.their?.dxccCode ?? qso.their?.guess?.dxccCode },