summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-28 20:09:53 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commitcd1dcf7b36c6c5223806b8eee9a5a5875b890cbf (patch)
tree53470148c3ca3266106386d40d151a26b6f53bbe /plugins
parent19bc0fd64d5f5035e53abfcda1559782ff3c54b4 (diff)
Fix uint64_t coming from LUA that don't support
Change-Id: Ida74a1f9904e9271ffc4a7c21d24f3b7f6c3f584 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/lua2c-interface.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/lua2c-interface.cpp b/plugins/lua2c-interface.cpp
index 76f61cc..b584823 100644
--- a/plugins/lua2c-interface.cpp
+++ b/plugins/lua2c-interface.cpp
@@ -57,7 +57,7 @@ CTLP_LUA2C (setSignalValueWrap, label, argsJ)
const char* name = nullptr;
double resultNum;
uint64_t timestamp;
- if(! wrap_json_unpack(argsJ, "{ss, sF, sF? !}",
+ if(! wrap_json_unpack(argsJ, "{ss, sF, sI? !}",
"name", &name,
"value", &resultNum,
"timestamp", &timestamp))
@@ -65,9 +65,8 @@ CTLP_LUA2C (setSignalValueWrap, label, argsJ)
AFB_ERROR("Fail to set value for label: %s, argsJ: %s", label, json_object_to_json_string(argsJ));
return -1;
}
-
struct signalValue result = {0,0,1, resultNum, 0, ""};
- pluginCtx->pluginHandle->setSignalValue(name, timestamp, result);
+ pluginCtx->pluginHandle->setSignalValue(name, timestamp*MICRO, result);
return 0;
}