X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fintellibox.cpp;h=ec72a32734af9d38f33fa26235988ca62fccfa89;hb=f8873062b146028c07f55ad625d2767e45133c27;hp=975c143fe46baf904d00db9b19a3777c68d627a1;hpb=73e4a36bbf828e07b83a779b696875e1f80045cc;p=r2c2.git diff --git a/source/libr2c2/intellibox.cpp b/source/libr2c2/intellibox.cpp index 975c143..ec72a32 100644 --- a/source/libr2c2/intellibox.cpp +++ b/source/libr2c2/intellibox.cpp @@ -1,6 +1,4 @@ -#include -#include -#include +#include #include #include #include @@ -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(), "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(); @@ -554,7 +557,7 @@ void Intellibox::process_reply(const Time::TimeStamp &t) if(!sensor.state) { sensor.state = state; - signal_sensor(addr, state); + signal_sensor.emit(addr, state); } } else if(sensor.state)