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

Please add "delete paired controller" to the nro app. #20

Closed
NSWRyan opened this issue Aug 28, 2020 · 5 comments
Closed

Please add "delete paired controller" to the nro app. #20

NSWRyan opened this issue Aug 28, 2020 · 5 comments

Comments

@NSWRyan
Copy link

NSWRyan commented Aug 28, 2020

Hello, thank you for the great tool, my DS4 v1 was working perfectly until it somehow crashed the switch. It was connected through bluetooth while charging through usb (through wall charger). Suddenly, it crashed the switch and now every time I tried to reconnect the controller through bluetooth it crashed Atmosphere. (maybe this is related to 100% charge issue in another issue #18 (comment)).

It would be great if you can add an unpair button to your app so that we can unpair the controller. Right now, unpair through settings is impossible because it needs the controller connected and x button pressed. Simply connecting the controller will crash the switch.

Thanks!

@ndeadly
Copy link
Owner

ndeadly commented Aug 28, 2020

I think there's a bug in the DS4 battery level handling code that's causing a crash when charging. It seems related to the other issue you linked. I will look into it.

Possibly unrelated, but another user reported that resetting his DS4 v1 solved an issue with the console crashing. Could also be worth a try.

I do plan to have a database management feature in my companion app, that will allow the deletion of individual entries. For now you can just nuke the whole thing by going to System Settings->Controllers and Sensors->Disconnect Controllers

@NSWRyan
Copy link
Author

NSWRyan commented Aug 28, 2020

Tried resetting, but it does not work. Now compiling the code with my fix. BTW I can't replace the Atmosphere folder with the one from Atmosphere github right?

@NSWRyan
Copy link
Author

NSWRyan commented Aug 28, 2020

Here is my fix and I confirmed it working.
//If usb is plugged and battery level is below 11, then console is charging
//Otherwise not charging.
if (src->input0x11.usb && src->input0x11.battery_level < 11)
m_charging = true;
else
m_charging = false;
m_battery = src->input0x11.battery_level*9/10;

The pro controller max battery is 9, above that Atmosphere crash.
But looking at this code from https://android.googlesource.com/kernel/common.git/+/brillo-m9-release/drivers/hid/hid-sony.c

  |/*
  | * When a USB power source is connected the battery level ranges from
  | * 0 to 10, and when running on battery power it ranges from 0 to 9.
  | * A battery level above 10 when plugged in means charge completed.
  | */

if (!cable_state || battery_capacity > 10)
  | battery_charging = 0;
  | else
  | battery_charging = 1;

Now my controller shows charging even when battery is full :/. It supposed to says 11 when fully charged right? So many trickery here.

@ndeadly
Copy link
Owner

ndeadly commented Aug 28, 2020

Thanks, I'll review it after work today. In the future you can use pull requests for this kind of thing

@NSWRyan
Copy link
Author

NSWRyan commented Aug 28, 2020

Yeah, will do a pull request once I learned how to. Thanks for your hard work, looking forward to the next release! Cheers!

@NSWRyan NSWRyan closed this as completed Aug 28, 2020
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

2 participants