- 22 Jan, 2015 2 commits
-
-
Jeroen Vreeken authored
Trace server capacity is now based on actuall number of outputs, not on some magic number. Add name and unit option to command_bool and command_float. Modify tests to test this.
-
Jeroen Vreeken authored
A lot simpler than the 1d and 3d setpoint generator and perfect for temperature settings ;) Add test for command_float block.
-
- 21 Jan, 2015 1 commit
-
-
Jeroen Vreeken authored
-
- 20 Jan, 2015 23 commits
-
-
Daan Vreeken authored
With this, we can create e.g. an oscillator module that only has an output, but no inputs. modified: controller/controller_load_parser.y
-
Daan Vreeken authored
modified: controller/controller_load_parser.y
-
Daan Vreeken authored
The 'filename' parameter wasn't initialized here, so when extra->filename is used to generate e.g. log messages, garbage entered the log. modified: controller/controller_load.c
-
Daan Vreeken authored
allows us to e.g. comment out all parameter lines in a parameter block. (Commenting out all parameters would fail before.) modified: controller/controller_load_parser.y
-
Daan Vreeken authored
modified: controller/controller/controller_block.c modified: controller/controller/controller_block.h
-
Jeroen Vreeken authored
Also add test for different linking variants (late, immediate, not-chained). All expected/assumed behaviour should get explicit tests. Same for blocks. Block behaviour must be testable without the real application. (or real hardware, which is the bigger problem) Conflicts: controller/controller/controller_block.c
-
Jeroen Vreeken authored
Use one version everywhere, and make sure that one version is complete. This version also uses a switch with the actuall enum types, which is safer.
-
Daan Vreeken authored
-
Daan Vreeken authored
We do this by checking the final state of all links after loading the top-most controller file. The new code will allow an included file to create links to blocks that will only exist later on during the load process, and it will successfully error out when links are defined for non-existing block. Furthermore, controller_block_link() will now bail out immediately when it hits an unrecoverable linker error. With this change, the error mesaage of the linker step that failed will remain at the end of the output instead of being flushed off the screen by e.g. 100+ 'Linked x to y (chained)' lines. modified: controller/controller/controller_block.c modified: controller/controller/controller_load.c
-
Jeroen Vreeken authored
-
Daan Vreeken authored
This caused all my .ctrl files with typos or non-existing block names in their 'links { }' section to 'just run' instead of failing with an error. We will now halt with an error like : DEBUG: Input block 'digg_out2' does not (yet) exist, will try to link later ERROR: Failed to link controller! ERROR: Could not load controller file modified: controller/controller_load.c
-
Daan Vreeken authored
Untill now, connecting e.g. a 'bool' output to a 'float' input would give: ERROR: Input terminal x.y not found .. although both the input and the output existed. With this commit, the error will read : ERROR: Type mismatch. Can't connect output terminal a.b (of type 'bool') to input terminal x.y (of type 'float') modified: controller/controller_block.c modified: controller/controller_block.h
-
Daan Vreeken authored
modified: controller/controller_block.c
-
Daan Vreeken authored
(No functional changes.) There's an error in the error reporting of this routine, but we'll fix that in a separate commit. modified: controller/controller_block.c
-
Jeroen Vreeken authored
-
Jeroen Vreeken authored
-
Daan Vreeken authored
'slash' would be used uninitialized in this case. While we're here, change code to use strrchr() instead of rolling our own and only stat() a filename if we've found a '/', since we know 'extern->filename' will not contain a directory name otherwise. modified: controller/controller_load.c
-
Daan Vreeken authored
modified: dt_azimuth/dt_az_safety.c modified: dt_elevation/dt_el_safety.c
-
Daan Vreeken authored
Don't intialize bool or uint32_t with float value. modified: block/block_value_bool.c modified: block/block_value_uint32.c
-
Daan Vreeken authored
My .ctrl file is so much cleaner this way :) modified: block/block_value_bool.c modified: block/block_value_uint32.c
-
Daan Vreeken authored
Before, a value of '1.0' had to be created like this : blocks(..) { { "value", "one" } } params { { "one", "value", 1.0 } } Now you can simply instantiate the same block with : blocks(..) { { "value", "one", 1.0 } } I've finally found a good use for fully specified multiple choice argument lists :) modified: block/block_value.c
-
Daan Vreeken authored
(You'll see why in the next commit..) modified: controller/controller_load.c
-
Daan Vreeken authored
When the .ctrl file contains a line to create an 'ec' block with incorrect arguments, the following errors would be emitted : ERROR: Invalid arguments trying to create block 'ethercat' DEBUG: Load module 'ec' with prefix 'ethercat' ERROR: ec:1: syntax error, unexpected $end DEBUG: End of module 'ec': 1 ERROR: pand.ctrl:50: Error creating block ERROR: Could not load controller file The code would first try to load the dynamically loadable 'ec' block's module. This would fail, because of incorrect arguments. controller_load_block_create() would then try to stat() the file 'ec'. When found, it is opened and loaded as a module block. The code didn't check for the file to be a regular file and my build system contains a directory with the name 'ec'. On FreeBSD, directories can be opened and read as if they were regular files, but the .ctrl file parser would fail to load the directory. Change the code to *not* try to parse directories. (It would be even better if we just stopped trying to load blocks when controller_block_create() tells us that the block does exist, but the user has made an error. At this moment though, controller_block_create() has no way of telling the caller that.) The new code bails out with : ERROR: Invalid arguments trying to create block 'ethercat' ERROR: Could not load or create block 'ec' ERROR: pand.ctrl:50: Error creating block ERROR: Could not load controller file modified: controller/controller/controller_load.c
-
- 19 Jan, 2015 10 commits
-
-
Daan Vreeken authored
The incorrect error was line 3 of the following example: ERROR: Too many arguments supplied! This function doesn't accept arguments. ERROR: Invalid arguments trying to create block 'heater3' ERROR: Could not find create function or struct for block bridge_pwm ERROR: pand.ctrl:36: Error creating block Both the create function and the create struct were found, but the block wasn't created because the arguments didn't match. This version reports: .. ERROR: Could not load or create block 'bridge_pwm' modified: controller/controller/controller_load.c
-
Daan Vreeken authored
modified: controller/controller/controller_block.c
-
Daan Vreeken authored
modified: controller/block/block_bridge_pwm.c
-
Daan Vreeken authored
are. modified: controller/controller/controller_load.c
-
Daan Vreeken authored
o My two cents: If you can give explicit errors that tell the user exactly what is wrong with a minimal amount of code, please do. modified: controller/controller/controller_load.c
-
Jeroen Vreeken authored
is killed out of the blue) Add return value to controller_block_add() and add a check to the blocks for its value.
-
Jeroen Vreeken authored
is killed out of the blue) Add return value to controller_block_add() and add a check to the blocks for its value.
-
Jeroen Vreeken authored
Fixed some merge conflicts between argument checker and module code. Conflicts: controller/controller/controller_block.c controller/controller/controller_load.c
-
Jeroen Vreeken authored
Move parameter argument check to block_parameter file. Remove arugment number check. (Full type check makes it redundant) Rename check function with controller_load prefix. Don't treat 1 argument option different from multiple options.
-
Jeroen Vreeken authored
Module inputs can now be used multiple times in a module Added test for this to test_module.ctrl
-
- 18 Jan, 2015 4 commits
-
-
Daan Vreeken authored
modified: controller/controller_load.c
-
Daan Vreeken authored
when creative block names are used. Bumped into an almost undecipherable error message due to the name I choose for a block :) modified: controller/controller_block.c
-
Daan Vreeken authored
This will produce error messages like: ERROR: Argument mismatch in argument 1. Expected argument of type 'double' instead of 'char*' ERROR: Invalid arguments trying to create trigger 'prestart' ERROR: pand.ctrl:7: Error in trigger ERROR: Could not load controller file modified: controller/controller_load.c modified: controller/controller_sample.c modified: controller/controller_sample.h
-
Daan Vreeken authored
Do this by reversing the logic in some ifs and adding a couple of gotos. (No functional changes.) modified: controller/controller_sample.c
-