From cd1dcf7b36c6c5223806b8eee9a5a5875b890cbf Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 28 Sep 2017 20:09:53 +0200 Subject: Fix uint64_t coming from LUA that don't support Change-Id: Ida74a1f9904e9271ffc4a7c21d24f3b7f6c3f584 Signed-off-by: Romain Forlot --- plugins/lua2c-interface.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins') 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", ×tamp)) @@ -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; } -- cgit 1.2.3-korg