Comments (3)
You must set the failsafe positions in the source code, did you do that?
https://github.com/CapnBry/CRServoF/blob/master/src/main.cpp#L14
Replace fsaHold, fsaHold, fsaHold, fsaNoPulses
with the us failsafe values (e.g. 1500). The code is an example so it is set to show what options are available. If you want them to go to fixed values, just set them and re-upload the firmware.
from crservof.
收到您的回复我非常高兴!我测试了三次;
第一次测试“constexpr int OUTPUT_FAILSAFE[NUM_OUTPUTS] = {1500, 1500, 988, 1500, 998, 998, fsaHold, fsaNoPulses };”
故障时CH5,CH6 输出为保持当前状态,没有输出PWM(998),CH14)输出了我设定的PWM值。4,CH7~8)输出了我设定的PWM值,所以我认为故障时CH5,CH6不能执行自定义值 ,向您求功。
第二次测试 ”constexpr int OUTPUT_FAILSAFE[NUM_OUTPUTS] = {1500, 1500, 1400, 1500, fsaHold, fsaHold,998, 998 };“
故障时CH1
第三次测试 “constexpr int OUTPUT_FAILSAFE[NUM_OUTPUTS] = {1500, 1500, 988, 1500, 998, 998,998, 998 };”
故障时所有通道都输出了自定义的PWM值,功能完全正常测试成功,非常感谢您的创作!
I am very happy to receive your reply! I tested it three times; First test "constexpr int OUTPUT _ FAILSAFE [NUM _ OUTPUTS] = { 1500, 1500, 988, 1500, 998, 998, fsaHold, fsaNoPulses };" In case of fault, the output of CH5 and CH6 is to maintain the current state, and no PWM (998) is output, and the PWM value set by me is output by CH1 ~ 4). The second test "constexpr int OUTPUT _ FAILSAFE [NUM _ OUTPUTS] = { 1500, 1500, 1400, 1500, fsaHold, fsaHold, 998, 998 };" In case of failure, CH1 ~ 4, CH7 ~ 8) output the PWM value I set, so I think that CH5 and CH6 cannot execute the custom value in case of failure, and I ask you for work. The third test "constexpr int OUTPUT _ FAILSAFE [NUM _ OUTPUTS] = { 1500, 1500, 988, 1500, 998, 998, 998 };" In case of failure, all channels output the custom PWM value. The function is completely normal and the test is successful. Thank you very much for your creation.
https://github.com/CapnBry/CRServoF/blob/master/src/main.cpp#L210
"else if (millis() - lastData > 3000) " 3000ms changed to 300ms
from crservof.
It doesn't make any sense though, the code treats all the servos the same so there's no reason if CH5 and CH6 operate normally, then they should go to failsafe as the rest do. I don't have a receiver hooked to my CRServoF any more so it seems like a lot of work for me to confirm this. I've checked the code and it is so simple I can't imagine it is going wrong.
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
- 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
- How to add support for flightMode? HOT 1
- 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.