Commit 24bc27d9 authored by Arnaud Blanchard's avatar Arnaud Blanchard
Browse files

Merge branch 'master' of https://promethe.u-cergy.fr/blaar/bapps

parents 5c9c0760 1b5034af
......@@ -3,17 +3,6 @@ Set of programs to manipulate data in blc_channels. They do not have any lib dep
Acquire input values
====================
from files
----------
`i_fread <filename.tsv>` reads a line of data from the file in tsv (i.e. '0.3 0.55 0.56 ' is a vector of 3 values) and creates a channel (a vector) containing these data.
If there are many lines, it updates the data as fast as possible with each time.
It is very fast you can be either be synchronized or using **-p** to requiert a minimal time between each update.
You can also use a first column describing the time in µs to read the line.
Finaly you can limit the number of line read by using -n.
To load sound or images, see [i_sndfile](http://blaar.org/../sndfile) and [i_pngfile](http://blaar.org/../png)
from keyboard
-------------
......@@ -48,25 +37,46 @@ It can be changed with `-S`.
Sometime you do not want intermediate values but only **toggle** between max and min. Then use `-T`.
from files
----------
`i_fread <filename.tsv>` reads a line of data from the file in tsv (i.e. '0.3 0.55 0.56 ' is a vector of 3 values) and creates a channel (a vector) containing these data.
If there are many lines, it updates the data as fast as possible with each time.
It is very fast you can be either be synchronized or using `-p` to requiert a minimal time between each update.
You can also use a first column describing the time in µs to read the line.
Finaly you can limit the number of line read by using `-n`.
To load sound or images, see [i_sndfile](https://promethe.u-cergy.fr/blaar/sndfile) and [i_pngfile](https://promethe.u-cergy.fr/blaar/png)
from oscillator
---------------
`i_oscillator -o/toto` generates sinusoidale oscillations and put it in the channel /toto.
You can specify the frequency with -f and the refresh rate with -r.
You can specify the frequency with `-f` and the refresh rate with `-r`.
The refresh rate defines how often you will update the value of the oscillator but will not change the frequency.
You can use a buffer to keep the historic of the oscillation.
from mouse
----------
`i_mouse` but you need to be sudo for now ...
Generate outputs
================
to the terminal
---------------
In development ...
`o_display <blc_channel-in>`
to a file
---------
`o_fread <channel> -f <filename.tsv>` create a tsv file with the data of the channel. The options are symetrical with i_fread.
`o_fwrite <channel> -f <filename.tsv>` create a tsv file with the data of the channel. The options are symetrical with **i_fread**.
To save sounds or images see [o_sndfile](http://blaar.org/../sndfile] and [o_pngfile](http://blaar.org/../png]
To save sounds or images see [o_sndfile](https://promethe.u-cergy.fr/blaar/sndfile] and [o_pngfile](https://promethe.u-cergy.fr/blaar/png]
\ No newline at end of file
......@@ -16,9 +16,9 @@ project(i_keyboard)
find_package(blc_channel REQUIRED)
find_package(blc_program REQUIRED)
add_definitions(${BL_DEFINITIONS})
add_definitions(${BL_DEFINITIONS} -Wno-multichar)
include_directories(${BL_INCLUDE_DIRS})
add_executable(i_keyboard src/main.cpp)
add_executable(i_keyboard src/i_keyboard.cpp)
target_link_libraries(i_keyboard ${BL_LIBRARIES})
......
......@@ -231,7 +231,7 @@ int main(int argc, char** argv){
uchar answer;
blc_array array_select;
asprintf(&default_output, "/%s%d", basename(argv[0]), getpid()); //This will not be free but it is only allocate once
SYSTEM_ERROR_CHECK(asprintf(&default_output, "/%s%d", basename(argv[0]), getpid()), -1, NULL); //This will not be free but it is only allocate once
blc_program_set_description("Get keyboard inputs");
blc_program_add_option(&display, 'd', "display", NULL, "Display a text graph", NULL);
blc_program_add_option(&filename, 'f', "file", "filename", "Initialize the values with a tsv file", NULL);
......@@ -300,9 +300,7 @@ int main(int argc, char** argv){
}
}
}
if (memchr(key_list, quitting_key, keys_nb)) EXIT_ON_ERROR("The quitting key '%c' is in your key list %.*s, you need to select an other one with --quitting_key=...", quitting_key, keys_nb, key_list);
......
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