8000 cabana: draw borders around signals by pd0wm · Pull Request #27293 · commaai/openpilot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

cabana: draw borders around signals #27293

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

Closed
wants to merge 1 commit into from

Conversation

pd0wm
Copy link
Contributor
@pd0wm pd0wm commented Feb 10, 2023

After adding bit level highlighting it was a bit harder to see where the signal edges where. This should make things more clear. Had to move LSB/MSB indicators up slightly to make everything fit.

Screenshot 2023-02-10 at 10 34 24

As you can see if the shape is concave very small gaps appear at the two inside corners. If you want I can add a bunch more code to handle this case, or we leave it like this.
Screenshot 2023-02-10 at 10 34 47

Before:
Screenshot 2023-02-10 at 10 40 13

@deanlee
Copy link
Contributor
deanlee commented Feb 10, 2023

this is the result that paint border with 1px width(setAlpha(1), darker(125)), Qt::DashLine style:
Screenshot from 2023-02-10 21-36-06
Screenshot from 2023-02-10 21-35-46

I'm not sure which is better, just for your reference

@gregjhogan
Copy link
Member

I guess that doesn't look great, but maybe it is OK. An alternative I can think of instead of the border would be a solid color line between MSB and LSB or only border on the bottom (arrow at end showing wrap direction when multiple lines? maybe that is overkill)

@adeebshihadeh
Copy link
Contributor

I kind of like the dotted lines.

@pd0wm
Copy link
Contributor Author
pd0wm commented Feb 11, 2023

I tried the dotted lines, but I don't like how they don't match up on the boundaries between bits. But if you like dash/dots more I'm happy to change it :)

Dashed:
Screenshot 2023-02-11 at 10 57 09

Dotted:
Screenshot 2023-02-11 at 10 57 00

@deanlee
Copy link
Contributor
deanlee commented Feb 11, 2023

y, the dotted line is not good look.

I googled for some hexview designs, and I feel that it will look better if add some padding between borders: (width:1px, margin-top-bottom:1px, margin-left-right 3~5 pix

HexEditor11
de
phpERB6pI

@deanlee
Copy link
Contributor
deanlee commented Feb 11, 2023

It should look better if make binaryView more compact with small fonts.

@pd0wm
Copy link
Contributor Author
pd0wm commented Feb 11, 2023

Rough draft. If you'd like to move forward with this I can clean up the gaps and ensuring the background doesn't draw beyond the outlines.
Screenshot 2023-02-11 at 11 19 40

@deanlee
Copy link
Contributor
deanlee commented Feb 11, 2023

y,It looks better than the origin version. what do you think? If you think it's okay too, then I'll make binview more compact based on it.

@pd0wm
Copy link
Contributor Author
pd0wm commented Feb 11, 2023

Think it looks better with the padding. I won't have time till next week to clean it up though. So if you want you can also merge it as is and me or @deanlee can submit a separate PR to add the paddings.

@deanlee
Copy link
Contributor
deanlee commented Feb 11, 2023

It can be merged as it as. I'll get the rest of the work done if you're busy.

@deanlee
Copy link
Contributor
deanlee commented Feb 11, 2023

looks better after apply this to a compact binView:

Screenshot from 2023-02-11 20-27-50
Screenshot from 2023-02-11 20-26-13
Screenshot from 2023-02-11 20-25-46
Screenshot from 2023-02-11 20-25-32

@pd0wm
Copy link
Contributor Author
pd0wm commented Feb 11, 2023

Are you sure you want to make the binary view more compact? This is the main piece of the UI that the user interacts with when they are adding new signals. You're sitting in the car, interacting with something, and in the meantime you try to see which bits are changing. I also noticed that at the current size the UI is pretty usable on a touchscreen.

Maybe you can make a checkbox to toggle between large/compact view? I imagine the compact view might be more desirable with CAN-FD.

Maybe this PR is not a suitable place to discuss this though.

@deanlee
Copy link
Contributor
deanlee commented Feb 11, 2023

Sorry I didn't take that into consideration, you are right. I will undo this part of the changes.

@deanlee
Copy link
Contributor
deanlee commented Feb 11, 2023

the origin size:
padding-top-bottom:1px
Screenshot from 2023-02-11 21-30-24

padding-top-bottom:2px:

Screenshot from 2023-02-11 21-34-18

Padding 2 px seems to be clearer.

@pd0wm
Copy link
Contributor Author
pd0wm commented Feb 11, 2023

2px looks good. Feel free to take my code and open a new PR if you want, then I'll close this one.

@gregjhogan
Copy link
Member
gregjhogan commented Feb 11, 2023

This is what I was trying to describe, I think it looks pretty nice.
image

Would probably look even better with a gray border with rounded corners that goes around both this new 4 px line as well as the MSB/LSB text.

@adeebshihadeh
Copy link
Contributor

That looks great, and agree that it would be nice to get the MSB/LSB visually "attached" to the underline.

@gregjhogan
Copy link
Member

#27308

@deanlee
Copy link
Contributor
deanlee commented Feb 11, 2023

2023-02-12_02-33

looks good, but I'm worry about areas like this, if their color is similar to others, it's hard to distinguish quickly,Especially when the frequency of activities changes.

@gregjhogan
Copy link
Member

Only showing MSB for these single bit signals is weird I think. Maybe we can switch it to just the colored bar about the same width as the MSB text (and remove the MSB text)?

@deanlee
Copy link
Contributor
deanlee commented Feb 11, 2023

I made a table and compared the two modes, the border seems clearer and consistent.

line border
Screenshot from 2023-02-12 02-55-17 Screenshot from 2023-02-12 02-57-41
Screenshot from 2023-02-12 02-54-10 Screenshot from 2023-02-12 02-59-08
Screenshot from 2023-02-12 02-52-57 Screenshot from 2023-02-12 03-01-54
Screenshot from 2023-02-12 02-52-42 Screenshot from 2023-02-12 03-02-55

@gregjhogan
Copy link
Member

I really like seeing the wrap direction that the color line gives you when the signal is multiple rows. I think the information might still be easier to quickly understand with the single bit fields changed to something better and the MSB/LSB integrated into the color line with border. I do like the better separation your changes have for when adjacent signals have similar colors.

@deanlee
Copy link
Contributor
deanlee commented Feb 11, 2023

yes, I looooved that line too when I first saw it. but since all the color blocks are still mixed together even if there is a color line underneath, (many colors are similar). IMO, it didn't solve the most important problem we were trying to solve in the first place: distinguishing different signal and non-signal regions at a glance.

@deanlee
Copy link
Contributor
deanlee commented Feb 11, 2023

Maybe we can add a button to toggle between the two modes? they each have pros and cons this may make things more complicated

@sshane
Copy link
Contributor
sshane commented Feb 11, 2023

The borders are a bit easier to see on my phone

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

Successfully merging this pull request may close these issues.

6 participants
0