Context
Related Issues / PRs: (To do: list all related issues)
The daisy chain software is very different for the FBC and AMDS boards. There are many points in the code where the FBC and AMDS require slightly different versions of the same software to do the same thing.
The root of this issue is caused by the different hardware layouts of each board. The daisy chain inputs for the FBC and AMDS are not the same, causing most of the UART code to be duplicated. The code for sampling sensors is also duplicated, as the FBC has a different sensor count.
This duplicated code makes it very difficult to test changes, as they must be made to both versions of the project, and then tested on both pieces of hardware.
Approach
The code or hardware should be refactored such that there is none or very little board specific code.
From the hardware side, if the FBC used the same UART lines as the AMDS then there would be no need to duplicate code.
From the software side, if the board specific code was used to change a couple variables indicating which uart/interrupt lines to use, then there would be no need to duplicate code.
Context
Related Issues / PRs: (To do: list all related issues)
The daisy chain software is very different for the FBC and AMDS boards. There are many points in the code where the FBC and AMDS require slightly different versions of the same software to do the same thing.
The root of this issue is caused by the different hardware layouts of each board. The daisy chain inputs for the FBC and AMDS are not the same, causing most of the UART code to be duplicated. The code for sampling sensors is also duplicated, as the FBC has a different sensor count.
This duplicated code makes it very difficult to test changes, as they must be made to both versions of the project, and then tested on both pieces of hardware.
Approach
The code or hardware should be refactored such that there is none or very little board specific code.
From the hardware side, if the FBC used the same UART lines as the AMDS then there would be no need to duplicate code.
From the software side, if the board specific code was used to change a couple variables indicating which uart/interrupt lines to use, then there would be no need to duplicate code.