]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/intellibox.cpp
Cosmetic fixes
[r2c2.git] / source / libr2c2 / intellibox.cpp
index 975c143fe46baf904d00db9b19a3777c68d627a1..3f3edf2aad00774b7262fbe0fe9a3f94c71a9787 100644 (file)
@@ -1,6 +1,4 @@
-#include <fcntl.h>
-#include <termios.h>
-#include <sys/poll.h>
+#include <msp/core/maputils.h>
 #include <msp/io/print.h>
 #include <msp/time/units.h>
 #include <msp/time/utils.h>
@@ -13,8 +11,8 @@ using namespace Msp;
 
 namespace R2C2 {
 
-Intellibox::Intellibox(const string &dev):
-       serial(dev),
+Intellibox::Intellibox(const Options &opts):
+       serial(opts.get<string>(string(), "ttyUSB0")),
        power(false),
        halted(false),
        update_sensors(false),
@@ -318,6 +316,11 @@ bool Intellibox::get_sensor(unsigned addr) const
        return false;
 }
 
+float Intellibox::get_telemetry_value(const string &name) const
+{
+       throw key_error(name);
+}
+
 void Intellibox::tick()
 {
        const Time::TimeStamp t = Time::now();