> The reason is that each axis could control several sub-axes. How many axis go to each sub-axes (sub-joystick)? How do you map then? ... The first two one, the first three ones... > > The idea behin is that one one-dimensional arrays does not scale very > whell with different kind of input-devices. > In the past it was one 1D array. We decided to change this. Actually I think that 1D array scale better with different kind of input devices just because it is a plain 1D. > > If you have multiple input deviced, the mapping should be done by a > conversion component. There could be no generic rule how to apply > RawCommands to something else. > > You joystick-driver should output the values from the Joysticks as they > are. The mapping for your rover's should be done in a specialized component. Therefore the especialized component should compute e.g.: 2D commands from a common RawCommand. From my point of view the RawCommand should be generic and therefore raw (plain). Unless there is a way of asking to the Linux api: number of sub-joysticks to create this 2D array. I still don't see it.
Javier. > > So no i'm against a change here. > > Best, > Matthias > > On 08.04.2014 14:32, Javier Hidalgo Carrió wrote: >> Hi rocks! >> >> Is there any particular reason why the axisValue is a 2D array? >> >> /* Index 1: num-of input axis, //index 2: dimensions of this axis >> * If you have an gamepand which has 2 2Dknops you have an [2][2] >> * size'd array for an 3D Mouse you could have [1][6] >> */ >> std::vector<std::vector<double> > axisValue; >> >> Why not to create a plain std::vector<double> instead? >> >> I am controlling with a joystick the ESA rover and there are several >> types of joysticks. They do not all have 4 axis in the main/principal >> joystick. >> Therefore, I do not see the benefit of having a std::vector inside >> another std::vector. >> My suggestion is to change it to a plain (1D array) std::vector and use >> the first 4 axis as it is now but without a 2D structure. >> >> Javier. >> >> >> _______________________________________________ >> Rock-dev mailing list >> [email protected] >> http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev _______________________________________________ Rock-dev mailing list [email protected] http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev
