paparazzi/paparazzi — Issue #79: pimp the "settings protocol" to allow compound variables and fractions
Author: flixr
Created: 2011-11-02 22:23:07+00:00
State: open

Two things that can probably be addressed in one go:

* setting of fractions
* atomic setting of "compound" variables like a quaternion

From IM discussion:
Antoine: We're using rational fractions all over the place and in particular in the sensor scaling code - we have code in the code generation to make them from floating point numbers and buffer size.
One thing that is missing for those fractions is the ability to change them with "settings" as settings only transmits floating point numbers (and we probably don't want to run the fraction generation code onboard - or ?). I was thinking that it might be a nice thing to enhance the "settings" protocol ( and tools) to allow sending a fraction.
(just a macro that does X = lX+(1-l)X where l is a fraction and X a vector)

Antoine Drouin: for the protocol change, I think we need either an additional settings_frac message with two fields or make the current message more complicated - maybe using arrays. We don't really have another option with the current xml to describe polymorphic messages
Antoine Drouin: so maybe the additional message is nicer
Antoine Drouin: it might be nicer too for backward compatibility

Antoine Drouin: using array is attracting though.... when you think about future - it would give the ability to change a group of variables atomicaly - which we can't do at the moment and is a pain
Antoine Drouin: like for example for setting an attitude
Antoine Drouin: you can't set a quaternion atomicaly

```

```

add the type="fraction" and buf_len="16" in the settings.xml files
and type="quaternion"