openDsh / dash

Join us on Slack! https://join.slack.com/t/opendsh/shared_invite/zt-la398uly-a6eMH5ttEQhbtE6asVKx4Q
GNU General Public License v3.0
238 stars 69 forks source link

Added Gauges to Dashboard #110

Open modemlamer opened 2 years ago

modemlamer commented 2 years ago

hi, i added some gauges and added the OBD-Code's too. opendash

Commands cmds = { {"Calculated Engine Load", QCanBusFrame(0x7df, QByteArray::fromHex("0201040000000000")), percentage}, {"Engine Coolant Temperature", QCanBusFrame(0x7df, QByteArray::fromHex("0201050000000000")), coolanttemp}, {"Engine Revolutions Per Minute (RPM)", QCanBusFrame(0x7df, QByteArray::fromHex("02010C0000000000")), rpm}, {"Vehicle Speed", QCanBusFrame(0x7df, QByteArray::fromHex("02010D0000000000")), speed}, {"Intake Air Temperature", QCanBusFrame(0x7df, QByteArray::fromHex("02010F0000000000")), airtemp}, {"Engine Oil Temperature", QCanBusFrame(0x7df, QByteArray::fromHex("02015C0000000000")), oiltemp}, {"Fuel Tank Value", QCanBusFrame(0x7df, QByteArray::fromHex("02012F0000000000")), fueltank}, {"Lambda 1", QCanBusFrame(0x7df, QByteArray::fromHex("0201240000000000")), lambdaValue}, {"CAT TEMP 1", QCanBusFrame(0x7df, QByteArray::fromHex("02013C0000000000")), catTemp}, {"BOOST Pressure", QCanBusFrame(0x7df, QByteArray::fromHex("02010B0000000000")), boostPress}, {"Mass Air Flow (MAF) Rate", QCanBusFrame(0x7df, QByteArray::fromHex("0201100000000000")), flow}}; Wanna integrate this to the main code?

Merry Christmas

icecube45 commented 2 years ago

Do you have a github branch where we can check this out? I'm definitely curious in the visual changes.

To be honest, the gauge page needs a rework to be a bit more flexible, but I'd love ideas

Tysonpower commented 2 years ago

well...that should be a pull request not an issue :) Anyway, nice work, but could you restyle the gauges a bit? They look a bit oldschool to me.

thewormhole5 commented 1 year ago

where did you get what byte is what sensor?

rsjudka commented 1 year ago

If you're looking specifically at OBD, you can find a bunch of the standard stuff here: https://en.m.wikipedia.org/wiki/OBD-II_PIDs

If your trying to read CAN messages you'll either need to decode them yourself or find some resource for your specific car

thewormhole5 commented 1 year ago

i have changed speed to request the lambda value from the can bus but the dash will not show any value. dash the can bus does not send the expected signal back, here on the candump you can see the request of 7df; 02 01 24 this is obdii pid for oxygen sensor air fuel ratio, but the expected return message never comes back 7e8; 04 41 34 12 34. candumpcan0 obdiipid and here is my code for reference, just changed the speed to send the lambda rx string so i dont have to change everything else to match. why would the canbus not send back the byte?

Commands cmds = {{"Calculated Engine Load", QCanBusFrame(0x7df, QByteArray::fromHex("02010f0000000000")), percentage}, {"Engine Coolant Temperature", QCanBusFrame(0x7df, QByteArray::fromHex("0201050000000000")), temp}, {"Engine Revolutions Per Minute (RPM)", QCanBusFrame(0x7df, QByteArray::fromHex("02010B0000000000")), rpm}, {"Vehicle Speed", QCanBusFrame(0x7df, QByteArray::fromHex("0201240000000000")), speed}, {"Intake Air Temperature", QCanBusFrame(0x7df, QByteArray::fromHex("02010F0000000000")), temp}, {"Mass Air Flow (MAF) Rate", QCanBusFrame(0x7df, QByteArray::fromHex("0201100000000000")), flow}};

rsjudka commented 1 year ago

do you know if your car supports that PID?

I ran into that a lot when I was first building out this page... found out my car only supported the very basic ones which is why there's such a limited sets of available PIDs

thewormhole5 commented 1 year ago

does this picture mean anything? can page lambda it looks to me like lambda is being sent to 603; -- -- XX, also i have the option of making my own data stream user can stream i dont know what to put where and i dont know where the open dash is reading values from the can0 network. the command file is requesting data on the can bus, but where is open dash reading that data back off the bus?

if lambda is coming back on frame 603 instead of 7e8, can that be changed in the dash files?

robert5974 commented 1 year ago

I believe this is what you are looking for: /src/app/pages/vehicle.cpp.

eyeball29 commented 3 months ago

I'm hoping to add even just a single additional gauge display, with a nice-to-have of altered or new graphics.

I am adding to this issue as I think that is part of the original intent. Perhaps the enhancement can be a more involved how-to for those who are trying to reverse engineer the code (with lesser experience)?

My understanding thus far is:

  1. Update the command.cpp file with the appropriate lines (e.g. {"BOOST Pressure", QCanBusFrame(0x7df, QByteArray::fromHex("02010B0000000000")), boostPress})
  2. Should the data require different units, we need to add to decoders.hpp - some more insight here...add to command.hpp?
  3. Anything else? Calling another widget?
rsjudka commented 3 months ago

yeah that's roughly how I imagine that should work

one thing with adding to commands is that we only want to put ones that are OBD compliant (as those are the only ones we can guarantee are universal across cars) but I think we have the ability to register commands via plugins

rsjudka commented 3 months ago

I am working on a user-configurable vehicle page where you'll be able to set your cluster layout and which data you receive and the widget used, but it's alot 😝

robert5974 commented 3 months ago

Oh that sounds great! I've worked on it here and there but never got anywhere usable unfortunately. I'll be getting my setup back in the car soon and will be looking forward to this addition. Great work!

Robert Crowley

On Thu, Mar 7, 2024, 8:43 AM Robert Stanley Judka @.***> wrote:

I am working on a user-configurable vehicle page where you'll be able to set your cluster layout and which data you receive and the widget used, but it's alot 😝

— Reply to this email directly, view it on GitHub https://github.com/openDsh/dash/issues/110#issuecomment-1983535676, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLUDVG7QZ53X2Z65KFJROTYXBVITAVCNFSM5KZLZO42U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJYGM2TGNJWG43A . You are receiving this because you commented.Message ID: @.***>