OSTC4 source code ?

The big one
Post Reply
Shadock
Posts: 3
Joined: Tuesday 30. July 2013, 14:34

OSTC4 source code ?

Post by Shadock »

Hi !

I was wondering where the ostc 4 source code is.
On the web page, the ostc 4 seems to run hwOS, but in bitbucket, I can not find reference of the ostc 4 new capabilities in the hwOS code. Even the commits and version numbers does not match.

The 2 other repos are for the old ostc 2 and the older DR5.

Perhaps i'm missing something ?

Thanks,
Regards,
Tom.
glance
Posts: 51
Joined: Thursday 6. March 2014, 10:00

Re: OSTC4 source code ?

Post by glance »

I would love to see the code for the OSTC4 too.

//Anton
heinrichsweikamp
Posts: 4376
Joined: Sunday 13. May 2007, 18:07

Re: OSTC4 source code ?

Post by heinrichsweikamp »

Dear Tom and Anton,

at the moment we will not upload the source for hwOS4 to bitbucket. Our experience tells that there won't be many people who actively get involved in programming the new hwOS4. If you are interested in special parts of the code or want to understand some part in detail please contact us directly via e-mail.

regards,
Christian
aquarat
Posts: 24
Joined: Sunday 12. June 2016, 11:18

Re: OSTC4 source code ?

Post by aquarat »

Is the OSTC 4's source code written in a similar way to the OSTC 2's source; mostly ASM with some C (deco_p2.c), limited used of local variables in favour of global variables, no input variables on functions and no returned variables in favour of global variables, highly procedural/not object oriented ?

If someone bought the OSTC 4 and signed an NDA, would you be willing to give them access to the complete source code/repository ?

It is ironic that most of your products, despite their names, aren't actually open source ;), but at least you support Subsurface.

Thanks
OSTC 3 # 4897
OSTC Sport #12887
OSTC Sport #13246
heinrichsweikamp
Posts: 4376
Joined: Sunday 13. May 2007, 18:07

Re: OSTC4 source code ?

Post by heinrichsweikamp »

Dear Aquarat.

The OSTC4 is C code, with a strong emphasis on the interfaces between the functions. Global variables are avoided whenever possible. It is an easy to split and portable code build on many new ideas we have built over the years.

The OSTC4 and OSTC sport are the only dive computers that are not open source. Both only as we haven't found a better way to handle the situation to be on a business market and, as a second important fact, for the effort to offer a good support for open source.

Hopefully we can change this in the future. In the meantime don't hesitate to contact us directly if any questions about the code arise.

kind regards,
Christian
tanomogi
Posts: 51
Joined: Friday 6. May 2016, 09:51

Re: OSTC4 source code ?

Post by tanomogi »

If I understood correctly about OSTC Sport, OSTC4.
'NO OPEN' == 'YOU DON'T NEED TO KNOW ABOUT INTERNAL'???
I choosed OSTC4, because it will be more transparent/predictable(open source).

Afraid about piracy problem like mk2?...
yeah... Maybe some others copy&paste OSTC's codes to their products. It's risky.

but I don't want my OSTC4 going un-predictable dive-computers.

Anyway, its hard to decision 'better feed-back or keep copyrights' - Hamlet
glance
Posts: 51
Joined: Thursday 6. March 2014, 10:00

Re: OSTC4 source code ?

Post by glance »

Just some feedback on the contributions to the code that you have published.

I read all of the code that lands in the hwos_code and ostc2_code repositories. I haven't contributed any real code and probably never will, but I have given my feedback on multiple ocation's over email, and also reported bugs and asked questions about indented behavior when i couldn't figure it out on my own.

When I wrote the ostc2 and ostc3 code for subsurface the source was a invaluable asset. Having access to the documentation is good, but also having access to the source is great.


I have tried to setup a local development enviorment for the ostc3, but the only time i actually managed to get MPLAB X to actually build a binary the output didn't look anything close to the HW built firmware (yes, the real code, not the scrambled .hex content). I didn't want to brick my €700+ dive computer so I didn't dare to flash it. Most other tries I haven't gotten MPLAB X to even work or even install.

One of the big upsides with the ostc2's and ostc3's have for me always bin having access to the source code. I'm not fluent in pic assembly but I have no problem getting the big picture of whats going on and when there is some detail it isn't that hard to use the instruction set documentation to figure it out.


What I mean to say is that the barrier to entry is really high. I don't program Pic's for a living, but i have written software for them and I do other sorts of software development for a living. Expecting a big number of contributions to the code from the community is probably expecting too much.


//Anton
aquarat
Posts: 24
Joined: Sunday 12. June 2016, 11:18

Re: OSTC4 source code ?

Post by aquarat »

I recently visited DeepStop in Germany (and bought an OSTC 3). I got a chance to play with an OSTC 4... It's big, but really awesome. Clarity of the display was incredible, very responsive.

Does the code running on the OSTC 4 run "baremetal" or does it run on top of an operating system ? Does the OSTC 4 run on an ARM CPU ?

Thanks
OSTC 3 # 4897
OSTC Sport #12887
OSTC Sport #13246
heinrichsweikamp
Posts: 4376
Joined: Sunday 13. May 2007, 18:07

Re: OSTC4 source code ?

Post by heinrichsweikamp »

Hi.
We did all the code ourself, except for some hardware drivers, including some small RTE to control which jobs are done next and handles interrupts. This way it is very responsive and tailor made for a diving computer. Hence much like our source codes available but much cleaner than the DR5 code.
regards,
Christian
Shadock
Posts: 3
Joined: Tuesday 30. July 2013, 14:34

Re: OSTC4 source code ?

Post by Shadock »

heinrichsweikamp Wrote:
-------------------------------------------------------
> The OSTC4 is C code, with a strong emphasis on the
> interfaces between the functions. Global variables
> are avoided whenever possible. It is an easy to
> split and portable code build on many new ideas we
> have built over the years.

That's good news for the code quality, but it's unfortunately even more sad to close source that specific code.

I understand very well the difficulty to make a full open source company running, but i thought you found the good balance (because you're also a hardware company and a very good one; Not everyone can duplicate the experience and capacities (and perhaps more important: reputation and quality of customer service) of the hardware you produce.
So even if some evil company wanted to clone your code into a product, i'm not sure who will want or who will take the risk to buy it.

Nevertheless, I'll send you an email to explain why i posted this question last year.

Regards,
Thomas.
aquarat
Posts: 24
Joined: Sunday 12. June 2016, 11:18

Re: OSTC4 source code ?

Post by aquarat »

I noticed recently that the OSTC4 source code is now available for download. Is this intentional ?
OSTC 3 # 4897
OSTC Sport #12887
OSTC Sport #13246
heinrichsweikamp
Posts: 4376
Joined: Sunday 13. May 2007, 18:07

Re: OSTC4 source code ?

Post by heinrichsweikamp »

aquarat Wrote:
-------------------------------------------------------
> I noticed recently that the OSTC4 source code is
> now available for download. Is this intentional ?

Yes. It's online since mid-last year at https://bitbucket.org/heinrichsweikamp/ostc4/wiki/Home

We have published everything including the bootloader code. Have fun :-)

Matthias
Post Reply