]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/dummy.cpp
Initialize the halted flag of dummy driver
[r2c2.git] / source / libr2c2 / dummy.cpp
index 0c3c351d968d01b23a79597aa4e725791dea5d62..90638f63bd8c438b2cfa845a7c0d20173992df41 100644 (file)
@@ -1,4 +1,5 @@
 #include <cstdlib>
+#include <msp/core/maputils.h>
 #include <msp/strings/utils.h>
 #include <msp/time/utils.h>
 #include "dummy.h"
@@ -10,6 +11,7 @@ namespace R2C2 {
 
 Dummy::Dummy(const Options &opts):
        power(true),
+       halted(false),
        turnout_delay(opts.get("turnout_delay", 0.0f)*Time::sec),
        turnout_fail_rate(opts.get("turnout_fail_rate", 0.0f)*RAND_MAX)
 { }
@@ -117,6 +119,11 @@ bool Dummy::get_sensor(unsigned addr) const
        return false;
 }
 
+float Dummy::get_telemetry_value(const string &name) const
+{
+       throw key_error(name);
+}
+
 void Dummy::tick()
 {
        Time::TimeStamp t = Time::now();