rsjudka / intelligent-auto

41 stars 15 forks source link

[Enhancement] add more quick views #38

Closed rsjudka closed 4 years ago

rsjudka commented 4 years ago

as requested by @robert5974

have the following quick views:

robert5974 commented 4 years ago

Splitting up the suggestions into multiple issues? Probably easier to split up...makes sense to me. Good idea!

rsjudka commented 4 years ago

yeah figured its going to get lost in the other one lol

robert5974 commented 4 years ago

I hear you. Organization is key lol

rsjudka commented 4 years ago

Hey so thinking more of the design of this...

I can easily add a brightness quick view. For the brightness/volume combo, I think I would want to use the popup feature and do a "controls" view, where you can see/change simple things like brightness/volume/dark mode/etc (similar to how ios has the control center). I feel like that would be best in terms of satisfying the featureset and not cramming things into a tiny little region

let me know what you think!

robert5974 commented 4 years ago

Actually that's a genius idea. A pop-up control center is what I didn't know I wanted lol. In terms of screen real estate and design asthetics, it makes the most sense.

rsjudka commented 4 years ago

Peek 2020-06-18 20-18

how does this look? Any other controls you think should be added?

excuse the lagginess, just the gif being a gif lol

robert5974 commented 4 years ago

I like that a lot. Simple button WITH the current setting shown but touch to open for a quick change.
Only thing I can even think of is a mute button, but it's not actually needed. If I mute things in the car right now( on factory stereo) I can push the volume knob to turn off the radio and it's just convenient for like when someone in the car gets a call. Possibly hold it down to mute?? Even without those suggestions I like this implementation.

robert5974 commented 4 years ago

Oh and the light/dark theme button is really nice. Giving stuff I hadn't thought I'd want but I like it and think it could be useful.

rsjudka commented 4 years ago

I can push the volume knob to turn off the radio and it's just convenient for like when someone in the car gets a call. Possibly hold it down to mute??

great idea! just added

robert5974 commented 4 years ago

Awesome work! This is in the quick views branch? I just built IA with gstreamer enabled so I should be able to try it out.

rsjudka commented 4 years ago

This would actually be on the quick-views branch

The control-buttons will probs just get deleted because I needed to make quite a few changes for the popups

robert5974 commented 4 years ago

Gotcha...I just noticed that you merged in from there. I'm building now

robert5974 commented 4 years ago

I cannot seem to get IA built with the quick views you've worked on. I tried multiple times to make clean, checkout each folder, checkout the branch as a whole and it compiles just fine. It's just not any different than previously seen. Might have to blow it away and start from scratch (the local repo...not OS).
I built it with the gstreamer flag. That is right isn't it?

rsjudka commented 4 years ago

Which branch are you on? GST support hasn't been merged into develop yet so you would need to some merging between ice's branch and the quick-views branch if you wanted to test them together

robert5974 commented 4 years ago

I'm on your quick-views branch but I thought I had to use the gstreamer flag to be able to see and use the new functions you've added where it can draw over Openauto. I know one part of the gstreamer PR hasn't been merged yet but I thought the other one was and that it would allow for these changes. To use seperate branches of seperate repos, you have to use git pull (remote repo) (branch). Is that right?

rsjudka commented 4 years ago

yeah in order to use gst both openauto and ia need to be updated (so far only openauto was updated)

yeah so you would need both ice's remote gst branch and my quick views branch and then do a merge between them

i figured i would test it out of curiosity and its working well (a lot faster than the qt video widget also)! you should be able to just use the quick-views-test branch of ia with develop branch of openauto and aasdk and it should be good to go

robert5974 commented 4 years ago

Oh that's awesome. I left it building at home. I just recloned and didn't do any of the gstreamer stuff. When I get home I'll try the test one out. Thanks!

robert5974 commented 4 years ago

So I got it built with the quivk-views-test branch. Everything works. It's a little sluggish so I played with the ram size a little and it seems happy on 256. I tried the controls quick-views and that worked well..some performance issues though. I'm guessing that has to do with the Rpi3B+. I also found when I was connected to AA that if I pull the USB out of my phone, OpenAuto doesn't go back to the Connect screen in that tab.
Biggest thing is I don't have sound. I'll have to check alsamixer I guess

robert5974 commented 4 years ago

It was alsamixer for the sound issue. It was set to pulseaudio instead of my soundcard. I got it working and then after I tested the volume button AA crashed. Says '''channel error code: 10, native code:1 segmentation fault'''

Ever seen that one?

rsjudka commented 4 years ago

I tried the controls quick-views and that worked well..some performance issues though.

are the performance issues happening when opening the popups? Or when actually using the sliders? Are you noticing any performance issues with the save button popup or power off popup?

OpenAuto doesn't go back to the Connect screen in that tab.

this is interesting... not something ive noticed and i frequency disconnect my phone when openauto is running. this is happening when built with gstreamer right?

It was alsamixer for the sound issue. It was set to pulseaudio instead of my soundcard.

