[PATCH] libdivecomputer - custom implementation for serial communication

Claudiu Olteanu olteanu.vasilica.claudiu at gmail.com
Fri Jun 26 13:29:41 PDT 2015


>
> One way to do this would be to copy Jef's copyright line and add yours
> below:
>
>  * Copyright (C) 2008 Jef Driesen
>  * Copyright (C) 2015 Claudiu Olteanu
>

Thanks for the information. Now it is more clear for me.


> > I think that I should remove the fd, timeout and context fields and
> > to add a serial_t *port member
>
> See what I wrote above. I'm fine with other. I seem to remember that Jef
> in general prefers the structures with common parts in front that can
> simply be passed around and then work as expected...
>

This is good to know. I believe that it would be easier to use a pointer to
a *serial_t* structure since all the functions expect to receive a pointer.
In the old implementation, all structures which are used to represent
a device contain a member which is a pointer to a *serial_t* structure.
Therefore I believe that this is more in line with the old design.


> > > This feels like it should have been squashed into the first patch...
> >
> > Yes, you are right. I forgot to add it in the beginning.
>
> As a general rule I do NOT enforce this. I am MUCH happier when people do
> small patches and commit often. But since you were reworking the patches
> anyway (and will be reworking them to address the data structure issues)
> it would be nice to turn commits that clearly are nothing but fixups into
> just that (git even has the cool "--fixup" feature in newer versions...


I didn't know about the --fixup feature. I will take it into consideration
on the
future, when I will create my final patches. Also I intend to submit new
ones,
which doesn't contain fixup commits.



> Right now I can't merge this into the Subsurface-testing branch because
> most of our testers have USB (or more correctly, serial) based devices.
> But once this becomes transparent I can add this and we can get much more
> testing.


I totally understand that. I created the patches only to receive some
feedback
from you and to decide on the architecture.

Claudiu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150626/badd0ad3/attachment.html>


More information about the subsurface mailing list