PCM Hammer Suite development

They go by many names, P01, P59, VPW, '0411 etc. Also covering E38 and newer here.
User avatar
Gampy
Posts: 2331
Joined: Sat Dec 15, 2018 7:38 am

Re: PCM Hammer Suite development

Post by Gampy »

I have pushed a PR (#218) to squash the Select Device and Cancel issue. (See: Re: PCM Hammer Release 015 (Preview))
The issue is due to vehicle being disposed before it's time.

It would be appreciated if this could get merged (or rejected) as soon as possible.

Thank you.
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

Re: PCM Hammer Suite development

Post by NSFW »

Merged. Thanks!
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
User avatar
Gampy
Posts: 2331
Joined: Sat Dec 15, 2018 7:38 am

Re: PCM Hammer Suite development

Post by Gampy »

Thank ya, Thank ya very much!

Pushed a persistent device life Enable4x up.
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

Re: PCM Hammer Suite development

Post by NSFW »

Gampy wrote:Thank ya, Thank ya very much!

Pushed a persistent device life Enable4x up.
Do you have any more changes coming soon, or should I publish a release of what we have right now?
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
User avatar
Gampy
Posts: 2331
Joined: Sat Dec 15, 2018 7:38 am

Re: PCM Hammer Suite development

Post by Gampy »

Thank you for asking ...

We should resolve this first IMO, a proposed resolution is here.

[edit]
Antus made a valid point, the choice was made, a PR for this is up!
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
antus
Site Admin
Posts: 8237
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: PCM Hammer Suite development

Post by antus »

merged, thanks for the PR
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
Gampy
Posts: 2331
Joined: Sat Dec 15, 2018 7:38 am

Re: PCM Hammer Suite development

Post by Gampy »

Sorry, I forgot to add a simple cleanup to PR#225 ... I just pushed another stupid simple PR, removing a stray comma.

I have been limiting myself to bug fixes and things that won't cause issues ... And that's it for them at the moment!
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
Gampy
Posts: 2331
Joined: Sat Dec 15, 2018 7:38 am

Re: PCM Hammer Suite development

Post by Gampy »

In Device.GetVpwTimeoutMilliseconds(...), there is an int,

Code: Select all

            int bitsPerByte = 9; // 8N1 serial
is there a reason it's 9 ??

8N1 is 10 bits per 8 bit byte.
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
antus
Site Admin
Posts: 8237
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: PCM Hammer Suite development

Post by antus »

Neither look correct to me in the context of the code. Its trying to time the data packet on the VPW bus which is 8N0 without a start bit, so it should be 8 bits per VPW byte. The payload, after the start of frame bit, and not counting the checksum or interframe, is 8 bits per byte on the VPW bus. But I would also think that there are too many variables to calculate this exactly correct. The add 10% probably covers the SOF and IFS in most cases, but its a bit rough. Could probably attempt to do better reading timing off of a logic capture, similar to whats here viewtopic.php?f=3&t=4761&hilit=sigrok#p67134 though they dont show the IFS at the end, to which the spec is a minimum length, from memory. Its also worth noting, that because VPW is variable length, the byte length will change depending on the payload. That is 01010101 or 10101010 will be the shortest and the longest bytes.

So you probably want to calculate SOF + (payload length + (8*long bit time)) + 8*long bit time (for checksum) + EOF. Then divide it by 4 if bus is at 4x. But even then, thats assuming a silent bus, and no re transmission and no wait for another packet to get in front.

As for 8N1 being 10 bits, that would be correct is we were talking RS232 serial. 1 start bit + 8 data bits + (no parity) + 1 stop bit

The other issue is how to time the data from the interface back to the pc. If its an older interface at serial 38400 then its going to take as long as the 4x speed packet on the VPW bus. If its a newer interface running usb 1 at 2mbit, its barely noticable. All in all, I dont think its worth attempting. What we have is probably close enough but we could probably document it better and not use 9 bits per byte in the code as thats completely meaningless in the context.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
Gampy
Posts: 2331
Joined: Sat Dec 15, 2018 7:38 am

Re: PCM Hammer Suite development

Post by Gampy »

A compromise between the two ??

Pc to Tool is 8N1
Tool to PCM is 8N0 ?
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
Post Reply