I have taken a look into the setCalibrationData() Method, which "This does not currently seem to work."
I was wondering if the problem why it is not doning the right thing at the moment is, that in this method
- Code: Select all
private int setMultiBytes(int reg, byte data[], int len)
{
/*
* For some locations that are adjacent in address it is not possible to
* read the locations in a single write, instead we must write them
* using a series of individual writes. No idea why this should be, but
* that is how it is!
*/
for (int i = 0; i < len; i++)
{
byteBuff[0] = data[i];
int ret = sendData(reg + i, byteBuff,1);
if (ret < 0)
return ret;
}
return 0;
}
the sendData Mthod of I2CSensors is used and not the one of UltrasonicSensor, which requieres an additional parameter (offset, I presume).
Changing
- Code: Select all
int ret = sendData(reg + i, byteBuff,1);
to
- Code: Select all
int ret = sendData(reg + i, byteBuff,0,1);
might fix that?
P.S.: I know my written english is, let's put it that way, not so good. I hope I was able to transport the meaning anyway.
