Skip to content

Trim tab integration#41

Merged
georgesleen merged 20 commits intowingsail-controller-AISfrom
trim-tab-integration
Feb 21, 2026
Merged

Trim tab integration#41
georgesleen merged 20 commits intowingsail-controller-AISfrom
trim-tab-integration

Conversation

@georgesleen
Copy link
Contributor

Integrate the updated CANSERVO library in PR #39 so that it works with the rest of the code.

@georgesleen
Copy link
Contributor Author

Moved added libraries in #39 to firmware/drv-modules/can-servo/, and added can-servo/ to be included in the build for the wingsail-controller target.

* can.h first commit

Should work? unless I overlooked something or tested it wrong

Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>

* can.c first commit

Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>

* Documentation of can.c

Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>

* Documented can.h

Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>

* Documentation complete can.c

Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>

* fixed frame range

Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>

* filter works...too much

- receives out of range IDs

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* CANFD project file

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* Update can.c

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* Update can.h

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* fixed parsing in test_canfd.c

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* Updated can.c with CAN_Receive and fixed definition error

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* Updated can.h

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* FDCAN_Serial_Testing Zip CUBEIDE project file

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* com-modules update

* removed files

* Moved can files (#37): accepted CAN files move to CANFD dir, removed from base-library dir

* updated README on flle usage + cleanup

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* changed CAN_Receive to use a CAN_Frame rx pointer

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* correct CAN_Receive function signature

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* fdcan-library-test now has the project to test

* fdcan-library-test is now a project

---------

Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>
Co-authored-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>
Co-authored-by: alisha1697 <alishashahid6704@gmail.com>
Co-authored-by: Michael Greenough <43833591+MichaelGreenough@users.noreply.github.com>
@georgesleen georgesleen changed the base branch from CAN_SERVO to wingsail-controller-AIS February 21, 2026 21:42
@georgesleen georgesleen merged commit 90d147b into wingsail-controller-AIS Feb 21, 2026
@georgesleen georgesleen deleted the trim-tab-integration branch February 21, 2026 21:43
@georgesleen georgesleen restored the trim-tab-integration branch February 21, 2026 23:29
georgesleen added a commit that referenced this pull request Feb 24, 2026
…Module Hardware (#38)

* Update .ioc definition for UART2 DMA

* Change NMEA handle to take the UART2 handle

* Update launch file for flashing to mcu

* Test initialization of UART2 with DMA

* Update clangd compile commands to hopefully link with drv-modules

* Move .clangd to be visible for all firmware

* Update UART2 interrupt scheme to match on character

* Try to link .c files with .h files using clangd lsp

* Update compile_commands.json so that clangd can find source files

* Get rid of redundant DMA activation in main

* Transmission from AD3 to Nucleo working (sort of...)

* Start reading NMEA0183 messages in main

* Update nmea0183 read logic to overwrite oldest data in buffer rather than hard fault

* Some print debugging

* Update ioc definition for actual sense module

* Write more information for a bad message

* Create a new WIND_SENSOR source file for handling the wind sensor

* Create a WIND_SENSOR type

* Remove custom implementation of stdbool.h

* Print out whole message when recieving

* Update character matching and error clearing for robust NMEA0183 message parsing

* Object management function prototypes

* Update for proper clangd linting

* Add some very simple unit testing for nmea messages

* Update documentation

* Update documentation

* Update gitignore

* Add a simple make helper for running unit tests

* Define interface for wind sensor

* Update AGENTS.md to reflect intended comment style

* Implement the stuff?

* Add unit tests for wind sensor

* Update unit test structure

* Update makefile to include clean target

* Factor out more common functionality

* Add a nice little print helper

* Ignore machine specific development artifacts

* Add some testing for the print functions while I don't have access

* Update makefile so I can regenerate my config easiy

* Remove build artifact

* Add unit testing for the AIS transponder

* Merge conflicts resolved?

* Update to always print whether the data is valid or not

* Remove AGENTS.md from history

* Only print valid updates to wind sensor data

* Add a little helper script to generate valid NMEA0183 messages

* Update to check for message type and for temperature messages

* Compare strings properly

* Fix comparing message types

* Update makefile and start work on canfd communication

* Do a stupid cubeide thing :((((((

* Write CAN transmission code for the wind sensor

* Add unit testing

* Update constant names to be clearer

* CAN loopback test

* Debug bad can message sending

* Simple loopback test for windsail can messages

* Naive implementation of transmitting AIS can messages

* Add unit tests

* Add a function to transmit all recienved ships over CAN

* Update unit tests

* Update unit testing

* Fix compilation error

* Simple AIS loopback test

* Update test to include more fields

* Add a GPS driver

* Update wind sensor to have a non-consuming pattern

* Add a bunch of unit testing

* Create a simple little scheduler to manage all the nmea stuff

* Write simple test for multi-drop nmea0183 bus

* Format files

* Fix unit tests

* Some unit testing

* Match pinout of breakout board

* Turn wind sensor gate on

* Implement requirement to send empty ship frame if no ships. Also fix some bugs in parsing

* Fix name collision

* Unit testing update

* Fix some parsing logic

* Remove debug statements from firmware to diagnose issue (hardware issue)

* Add AIS/GPS/wind parsing and CAN scheduling to wingsail-controller (#40)

* Update makefile and start work on canfd communication

* Do a stupid cubeide thing :((((((

* Write CAN transmission code for the wind sensor

* Add unit testing

* Update constant names to be clearer

* CAN loopback test

* Debug bad can message sending

* Simple loopback test for windsail can messages

* Naive implementation of transmitting AIS can messages

* Add unit tests

* Add a function to transmit all recienved ships over CAN

* Update unit tests

* Update unit testing

* Fix compilation error

* Simple AIS loopback test

* Update test to include more fields

* Add a GPS driver

* Update wind sensor to have a non-consuming pattern

* Add a bunch of unit testing

* Create a simple little scheduler to manage all the nmea stuff

* Write simple test for multi-drop nmea0183 bus

* Format files

* Fix unit tests

* Some unit testing

* Match pinout of breakout board

* Turn wind sensor gate on

* Implement requirement to send empty ship frame if no ships. Also fix some bugs in parsing

* Fix name collision

* Unit testing update

* Fix some parsing logic

* Remove debug statements from firmware to diagnose issue (hardware issue)

* Some more unit testing

* Tentative fix

* Update prescaler value so that can parameters match specs

* Update compile_commands.json make target

* Formatting fixes

* Write gate drivers high

* Update pinout for chopped board

* Power cycle stuff on reset

* Parse and log a bunch of messages from the GPS

* add a bunch of logging stuff

* Add lots of conditional printing

* Remove scheduler printing

* Trim tab integration (#41)

* Add files via upload

Initial commit for complete CAN Servo library

Signed-off-by: JoshuaO956 <148372526+JoshuaO956@users.noreply.github.com>

* Move into drv-modules

* Add some clamping logic for the servo

* Add can-servo to wingsail-controller target

* Stop rounding GPS data...

* Add a bunch of conditional logging

* Partial fix

* Vibe code some fixes hopefully

* moar logs

* Print debugging canservo

* Don't send invalid lat/lon messages

* Update .ioc for correct canspi settings

* update gpio to be correct...

* Enable the CS pin for the canservo

* Remove double macro definiton (via chat suggestion)

* Remove debug hello print

* Do a bit of logging

* Sail Controller CAN Library Update (#42)

* can.h first commit

Should work? unless I overlooked something or tested it wrong

Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>

* can.c first commit

Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>

* Documentation of can.c

Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>

* Documented can.h

Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>

* Documentation complete can.c

Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>

* fixed frame range

Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>

* filter works...too much

- receives out of range IDs

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* CANFD project file

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* Update can.c

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* Update can.h

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* fixed parsing in test_canfd.c

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* Updated can.c with CAN_Receive and fixed definition error

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* Updated can.h

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* FDCAN_Serial_Testing Zip CUBEIDE project file

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* com-modules update

* removed files

* Moved can files (#37): accepted CAN files move to CANFD dir, removed from base-library dir

* updated README on flle usage + cleanup

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* changed CAN_Receive to use a CAN_Frame rx pointer

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* correct CAN_Receive function signature

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>

* fdcan-library-test now has the project to test

* fdcan-library-test is now a project

---------

Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>
Co-authored-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>
Co-authored-by: alisha1697 <alishashahid6704@gmail.com>
Co-authored-by: Michael Greenough <43833591+MichaelGreenough@users.noreply.github.com>

---------

Signed-off-by: JoshuaO956 <148372526+JoshuaO956@users.noreply.github.com>
Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>
Co-authored-by: JoshuaO956 <148372526+JoshuaO956@users.noreply.github.com>
Co-authored-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>
Co-authored-by: alisha1697 <alishashahid6704@gmail.com>
Co-authored-by: Michael Greenough <43833591+MichaelGreenough@users.noreply.github.com>

* Fixed ROT, and TWOs compliment (#43)

* Update variables and constants related to ROT to use the new unsigned convention

---------

Signed-off-by: JoshuaO956 <148372526+JoshuaO956@users.noreply.github.com>
Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>
Co-authored-by: JoshuaO956 <148372526+JoshuaO956@users.noreply.github.com>
Co-authored-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>
Co-authored-by: alisha1697 <alishashahid6704@gmail.com>
Co-authored-by: Michael Greenough <43833591+MichaelGreenough@users.noreply.github.com>
@georgesleen georgesleen deleted the trim-tab-integration branch February 28, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants