mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
more compiler fixes
This commit is contained in:
parent
9beda12c4c
commit
839c332813
2 changed files with 15 additions and 9 deletions
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "pool.h"
|
||||
#include "sample.h"
|
||||
|
@ -151,7 +152,7 @@ int sample_cmp(struct sample *a, struct sample *b, double epsilon, int flags)
|
|||
}
|
||||
|
||||
if (a->format != b->format) {
|
||||
printf("format: %#llx != %#llx\n", a->format, b->format);
|
||||
printf("format: %#" PRIx64 " != %#" PRIx64 "\n", a->format, b->format);
|
||||
return 6;
|
||||
}
|
||||
|
||||
|
@ -166,7 +167,7 @@ int sample_cmp(struct sample *a, struct sample *b, double epsilon, int flags)
|
|||
|
||||
case SAMPLE_DATA_FORMAT_INT:
|
||||
if (a->data[i].i != b->data[i].i) {
|
||||
printf("data[%d].i: %lld != %lld\n", i, a->data[i].i, b->data[i].i);
|
||||
printf("data[%d].i: %" PRId64 " != %" PRId64 "\n", i, a->data[i].i, b->data[i].i);
|
||||
return 5;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -132,18 +132,23 @@ function apiConnected()
|
|||
function(response) {
|
||||
nodes = response;
|
||||
|
||||
console.log("Found " + nodes.length + " nodes:", nodes);
|
||||
console.log("Found " + nodes.length + " nodes:",);
|
||||
|
||||
for (var i = 0; i < nodes.length; i++)
|
||||
if (nodes[i].name == getParameterByName('node'))
|
||||
currentNode = nodes[i];
|
||||
nodes.forEach(function(node) {
|
||||
console.log(node);
|
||||
if (node.type == 'websocket' && node.name == getParameterByName('node'))
|
||||
currentNode = node;
|
||||
});
|
||||
|
||||
if (currentNode === undefined)
|
||||
currentNode = nodes[0];
|
||||
if (currentNode === undefined) {
|
||||
nodes.forEach(function(node) {
|
||||
if (node.type == 'websocket')
|
||||
currentNode = node;
|
||||
});
|
||||
}
|
||||
|
||||
if (currentNode !== undefined) {
|
||||
updateNodeList();
|
||||
|
||||
connection = wsConnect(currentNode);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue