Documentation for source code


#1

Hi,

I’m looking for a explanation of the source code of the openrov arduino code.
I was looking on the wiki repos but I can’t let it works.
Where can I find a doc about how the code works ?

Regards,

COMTE Nicolas


#2

Currently, documentation for the Arduino firmware is rather sparse. As an initial resource, there is the readme in the git repository:

https://github.com/OpenROV/openrov-software-arduino/tree/master/OpenROV

This only provides a little bit of information, however, and without reading and working through most of the source piece by piece, it will still be hard to understand what is going on. In an attempt to address this problem, I have been working on a complete refactor of the firmware source to make it easier to understand and reason about, as well as extend and modify. This will also include some new documentation to explain the various sections and how to work within them. I hope to have an experimental version of that pushed to my git account this weekend.

Cheers,
Charles


#3

Hi, thanks for the answer !

Can you give me you github please ?
I saw that even if i read the source code it’s a little bit tricky to understand what’s happening.
I’ll have to work on the source code for my work (we use the OpenROV as a prototype) so I have to understand what’s happening into it. Thank you so much for the help if you can push on your wiki some new doc !!

Have a nice weekend,

RoToR


#4

Here is a link to my fork that I’ve been working on. I’m working on a comprehensive developer’s guide that breaks down the firmware in its entirety, which I expected to complete a draft of today, but due to travel will probably be Tuesday. Until then, poke around in this code and see if it makes more sense to you. Start at OpenROV.ino and work your way through each of the Manager namespaces. Much of it will be similar to the old source code, just restructured.

Note: This code is not thoroughly tested or an official release of any kind, so I wouldn’t recommend deploying it to your bot yet. I’ll ping this thread when I create a new thread with details on documentation.

Cheers,
Charles


#5

Thanks for the share !

I still not understand everything but it’s a good start :smile:
I have some questions like why in the setup() you call some initialize method instead that are sometimes empty instead of putting the code into the class’s constructor ?
If I well understand the overall operation:

  • the web panel send an instruction (for example full throttle) to the beaglebone via the RJ-45
  • the beaglebone (that contain the web server) get the command and send full throttle to the arduino
  • then the arduino do:
    • reset the timer (why ? Don’t understand well what is the work of the watchdog timer)
    • check if a command is coming from the beaglebone and get it if so
    • and it’s here i’m lost: what do HandleMessage and what is his args ?
    • and HandlModuleUpdate send back datas that are printed on the control screen (the pc with website)

Thanks a lot guy for the help;

Stay safe,

RoToR