kx122: Note return method change in apichanges.md

Updated the API documentation with changes to the kx122.  Removed a few
extra EOL spaces.

Signed-off-by: Antoine W. Campagna <AntoineW@Campagna.org>
Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
Antoine W. Campagna 2018-03-25 21:50:34 -04:00 committed by Noel Eck
parent e99f1d73fd
commit b55501e327
2 changed files with 9 additions and 4 deletions

View File

@ -4,6 +4,11 @@ API Changes {#apichanges}
Here's a list of other API changes made to the library that break source/binary
compatibility between releases:
# vNext
* The interface of **kx122** has been modified to return values instead of
receiving pointers. This applies to member functions: getWhoAmI,
getInterruptSource, getBufferStatus, getRawBufferSamples, and getBufferSamples.
# v1.6.0
* Several C libraries had their init function pin type modified from uint8_t

View File

@ -318,7 +318,7 @@ uint KX122::getBufferStatus()
if(kx122_get_buffer_status(m_kx122, &nb_samples)){
throw std::runtime_error(std::string(__FUNCTION__) + "kx122_get_buffer_status failed");
}
return nb_samples;
}
@ -339,7 +339,7 @@ std::vector<float> KX122::getRawBufferSamples(uint len)
xyz_array[i * 3 + 1] = buffery[i];
xyz_array[i * 3 + 2] = bufferz[i];
}
return xyz_array;
}
@ -349,7 +349,7 @@ std::vector<float> KX122::getBufferSamples(uint len)
if(kx122_read_buffer_samples(m_kx122,len,bufferx,buffery,bufferz)){
throw std::runtime_error(std::string(__FUNCTION__) + "kx122_read_buffer_samples failed");
}
std::vector<float> xyz_array(len * 3);
for (uint i = 0; i < len; i++)
{
@ -357,7 +357,7 @@ std::vector<float> KX122::getBufferSamples(uint len)
xyz_array[i * 3 + 1] = buffery[i];
xyz_array[i * 3 + 2] = bufferz[i];
}
return xyz_array;
}