Commit 9cda7eed authored by Ivan Tyagov's avatar Ivan Tyagov

Board has only 2 Analon In.

parent cc96c967
......@@ -113,10 +113,12 @@ static void addVariable(UA_Server *server)
sprintf(node_id, "i2c%d.in%d", i, n);
sprintf(node_title, "I2C%d / Digital Input %d", i, n);
addBooleanVariableReadNode(server, node_id, node_title);
// add analog in
sprintf(node_id, "i2c%d.ain%d", i, n);
sprintf(node_title, "I2C%d / Analog Input %d", i, n);
addUIntegerVariableReadNode(server, node_id, node_title);
// add analog in (board has only 2 thus do not all all)
if ( n < 2) {
sprintf(node_id, "i2c%d.ain%d", i, n);
sprintf(node_title, "I2C%d / Analog Input %d", i, n);
addUIntegerVariableReadNode(server, node_id, node_title);
}
}
}
}
......@@ -517,7 +519,7 @@ static void addValueCallbackToCurrentTimeVariable(UA_Server *server)
int device_number, offset_number;
char *node_id = malloc(sizeof(char) * 10);
// list of relays, digital and analog callbacks for all devices (XXX: for now only 4 outof 127 possible!)
// list of relays, digital and analog callbacks for all devices (XXX: for now only 4 out of 127 possible!)
static void (*callables[48])
(UA_Server *server, const UA_NodeId *sessionId, void *sessionContext,
const UA_NodeId *nodeId, void *nodeContext, const UA_NumericRange *range,
......@@ -579,7 +581,7 @@ static void addValueCallbackToCurrentTimeVariable(UA_Server *server)
beforeReadTimeI2C3In1,
beforeReadTimeI2C3In2,
beforeReadTimeI2C3In3,
// analog - IC1
// analog - IC3
beforeReadTimeI2C3Ain0,
beforeReadTimeI2C3Ain1,
beforeReadTimeI2C3Ain2,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment