You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am a beginner in this type of approach and I don't know if I am making my request in the right place.
Please excuse me if this is not the case.
I would like to know if it would be possible for you to add a CRC calculation method to the official Streamdevice distribution.
This calculation method is used in serial communication with Spellmann MPS HV supplies.
My checksum calculation function:
// Checksum used by Spellman High Voltage Supplies MPS
static uint32_t hv_mps(const uint8_t* data, size_t len, uint32_t sum)
{
long int xsum;
while (len--)
{
sum += *data++;
}
xsum = -(sum %256);
sum = xsum & 0x7F;
sum |= 0x40;
return sum;
}
Looks straight forward enough. Unless I find an unexpected problem with it, I will add it to the next release. I may change some implementation details, like: -(sum %256) & 0x7F | 0x40 = -(sum & 0xFF) & 0x7F | 0x40 = (-sum) & 0x7F | 0x40
Actually, the documentation asks for (-sum) & 0xFF & 0x7F | 0x40 = (-sum) & 0x7F | 0x40.
Hello,
I am a beginner in this type of approach and I don't know if I am making my request in the right place.
Please excuse me if this is not the case.
I would like to know if it would be possible for you to add a CRC calculation method to the official Streamdevice distribution.
This calculation method is used in serial communication with Spellmann MPS HV supplies.
My checksum calculation function:
Thank you in advance
The text was updated successfully, but these errors were encountered: