Comments (1)
Your flightMode is 1 byte according to your code there, and CRSF defines it as a string. You probably want something like this:
void sendFlightMode(const char *flightMode)
{
uint8_t len = min(strlen(flightMode), 15); // limit to 15 chars max
uint8_t buf[16];
buf[0] = len;
memcpy(&buf[1], flightMode, len);
crsf.queuePacket(CRSF_SYNC_BYTE, CRSF_FRAMETYPE_FLIGHT_MODE, buf, len+1);
}
//usage:
sendFlightMode("ACRO");
from crservof.
Related Issues (20)
- Can this code working on arduino? HOT 4
- Can this code used to convert pwm to the elrs TX HOT 1
- i want use for teensy 4.0 HOT 7
- My proto not running HOT 3
- Add SBUS output feature HOT 1
- SBUS output HOT 4
- Failsafe HOT 3
- Adapting to Pro Micro without "#include <functional>" HOT 2
- add PPM output option HOT 1
- CRSF frame sanity check incorrect. HOT 1
- Porting serial passthrough to CRSFJoystick - Stuck on timeout HOT 19
- Does not work with SoftwareSerial on atmega328 HOT 13
- Suggestion: Armed state LED indicator
- Servo.h and Servo.cpp HOT 1
- CrsfSerialStream undefined HOT 12
- Adding ESP32 S2 support target hw: lolin_S2_mini HOT 8
- Adding Failsafe Adjustment HOT 3
- Use CrsfSerial with Arduino RP2040 Connect HOT 4
- Use STM32 as a receiver. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crservof.