diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-08-07 19:41:13 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-08-08 15:56:45 +0200 |
commit | 92f0e16392712fb80954426722675292d551bf0c (patch) | |
tree | 440d88cd84790ee4abc70692c47696f90ee638e3 /signal-composer-binding | |
parent | 060f6b9d62939600a787bba60bf8bf92a6dbc63f (diff) |
Typos, cleaning.flounder_5.99.3flounder/5.99.35.99.3
Change-Id: I1f2b7484216271f97205cb9933bfd5ef2990bb2e
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'signal-composer-binding')
-rw-r--r-- | signal-composer-binding/signal-composer.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/signal-composer-binding/signal-composer.cpp b/signal-composer-binding/signal-composer.cpp index 7a111d5..79b6022 100644 --- a/signal-composer-binding/signal-composer.cpp +++ b/signal-composer-binding/signal-composer.cpp @@ -37,22 +37,6 @@ extern "C" void setSignalValueHandle(void* aSignal, uint64_t timestamp, json_obj sig->set(timestamp, value); } -bool startsWith(const std::string& str, const std::string& pattern) -{ - size_t sep; - if( (sep = str.find(pattern)) != std::string::npos && !sep) - {return true;} - return false; -} - -void extractString(void* closure, json_object* object) -{ - std::vector<std::string> *files = (std::vector<std::string>*) closure; - const char *oneFile = json_object_get_string(object); - - files->push_back(oneFile); -} - // aSignal member value will be initialized in sourceAPI->addSignal() static struct signalCBT pluginHandle = { .searchNsetSignalValue = searchNsetSignalValueHandle, @@ -389,14 +373,14 @@ void Composer::processOptions(const std::map<std::string, int>& opts, std::share } if (opts.at("maximum")) { - value = sig->minimum(opts.at("maximum")); + value = sig->maximum(opts.at("maximum")); json_object_is_type(value, json_type_double) ? json_object_object_add(response, "maximum", value) : json_object_object_add(response, "error", value); } if (opts.at("last")) { - value = sig->minimum(opts.at("last")); + value = sig->last_value(); json_object_is_type(value, json_type_null) ? json_object_object_add(response, "error", value) : json_object_object_add(response, "last", value); |