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.
Revision 0:981e748c841a, committed 2021-08-23
- Comitter:
- sgrsn
- Date:
- Mon Aug 23 17:01:48 2021 +0000
- Commit message:
- one
Changed in this revision
| imu_interface.hpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 981e748c841a imu_interface.hpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/imu_interface.hpp Mon Aug 23 17:01:48 2021 +0000
@@ -0,0 +1,32 @@
+#ifndef IMU_INTERFACE_HPP
+#define IMU_INTERFACE_HPP
+
+#include "PMSU_100.hpp"
+
+class IMUInterface
+{
+ public:
+ IMUInterface()
+ {
+ }
+ virtual double GetYawRadians();
+};
+
+class PMSUInterface : public IMUInterface
+{
+ public:
+ PMSUInterface(PinName tx, PinName rx) : IMUInterface(), device_(tx, rx)
+ {
+ }
+ double GetYawRadians()
+ {
+ device_.update();
+ return device_.yaw_rad;
+ }
+
+ private:
+ PMSUSerial device_;
+};
+
+
+#endif
\ No newline at end of file