We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
currently we're overwriting our alreadyReadData (since ReadDataXYZ reads always 6 Data). We could name it "alreadyReadSamples"
we do this:
/* read Data */ for(uint8_t i=0; i < samplesInFifo; i++){ errorCode = adxl345bReadDataXYZ(sensor, rawData[alreadyReadData + i]); //sleep 5 μs to ensure data is ready sleep_for_ms(5); if(errorCode != ADXL345B_NO_ERROR){ PRINT_DEBUG("ReadDataXYZ failed"); return errorCode; } }
instead we need to do this:
/* read Data */ for (uint8_t i = 0; i < samplesInFifo; i++) { errorCode = adxl345bReadDataXYZ(sensor, rawData[alreadyReadSamples * 6]); alreadyReadSamples++; //sleep 5 μs to ensure data is ready sleep_for_ms(5); if (errorCode != ADXL345B_NO_ERROR) { PRINT_DEBUG("ReadDataXYZ failed"); return errorCode; } }
The text was updated successfully, but these errors were encountered:
PandiasChild
Successfully merging a pull request may close this issue.
currently we're overwriting our alreadyReadData (since ReadDataXYZ reads always 6 Data). We could name it "alreadyReadSamples"
we do this:
instead we need to do this:
The text was updated successfully, but these errors were encountered: