Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: RWR_Utils.cpp
- Revision:
- 5:6cd52beadb7c
- Parent:
- 1:755da47160cb
- Child:
- 6:66889ef7193a
--- a/RWR_Utils.cpp Sat Jul 24 12:32:18 2021 +0300
+++ b/RWR_Utils.cpp Sat Jul 24 14:46:20 2021 +0300
@@ -94,6 +94,14 @@
return currentSensorState;
}
+void QTR::readSensorsAsAnalog(uint32_t *buffer)
+{
+ for (uint32_t i = 0; i < SENSORS_BAR_SIZE; i++)
+ {
+ buffer[i] = (uint32_t)sensors[i].read_u16();
+ }
+}
+
float QTR::readSensorsAsFloat()
{
uint32_t sensorValue = readSensorsAsDigital();