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

Add mapping table and hide svg mapping from unknown joystick models #1216

Conversation

ArturoManzoli
Copy link
Contributor

image

Closes #1194
Closes #1131
Closes #970
Closes #1176

@ArturoManzoli ArturoManzoli force-pushed the 1131-hide-mapping-from-known-joystick-models branch from 42d3078 to 828da05 Compare August 7, 2024 22:47
@ArturoManzoli ArturoManzoli changed the title Add mapping table and hide svg mapping from known joystick models Add mapping table and hide svg mapping from unknown joystick models Aug 7, 2024
@ArturoManzoli ArturoManzoli force-pushed the 1131-hide-mapping-from-known-joystick-models branch from 828da05 to 4476f4c Compare August 9, 2024 22:42
@ArturoManzoli ArturoManzoli marked this pull request as ready for review August 9, 2024 22:44
@ArturoManzoli ArturoManzoli force-pushed the 1131-hide-mapping-from-known-joystick-models branch 2 times, most recently from 07e404c to 3583063 Compare August 10, 2024 01:14
Copy link
Member

@rafaellehmkuhl rafaellehmkuhl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The remap section of the button mapping can be removed:
    image

  2. The shift/no-function keys should have dedicated buttons, instead of the protocol v-fors:
    image

  3. When the "Function mapping" section is opened, the "General" should close, and vice-versa.

  4. There's something messing with the width, causing the view to overflow and open the horizontal scroll:
    image

  5. Clicking the "Boat functions mapping" button to change to another joystick profile is not making the SVG update (I think this is related to the removed line in the JoystickPS.vue file, because this only happens in the SVG, not the table):
    image

  6. As the joystick-profile selection, the profile-to-vehicle link and the regular/shift are all common to both modes, should them all be in the "General" section, and we change the other two to "Visual mode" and "Table mode"?
    image

@@ -31,18 +31,6 @@
: 'lg:gap-y-3 xl:gap-y-4 gap-y-5 py-5'
"
>
<div
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change the message of this commit for something like "adjust main-menu icon alignments"?

Comment on lines -35 to 34
v-if="interfaceStore.mainMenuStyleTrigger === 'center-left'"
id="menu-trigger"
class="absolute right-0 top-[50%] -translate-y-[50%] flex items-center justify-center w-[30px] px-0 py-2 cursor-pointer overflow-hidden rounded-r-lg rounded-br-lg -ml-[1px]"
@click="toggleMainMenu"
>
<v-icon
class="text-white opacity-70"
:class="simplifiedMainMenu ? 'text-[30px] -mr-[14px]' : 'text-[40px] -mr-[8px]'"
>mdi-menu-left</v-icon
>
</div>
<GlassButton
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this removed by mistake?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it was removed based on a feedback by Rusty.

@@ -40,7 +40,7 @@ module.exports = {
'jsdoc/newline-after-description': 'off',
'jsdoc/no-undefined-types': 'off',
'jsdoc/require-returns': ['error', { forceReturnsWithAsync: false }],
'max-len': ['error', { code: 120, ignoreUrls: true, ignoreComments: true }],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To follow the repository pattern it would be nice to reword this commit to something like "lint: Increase max line length to 180".

@@ -206,7 +206,6 @@ watch(

const joystickModel = toRefs(props).model
const buttonsActionsCorrespondency = toRefs(props).buttonsActionsCorrespondency
watch(buttonsActionsCorrespondency, () => updateLabelsState())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was removed by mistake right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

class="w-[95%] flex-centered flex-column position-relative"
>
<p class="text-md font-semibold">{{ joystick.model }} controller</p>
<div v-if="currentJoystick?.model !== 'Unknown'">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to use the enum here: JoystickModel.Unknown, so we don't rely on the name, than can change at some point.

Comment on lines -413 to -416
onUnmounted(() => {
controllerStore.enableForwarding = true
})

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be removed, otherwise the joystick won't work again after being configured.

@@ -404,16 +641,13 @@ onMounted(async () => {
m2rSupportsExtendedManualControl.value = semver.gte(m2rVersion, '0.11.19')
const ardupilotVersion = await getArdupilotVersion(globalAddress)
ardupilotSupportsExtendedManualControl.value = semver.gte(ardupilotVersion, '4.1.2')
console.log('joystick', controllerStore.joysticks)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Te remove.

@ArturoManzoli ArturoManzoli force-pushed the 1131-hide-mapping-from-known-joystick-models branch from 3583063 to ca540bc Compare August 11, 2024 02:45
@ArturoManzoli ArturoManzoli force-pushed the 1131-hide-mapping-from-known-joystick-models branch from ca540bc to 1e3edf7 Compare August 11, 2024 02:52
@rafaellehmkuhl rafaellehmkuhl self-requested a review August 12, 2024 06:33
Copy link
Member

@rafaellehmkuhl rafaellehmkuhl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything appears to be working fine and the new interface is just great. Nice job!

@rafaellehmkuhl rafaellehmkuhl merged commit 52beeda into bluerobotics:master Aug 12, 2024
8 checks passed
@ES-Alexander ES-Alexander added the docs-needed Change needs to be documented label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-needed Change needs to be documented
Projects
None yet
3 participants