aboutsummaryrefslogtreecommitdiffstats
path: root/src/sensor_adxl345.c
Commit message (Collapse)AuthorAgeFilesLines
* sensor_adxl345: No need to schedule start of bulk readingKevin O'Connor2024-01-191-43/+12
| | | | | | It's simpler and faster to enable the adxl345 in the python code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_bulk: New C file with helper code for sending bulk sensor measurementsKevin O'Connor2024-01-191-32/+19
| | | | | | | | | | Refactor the low-level "bulk sensor" management code in the mcu. This updates the sensor_adxl345.c, sensor_mpu9250.c, sensor_lis2dw.c, and sensor_angle.c code to use the same "bulk sensor" messages. All of these sensors will now send "sensor_bulk_data" and "sensor_bulk_status" messages. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_adxl345: No need to send messages when stopping queriesKevin O'Connor2024-01-191-18/+0
| | | | | | Simplify the mcu code as any messages are ignored by the host anyway. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* adxl345: Compress each sample from 6 bytes to 5 bytesKevin O'Connor2021-08-301-5/+25
| | | | | | | Transmit data from mcu to host using 5 bytes per sample and up to 10 samples per message block. This improves bandwidth efficiency. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* adxl345: Implement timing via new adxl345_status messagesKevin O'Connor2021-08-301-19/+43
| | | | | | | | Query the adxl345 message counter every 100ms so that accurate timing can be obtained during measurements. This allows the adxl345 data to be exported with timestamps while captures are running. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* adxl345: Use "clock" suffix instead of "time" in commandsKevin O'Connor2021-04-301-2/+2
| | | | | | The debugging code knows how to handle fields that end in "clock". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_adxl345: Remove unused stop_time parameterKevin O'Connor2020-09-051-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* adxl345: Add support for adxl345 accelerometerKevin O'Connor2020-09-051-0/+179
Add support for taking measurements from an adxl345 accelerometer via SPI interface. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>