Skip to content

Added the protocol #49

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

Open
wants to merge 10 commits into
base: everest/charge_som
Choose a base branch
from

Conversation

stefannagelchargebyte
Copy link

For a first review ... the first 3 messages are documented

@lategoodbye lategoodbye requested review from mhei and lategoodbye April 17, 2025 07:37
@lategoodbye lategoodbye requested a review from barsnick April 22, 2025 08:34
@@ -0,0 +1,362 @@
ChargeState1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the confluence page there was a change to drop the confusing number from ChargeState and ChargeControl.
But based on dbc we should keep it to distinct between the different messages (ChargeState1 & ChargeState2)?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets keep the postfix for now ... we can also change that later


**Senders**: Safety Controller

.. list-table:: Signals in ChargeState1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to make those a regular table instead of a "list table", which makes reviewing more easier?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output should be good .. I dont know if it makes sense to make a generated file mor readable. And this way it is much easire to implement

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The advantage of a normal table is that you don't need sphinx-build to read and compare patches to the rst file.

Copy link
Member

@mhei mhei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I look at the rendered output, I recommend to change:

  • The values in the 'start' table colum does not yet makes sense. I don't know at which side of the 8 byte packet the counting starts since it is not described. If I assume it starts "left", then CC_TargetDutyCycle starts at 1 with length 10, but CC_PWM_Active starts at 7 so it looks like it overlaps.
  • I recommend for signals without unit, do not use "-" in plain text source since it renders to a bullet point, just leave this cell empty.
  • I also recommend leave the cell "ByteOrder" empty for signals with 8 bits or less.
  • PTx_Temperature signals have length of 14 bits. Why is 0x1fff used to indicate that the sensor is not used, this are only 13 bits? I'd assume that you mean 0x3fff ?
  • In the documentation of the Inquiry packet, the first byte is named "PacketId" and in the description it is refered to "ID" of the message. Above we use "COM Values" - I recommend to clarify somehow to make it more clear.
  • a Git hash is 160 bit (SHA-1), that are 20 byte, not 64 byte as documented.

@stefannagelchargebyte
Copy link
Author

I recommend for signals without unit, do not use "-" in plain text source since it renders to a bullet point, just leave this cell empty.
I also recommend leave the cell "ByteOrder" empty for signals with 8 bits or less.
In the documentation of the Inquiry packet, the first byte is named "PacketId" and in the description it is refered to "ID" of the message. Above we use "COM Values" - I recommend to clarify somehow to make it more clear.
a Git hash is 160 bit (SHA-1), that are 20 byte, not 64 byte as documented.
--> Done

The values in the 'start' table colum does not yet makes sense. I don't know at which side of the 8 byte packet the counting starts since it is not described. If I assume it starts "left", then CC_TargetDutyCycle starts at 1 with length 10, but CC_PWM_Active starts at 7 so it looks like it overlaps.
It looks like that:
grafik

PTx_Temperature signals have length of 14 bits. Why is 0x1fff used to indicate that the sensor is not used, this are only 13 bits? I'd assume that you mean 0x3fff ?

This is a signed integer: 0x1FFF corresponds to 8191 and 0x2000 to -8192 ... a value of 0x3FFF would be -1

Copy link
Member

@mhei mhei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge this as-is once the chargebyte CbChargeSOM driver is updated and uses the new protocol.

@mhei
Copy link
Member

mhei commented Jun 17, 2025

I think we can merge this after chargebyte/everest-chargebyte#27 is merged.

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

Successfully merging this pull request may close these issues.

3 participants