v0.4.0
版本发布时间: 2023-08-08 11:36:24
ZZ-Cat/CRSFforArduino最新发布版本:v1.0.4(2024-08-30 07:08:15)
Overview
It has been a while since my last MINOR
cut of CRSF for Arduino.
I told you all I would be on hiatus by the start of August. Yet... here I am. I am too much of a 'work-a-holic' to stay away from my project. So, enjoy August's release. =^/.~=
As always, there is a discussion thread open for this release. So, download this, flash it, test it, submit your feedback etc.
PS: I need to remember to roll these things out more regularly.
What's New
- feat(devboard): Add support for Seeed Studio XIAO SAMD21 (https://github.com/ZZ-Cat/CRSFforArduino/pull/27)
- feat(telemetry): Add GPS Telemetry (https://github.com/ZZ-Cat/CRSFforArduino/pull/18)
What's Changed
- refactor(rc channels): Use packed RC channels (https://github.com/ZZ-Cat/CRSFforArduino/pull/30)
- refactor(library): Split CRSF for Arduino up into abstraction layers (https://github.com/ZZ-Cat/CRSFforArduino/pull/34)
- refactor(crsf): Performance & reliability improvements (https://github.com/ZZ-Cat/CRSFforArduino/pull/32)
API Changes
There are some slight changes to the API & these changes are as follows:
-
CRSFforArduino(HardwareSerial *)
constructor is deprecated & has been removed from the API.- Use
CRSFforArduino()
as your default constructor from here on out.
- Use
-
CRSFforArduino::begin()
returns abool
value - IE This function returnstrue
if CRSF for Arduino is initialised successfully orfalse
if it hasn't. - The return data type for
CRSFforArduino::update()
isvoid
.- This means you no longer need to read back the return value from this function, to check whether-or-not valid RC channel data was received. Everything is now handled internally.
- Simply call
CRSFforArduino::update()
in yourloop()
as a standalone function.
- Reading back RC channels like this:
crsf.rcToUs(crsf.getChannel(1))
is now deprecated.- To read an RC channel value, use
CRSFforArduino::readRcChannel(n)
. Wheren
is the channel number from 1 to 16. This function returns the channel value in microseconds, by default. - If you want to read the raw channel value,
CRSFforArduino::readRcChannel()
takes an optionalbool
argument. Set this totrue
to get the raw value. For examplecrsf.readRcChannel(1, true)
will give you the raw value of channel 1.
- To read an RC channel value, use
- To send GPS telemetry, use
CRSFforArduino::telemetryWriteGPS()
.- This takes six arguments. Five of which are
float
& the sixth argument isuint8_t
. - These arguments are:
-
latitude
(in decimal degrees) -
longitude
(in decimal degrees) -
altitude
(in centimetres) -
speed
(in centimetres per second) -
groundCourse
(in degrees) -
satellites
(the number of satellites that are in view of your GPS module)
-
- This takes six arguments. Five of which are
Full Changelog: https://github.com/ZZ-Cat/CRSFforArduino/compare/v0.3.3...v0.4.0
Semantic Versioning
All releases of CRSF for Arduino follow the Semantic Versioning Guidelines. This means "Major.Minor.Patch". Major = New features that are incompatible with previous iterations. Minor = New features &/or hardware support that retains compatibility with the current Major release. Patch = Bug fixes.
This also means that Major version 0.x.x is experimental software, where a lot of features are either still missing or are unstable. You are advised to use this Major version with caution. Your feedback is always welcome. If you spot any bugs, don't hesitate to open an issue. For general comments & questions, please use the discussions section.