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

Porsche GT4 e-Performance does not connect to BrickController 2 #123

Open
legomania76 opened this issue Oct 9, 2024 · 13 comments
Open

Porsche GT4 e-Performance does not connect to BrickController 2 #123

legomania76 opened this issue Oct 9, 2024 · 13 comments

Comments

@legomania76
Copy link

legomania76 commented Oct 9, 2024

Dear imurvai,

I recently got the Lego Technic Porsche GT4 e-Performance with Control features. Building it was a blast, racing it even more so!

However it wasn't long until the inaccurate controls of my touchscreen started to annoy me. I google searched if there was a way to Control the car with a PS5 controller. It wasn't long until I stumbled upon BrickController2.

Unfortunately the GT4 doesn't seem to be found by the app. Perhaps because Lego used a new type of electro motor? Either way, I stumbled upon this Github thread where a user named toorisrael claims to have come up with the following solution to the code:

toorisrael@5cf3b4f#diff-87d78588d3370a3340d0382623242875748387d6c1b2ea5d0c09768a549b5f17R99

I am not tech savvy enough myself to implement these changes into the code of the BrickController2 app. Would you please be so kind as to add this commit to the app. That way end users like me can simply download it from the Play Store. Thanks a bundle in advance!

André

@vicocz
Copy link
Contributor

vicocz commented Oct 14, 2024

I spent some time with own prototype for this new hub, but it's not as easy as adding a new type of the device. There seemed to be some incompatibility and existing Control+ command did not worked very well.
I plan to try it again soon, can keep this thread updated.

@legomania76
Copy link
Author

That would be neat, thanks in advance!

@vicocz
Copy link
Contributor

vicocz commented Oct 26, 2024

There is DRAFT of my work-in-progress here: #125

@imurvai
Copy link
Owner

imurvai commented Oct 27, 2024

Hi, that is great that you are working on it. Unfortunately I don't have that set, so I cannot try/test it. Let me know when you think it's ready to be merged and I'll release it.

@vicocz
Copy link
Contributor

vicocz commented Nov 13, 2024

Seems to be working now. It requiered a lot of "hacking" to apply PLAYVM mode which drives both AB motors and C servo. I hope they will fix generic support for LPW3 command soon.
Would be nice if someone could test it as well. But feel free to merge it or leave comments in PR to suggest any change.

@valmanassiev
Copy link

@vicocz I've tried this dev on my sons GT4.
I have checkout vicocz:feature/42176-playvm-mode and build the project for Android.

The main issue that I have is that commands to Ch AB does not seem trigger any action.
I've tried different mappings:

  • Ltrigger AB-inv /Rtrigger AB with JoyType=Normal/Train/Acceleration
  • Y-axis AB
  • Map AB on other buttons

Lights and the channel C are working fine.

I am using PS5 controller on a pixel 7.
I am not familiar with .Net/Maui and Android development.
I've used conneqthub/dotnet-maui-android:8.0.72 docker image to build the apk

Let me know if I can provide other inputs.

@vicocz
Copy link
Contributor

vicocz commented Dec 12, 2024

Hi, thx for the feedback. The only thing you can provide is GT's firmware revision.
I guess tha gamepad won't be the issue if it works on the test page.
Anyway it's weird, I used to have issues with C channel.
Btw have you setup the servo for C channel? I guess yes, but could you share the controller profile page please?

@valmanassiev
Copy link

I've switched the C channel to Servo and it start working ;)
Also increased the dead zones for the triggers and axis to 5%-10% just to avoid the jitter.
So now we are having fun with it.
Thanks, great work!

@vicocz
Copy link
Contributor

vicocz commented Dec 12, 2024

Anyway, I've addressed such edge case, PLAYVM will not be applied and it should somehow be driving, even though it's not ideal to drive C channel without proper servo setup. But it works 😄

@vicocz
Copy link
Contributor

vicocz commented Dec 14, 2024

@imurvai Seems it's working now, feel free to merge it or leave a comment in PR if there is something wrong or to be changed.

@imurvai
Copy link
Owner

imurvai commented Dec 15, 2024

@vicocz Sure, once I have a little time, I'll do it

@jtregl
Copy link

jtregl commented Jan 6, 2025

Hi,
I have tested the vicocz:feature/42176-playvm-mode. Everything is working perfectly.
I just don't know how to setup the handbrake functionality and light up the brake lights from off or 30% intensity to 100% when the button for handbrake is pressed and switch the beack lights back to original state (off or 30%), when the button is released.

@vicocz
Copy link
Contributor

vicocz commented Jan 6, 2025

Hi, I have tested the vicocz:feature/42176-playvm-mode. Everything is working perfectly.

Good to hear, thx for the feedback.

I just don't know how to setup the handbrake functionality and light up the brake lights from off or 30% intensity to 100% when the button for handbrake is pressed and switch the beack lights back to original state (off or 30%), when the button is released.

May be you can try to somehow combine a sequence and ;Stop; button type:

  • for forward-backward command assign AB channel for movement and some sequence with zero value to back lights
  • for brake button, you can try to apply the Stop button type for AB channel and appply a sequence wih 30 percent value for back lights.

Just an idea, I havn't tested that 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants