Skip to content
This repository was archived by the owner on Nov 18, 2024. It is now read-only.

NHS-Sailbot/OUTDATED_2024_SailbotSailcode

Repository files navigation

SailbotSailcode

This project is aimed at developing software for controlling an autonomous sailing robot. The goal of this project is to create a reliable and efficient system for navigating and controlling the sailbot's movements, while remaining expandable and maintainable.

Table of Contents

Introduction

This is a ground up rewrite of all the prior sailbot software. The previous software was written in the Arduino IDE and was not maintainable. This project is aimed at creating a maintainable and expandable codebase for the sailbot. The code is written in C++ and uses the PlatformIO development environment.

The key feature of the sailbot software is maintainable for future developers. The code is written in a modular fashion, with each module being responsible for a specific task. This allows for easy debugging and testing of the code. The code is also well documented, with comments explaining the purpose of each function and class. This documentation does go farther than typical code documentation and explains some of the more complex c++ syntax and concepts.

It should stand resilient electronic changes, allowing for us to change out electronic libraries and hardware without having to rewrite the entire codebase.

Setting up the Development Environment

The development environment is set up using the PlatformIO development environment. This is a plugin for the Visual Studio Code IDE. The development environment is set up using the following steps:

  • Install Visual Studio Code
  • Open this folder in Visual Studio Code
  • Install all recommended extensions
  • Log into github within the source control tab
  • Log into github within the Copilot tab, you as a student get github copilot for free: Github Education. Copilot is a very useful tool for writing code and since I am betting you don't know how to write c++ code, it will be very useful. I do hesitate to recommend it though, as it is a crutch, and you should learn to write code on your own. It is incredibly useful if you don't understand something within the code, as you can use the command control+I to open up a chat window to ask questions about the code, and get somewhat reliable answers. You should always check the code that it writes for you, as it is not always correct.
  • Everything should be set up and ready to go for development.
  • If you want to build and upload the code click on the Platformio tab and click the build or upload buttons under project tasks.

Where to Start Developing

  • Check the main.cpp file and read the comments.
  • Utilize the features of Visual Studio Code to navigate the codebase. If you right click on a function or class and click go to definition, it will take you to the definition of that function or class. This is very useful for navigating the codebase.

Version Control and Collaboration

We utilize git for version control and github for collaboration. The code is hosted on github and is open source. This allows for easy collaboration and version control. Git and in turn github are integrated within VSCode, so you can use the source control tab to commit and push changes to the repository. For collaboration there is a visual studio code extension called live share that allows for real time collaboration on the codebase. This is useful for pair programming and debugging. This extension is installed by default in the recommend extensions for this vs code workplace.

Long Term Maintenance

Sometime in the future none of the extensions that we use will be supported anymore. In the case that this happens simply shift the codebase to a newer platform and make the necessary migration changes. This also goes for electronic platforms.

Installation on boat computer

Shell scripts will be written to automate the installation process. This will include installing the necessary dependencies and setting up the development environment. The installation process will be documented here.

Usage

To be filled in later.

About

Maintainable, flexible, and extensible code for sailbot boats.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published