<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Dec 18, 2014 at 11:50 AM, Anton Lundin <span dir="ltr"><<a href="mailto:glance@acc.umu.se" target="_blank">glance@acc.umu.se</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 18 December, 2014 - <a href="mailto:john@vanostrand.com">john@vanostrand.com</a> wrote:<br>
<br>
> Is there any existing work done on an API for presenting and changing settings<br>
> to applications?<br>
><br>
<br>
</span>I implemented support for changing settings in OSTC, OSTC3 and Suunto<br>
Vyper family devices in Subsurface.<br>
<br>
The api that libdivecomputer provides for doing this is really low<br>
level, and you need to do quite a bit of work on the application side.<br>
<br>
In subsurface we doesn't really abstract things into something common<br>
for all devices, because the settings and capabilities of the devices<br>
have such wide differences so it doesn't really make sense. Eg. you need<br>
a separate UI for each device to accurately represent its capabilities.<br>
<span class="HOEnZb"><font color="#888888"></font></span></blockquote><div><br></div><div>I'm working on the configuration of Cochran computers and it has 44 configurable parameters, not including text fields for owner information.<br><br></div><div>I can see why a custom UI interface has its advantages but I don't see why it can't be generalized to fit all devices.<br><br>What I was thinking of was a structure for each setting that defines the setting. It would include a field label, data type, edit parameters (a range, value list, or size restriction), a description (for help), a grouping (for tabs), a dependency specification. Some of the tricky bits could be function calls, like edit, or dependency.<br><br></div><div>With that kind of structure can't a UI be built on the fly to handle input?<br><br>--</div></div><div class="gmail_signature"><div dir="ltr"><div>John Van Ostrand<br></div><div>At large on sabbatical<br></div><br></div></div>
</div></div>