Commit 83b7138c authored by Daan Vreeken's avatar Daan Vreeken
Browse files

Committer: Daan Vreeken <pa4dan@RacebeestV3.VEHosting.LAN>

	modified:   controller/ec/block_beckhoff_el4xxx.c

The device type table has a big number of off-by-one and off-by-a-lot errors.
Disable support for all blocks for now that haven't been explicitly tested and
verified to work correctly.
parent bfdd1aa4
......@@ -365,30 +365,31 @@ struct beckhoff_el4xxx_type {
float gain;
float offset;
bool sign;
bool driver_verified;
struct controller_block_interm_list *interms;
};
static struct beckhoff_el4xxx_type devlist[] = {
{ "EL4001", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4001, 1, 4096/10.0, 0.0, false, interms_1 },
{ "EL4002", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4002, 2, 4096/10.0, 0.0, false, interms_2 },
{ "EL4004", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4004, 4, 4096/10.0, 0.0, false, interms_4 },
{ "EL4008", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4008, 8, 32767 / 10.0, 0.0, true, interms_8 },
{ "EL4011", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4001, 1, 4096/0.02, 0.0, false, interms_1 },
{ "EL4012", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4002, 2, 4096/0.02, 0.0, false, interms_2 },
{ "EL4014", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4004, 4, 4096/0.02, 0.0, false, interms_4 },
{ "EL4018", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4008, 8, 4096/0.02, 0.0, false, interms_8 },
{ "EL4021", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4001, 1, 4096/0.016, -0.004, false, interms_1 },
{ "EL4022", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4002, 2, 4096/0.016, -0.004, false, interms_2 },
{ "EL4024", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4004, 4, 4096/0.016, -0.004, false, interms_4 },
{ "EL4028", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4008, 8, 4096/0.016, -0.004, false, interms_8 },
{ "EL4102", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4102, 2, 65536/10.0, 0.0, false, interms_2 },
{ "EL4112", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4112, 2, 65536/0.02, 0.0, false, interms_2 },
{ "EL4114", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4114, 4, 65536/0.02, 0.0, false, interms_4 },
{ "EL4122", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4122, 2, 65536/0.016, 0.0, false, interms_2 },
{ "EL4132", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4132, 2, 32768/10.0, 0.0, true, interms_2 },
{ "EL4134", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4134, 4, 32768/10.0, 0.0, true, interms_4 },
{ "EL4001", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4001, 1, 4096/10.0, 0.0, false, false, interms_1 },
{ "EL4002", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4002, 2, 4096/10.0, 0.0, false, false, interms_2 },
{ "EL4004", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4004, 4, 4096/10.0, 0.0, false, false, interms_4 },
{ "EL4008", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4008, 8, 32767 / 10.0, 0.0, true, true, interms_8 },
{ "EL4011", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4001, 1, 4096/0.02, 0.0, false, false, interms_1 },
{ "EL4012", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4002, 2, 4096/0.02, 0.0, false, false, interms_2 },
{ "EL4014", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4004, 4, 4096/0.02, 0.0, false, false, interms_4 },
{ "EL4018", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4008, 8, 4096/0.02, 0.0, false, false, interms_8 },
{ "EL4021", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4001, 1, 4096/0.016, -0.004, false, false, interms_1 },
{ "EL4022", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4002, 2, 4096/0.016, -0.004, false, false, interms_2 },
{ "EL4024", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4004, 4, 4096/0.016, -0.004, false, false, interms_4 },
{ "EL4028", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4008, 8, 4096/0.016, -0.004, false, false, interms_8 },
{ "EL4102", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4102, 2, 65536/10.0, 0.0, false, false, interms_2 },
{ "EL4112", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4112, 2, 65536/0.02, 0.0, false, false, interms_2 },
{ "EL4114", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4114, 4, 65536/0.02, 0.0, false, false, interms_4 },
{ "EL4122", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4122, 2, 65536/0.016, 0.0, false, false, interms_2 },
{ "EL4132", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4132, 2, 32768/10.0, 0.0, true, false, interms_2 },
{ "EL4134", ESC_ESI_PRODUCTCODE_BECKHOFF_EL4134, 4, 32768/10.0, 0.0, true, false, interms_4 },
};
static int pre_operational_hook(struct esc_device *esc)
......@@ -428,6 +429,11 @@ struct controller_block * block_beckhoff_el4xxx_create(char *name, va_list ap)
log_send(LOG_T_ERROR, "Unsupported device: '%s'", eltype);
return NULL;
}
if (! devlist[i].driver_verified) {
log_send(LOG_T_ERROR, "This driver hasn't been verified to "
"work with the '%s'. Please implement it first!");
return NULL;
}
esc = esc_device_create(busname, devno, name);
......
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