ah shoot totally forgot i accidentally pushed this changed when i was doing some testing, you'll probably want to change that back to this:

std::string command = "amixer set Master " + std::to_string(position) + "% --quiet";
robert5974 commented 4 years ago

Yeah there is a slight delay when pushing the button and using the sliders. The save button was fine other than a slight delay on displaying it's popup.
Yes, this was using gstreamer. I've never had that problem before where it still shows AA but it's disconnected. I tried both USB and wireless. Same issue. I'll throw that change in there for the sound. @rsjudka you have a Pi4? Is that right? I'm wondering if it's just a performance hit on the hardware in use. What size is your ram allocation? I forgot to mention that I have enabled the GL driver with fake kms. I know that is important to note. Edit: I forgot to mention that the theme change button worked flawlessly. It was fast.

rsjudka commented 4 years ago

Just did some testing on my pi, and i am seeing the same performance issues :/ what DE are you using btw? I know when I run it in Linux there is a delay too but by default Qt applies an animation when the popup opens so it isnt as obvious. When I run it on the pi's PIXEL DE (without transparency support so I'm also assuming no animations) i see the same delay but no animation, so it feels like it takes longer.

As for the slider delay, its probably caused because the volume/brightness gets updated in real-time, aka a signal is sent every single value increment. I'll try changing it to where it only changes the value when the slider is released. Unfortunately, this tradeoff will probably need to be made to prevent that lag.

does the issue with openauto closing happen all the time or only occasionally? Would you be able to send me logs of when you disconnect your phone?

Yeah im using a pi 4, i only allocate 128mb. And I actually tested with both GL options and it seemed to work regardless of that setting.

robert5974 commented 4 years ago

Makes sense. I have the default RaspberryPi OS DE (or Raspbian as it was). Is that Pixel? I didn't think it was the same thing but either way. The Openauto disconnection issue happened only when gstreamer was being used I think. This is the first time I think that I've used the gstreamer in the build. I can provide logs...no problem. I'll have to try it a few times to capture it.
Yeah since you have the Pi4, you can use the GL driver with full kms but if I use it the screen is blank. Lol, I knew I could only use the fake kms but I tried the full one anyway which caused a blank screen after setting and reboot.
I'll come back with some logs for you. Do you want a seperate issue for that or no since it's a different branch?

robert5974 commented 4 years ago

Well...I went to repeat the issue to capture in a log for you. It didn't do it this time...hmmmph. I tried USB and wireless. Guess it was just that first time I ran the build. I hate when computers make you look dumb lol. So it worked better than the last time.
Only thing I noticed was when I turned off the head unit server for a wireless AA connection, it stayed connected until I exited the "driving app". The terminal showed only two messages, both saying " stream is closed, this shouldn't happen". I would think that was referring to when I stopped the head unit server on the phone. I was going to pipe stdout and stderror to a file for logging but it didn't record anything in the file. Do you have plans for some logging built in to debug by chance?

rsjudka commented 4 years ago

Yeah Pixel is the pi's default one (unless that's changed with the new pi os thing)

hmm i dont think we need to create an issue for this, since we dont have too much as for why it happened it may be hard to actually follow up on that, but i definitely am keeping track of all the weird one-off people have been having (maybe they're all just extreme edge cases and we need to beef up OA somehow?), but glad it works now!

logging is definitely something i am lacking (actually not doing any of it :p) and hope once i get to a stableish place maybe i can start doing more maintenance instead of feature work hah

just pushed the changes for the laggy slider controls, feel free to test it out and let me know if the tradeoff of not having real-time updates is worth it.

Also, were you able to work out that issue with the volume? does it still crash when you change the volume?

robert5974 commented 4 years ago

It didn't crash again either. Maybe it was just that one instance. Hopefully just a one off. Glad you are paying attention to the issues that are like a one off. Sometimes they reappear. I'll give the update to the slider a try and let you know. Thanks

rsjudka commented 4 years ago

Interesting that so much went wrong at once 😭

Let me know how it goes and then I'll merge it into develop - and close out this and the other issue

robert5974 commented 4 years ago

I feel like the volume slider is better and I didn't have any issues when I was trying it (a little lag).
I did have a little trouble with the brightness slider, it wasn't responding to touch but while I was trying, I hit the light/dark theme button and with the light theme it worked easier.
That's a bit strange. It worked after that. I'll play with some of my hw settings to just see if it helps. I haven't gotten much chance to do so yet. I may not see issues again without rebuilding it.

Thanks for the extra effort. I think you can close this one. Great work!

rsjudka commented 4 years ago

hmm interesting... this is a good example of why logging is very important :p

you have a pi touchscreen?

ill go ahead and merge this into develop, and hopefully if we get more mileage on these changes we can see if they're one-off or if multiple people are having these issues

robert5974 commented 4 years ago

Yeah I have the Official 7inch Pi touchscreen. Yeah logging can be incredibly useful. Especially while integrating.