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

feat(serial receiver interface): Auto-baud #75

Closed ZZ-Cat closed 9 months ago

ZZ-Cat commented 10 months ago

Overview

This will not make it into the upcoming Version 1.0.0 release.
This is simply an experiment that I want to mess around with. It is a first look at how an auto-baud might be integrated into CRSF for Arduino.

Details

During the initialisation phase, the Serial Receiver's initialiser starts up at a low baud rate, then iterates upwards until 7 valid frames out of 10 total frames are received.
Then, the auto-baus "locks" onto a particular baud-rate. Thus, allowing the rest of the initialiser to continue.

The current implementation comes with a catch:
Your controller (and by extension transmitter module) MUST be connected ot your receiver in order for the initialisation process to complete. Otherwise, if there is no valid connection (EG "Fail-safe" or your receiver is in Wi-Fi mode), CRSF for Arduino will fail to initialise.

I am not entirely sure on how much this will impact CRSF for Arduino's quality-of-life, here. So, I may leave this Pull Request for the time being, and leave it up for consideration to you guys.

Tell me what you think on this: Yay or nay?
I would like to hear your thoughts, comments, questions, love it/loathe it/hate it on this.

ZZ-Cat commented 9 months ago

I'm closing this, because I went down a rabbit hole with this Pull Request, and the benefits (if any) it brings to the table make about 🤏 that much of a difference. IE Not worth my while, in the grand scheme of things.