ZZ-Cat / CRSFforArduino

An Arduino Library for communicating with ExpressLRS and TBS Crossfire receivers.
GNU Affero General Public License v3.0
161 stars 27 forks source link

refactor(quality control): Use an isolated version of `CFA_Config.hpp` for Defect Detector environment. #117

Closed ZZ-Cat closed 7 months ago

ZZ-Cat commented 7 months ago

Overview

This is a quick follow-up to 5b5a8984bdca4f476e8904912e75b0883e4150a4.
Instead of the Defect Detector using CFA_Config.hpp, the defines in the configuration are declared in the build_flags section of the Defect Detector's environment.

Benefits

Any configurations made to CFA_Config.hpp no longer affects the outcome of my overall Quality Control.
This frees CFA_Config.hpp to be set to whichever way I want/need it to be to provide the best quality default configuration that most people will use.

It also means that I can run various combinations of configurations through my Defect Detector without affecting CFA_Config.hpp. Say, if I wanted to disable CRSF_RC_ENABLED but I wanted to leave CRSF_TELEMETRY_ENABLED turned on, I can do that without touching CFA_Config.hpp.

In other words...

This is mostly a quality-of-life thing from a developer's point-of-view.
The more modular CRSF for Arduino is, the easier it is to test key aspects in isolation, and (by extension) that means improving the overall quality of the code-base.