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

Merge ../dt_ctrl-pand into beaglebone

parents 019e62b4 2f2ff187
......@@ -222,7 +222,8 @@ static void param_set(struct controller_block *wru, int param, void *val)
}
}
struct controller_block * block_winrotor_usb_create(char *name)
struct controller_block * block_winrotor_usb_create(char *name, int argc,
va_list ap)
{
struct usb_dev_handle *hdl;
struct controller_block *wru;
......@@ -310,3 +311,8 @@ err_usb:
return NULL;
}
BLOCK_CREATE(winrotor_usb) = {
.create = block_winrotor_usb_create,
.args = { NULL },
};
......@@ -86,7 +86,8 @@ static struct controller_block_outterm_list outterms[] = {
{ NULL }
};
struct controller_block * block_counter_create(char *name)
struct controller_block * block_counter_create(char *name, int argc,
va_list ap)
{
struct controller_block *counter;
......@@ -120,3 +121,8 @@ err_inputs:
controller_block_free(counter);
return NULL;
}
BLOCK_CREATE(counter) = {
.create = block_counter_create,
.args = { NULL },
};
......@@ -41,7 +41,7 @@ static void calculate(struct controller_block *debug)
fprintf(stderr, "%s.in: %e\n", debug->name, *debug->private->in);
}
struct controller_block * block_debug_create(char *name)
struct controller_block * block_debug_create(char *name, int argc, va_list ap)
{
struct controller_block *debug;
......@@ -72,3 +72,8 @@ err_name:
controller_block_free(debug);
return NULL;
}
BLOCK_CREATE(debug) = {
.create = block_debug_create,
.args = { NULL },
};
......@@ -59,7 +59,8 @@ static struct controller_block_outterm_list outterms[] = {
{ NULL }
};
struct controller_block * block_gain_var_create(char *name)
struct controller_block * block_gain_var_create(char *name, int argc,
va_list ap)
{
struct controller_block *gain;
......@@ -85,3 +86,9 @@ err_block:
controller_block_free(gain);
return NULL;
}
BLOCK_CREATE(gain_var) = {
.create = block_gain_var_create,
.args = { NULL },
};
......@@ -94,7 +94,8 @@ static struct controller_block_outterm_list outterms[] = {
};
struct controller_block * block_inverse_proportional_create(char *name)
struct controller_block * block_inverse_proportional_create(char *name,
int argc, va_list ap)
{
struct controller_block *iprop;
......@@ -135,3 +136,8 @@ err_inputs:
free(iprop);
return NULL;
}
BLOCK_CREATE(inverse_proportional) = {
.create = block_inverse_proportional_create,
.args = { NULL },
};
/*
* Copyright (c) 2012,
* Copyright (c) 2012, 2015,
* Daan Vreeken <Daan @ Vitsch . nl> - Vitsch Electronics
* All rights reserved.
*
......@@ -146,7 +146,8 @@ static struct controller_block_outterm_list outterms[] = {
{ NULL },
};
struct controller_block * block_quadrature_decoder_create(char *name)
struct controller_block * block_quadrature_decoder_create(char *name,
int argc, va_list ap)
{
struct controller_block *block;
......@@ -178,3 +179,8 @@ err_block:
controller_block_free(block);
return NULL;
}
BLOCK_CREATE(quadrature_decoder) = {
.create = block_quadrature_decoder_create,
.args = { NULL },
};
......@@ -49,7 +49,8 @@ static struct controller_block_outterm_list outterms[] = {
{ NULL }
};
struct controller_block * block_random_create(char *name)
struct controller_block * block_random_create(char *name, int argc,
va_list ap)
{
struct controller_block *random;
......@@ -72,3 +73,8 @@ err_block:
controller_block_free(random);
return NULL;
}
BLOCK_CREATE(random) = {
.create = block_random_create,
.args = { NULL },
};
......@@ -81,7 +81,7 @@ static struct controller_block_outterm_list outterms[] = {
{ NULL }
};
struct controller_block * block_sine_create(char *name)
struct controller_block * block_sine_create(char *name, int argc, va_list ap)
{
struct controller_block *sine;
......@@ -111,3 +111,8 @@ err_block:
controller_block_free(sine);
return NULL;
}
BLOCK_CREATE(sine) = {
.create = block_sine_create,
.args = { NULL },
};
......@@ -218,7 +218,8 @@ static struct controller_block_outterm_list outterms[] = {
};
struct controller_block * block_trajectplayer_create(char *name)
struct controller_block * block_trajectplayer_create(char *name, int argc,
va_list ap)
{
struct controller_block *player;
......@@ -255,3 +256,8 @@ err_block:
controller_block_free(player);
return NULL;
}
BLOCK_CREATE(trajectplayer) = {
.create = block_trajectplayer_create,
.args = { NULL },
};
......@@ -21,7 +21,8 @@
#include <controller/controller_block.h>
struct controller_block * block_trajectplayer_create(char *name);
struct controller_block * block_trajectplayer_create(char *name, int argc,
va_list ap);
struct block_trajectplayer_param {
int nr;
......
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