Commit a0273969 authored by Jeroen Vreeken's avatar Jeroen Vreeken
Browse files

Debug new ethercat code.

Tested with beckhoff blocks connected.
(Still only one ethercat bus, multiple busses remains untested.)
parent 4514cd2d
......@@ -38,7 +38,7 @@ struct controller_block_private {
struct controller_bus *bus;
};
static void calculate(struct controller_block *ec)
static void ec_calculate(struct controller_block *ec)
{
struct controller_bus *bus = ec->private->bus;
......@@ -54,7 +54,7 @@ static void calculate(struct controller_block *ec)
ec->private->operational = true;
}
static void calculate_tx(struct controller_block *ec)
static void ec_calculate_tx(struct controller_block *ec)
{
ec_tx_pdo(ec->private->ec);
}
......@@ -138,6 +138,7 @@ static struct controller_block * block_ec_create(char *name, int argc, va_list a
ec_tx = controller_block_alloc("ec_tx", name_tx, 0);
if (!ec_tx)
goto err_ec_tx;
ec_tx->private = ec->private;
if (controller_block_outterm_list_init(ec, outterms))
goto err_outputs;
......@@ -161,8 +162,8 @@ static struct controller_block * block_ec_create(char *name, int argc, va_list a
ec->private->pdo_data = true;
ec->private->operational = false;
ec->calculate = calculate;
ec_tx->calculate = calculate_tx;
ec->calculate = ec_calculate;
ec_tx->calculate = ec_calculate_tx;
if (controller_block_add(ec))
goto err_add;
......
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