From 9618bd499e5ad26725ae2dfa19aee4bc890d2bd3 Mon Sep 17 00:00:00 2001 From: Jorand Date: Sat, 30 Mar 2019 15:16:00 +0100 Subject: [PATCH 1/2] add throttle control in cruising mode with UART --- receiver/receiver.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/receiver/receiver.ino b/receiver/receiver.ino index 01daddd..27c676d 100644 --- a/receiver/receiver.ino +++ b/receiver/receiver.ino @@ -424,7 +424,7 @@ void updateSetting( uint8_t setting, uint64_t value) } } -void setCruise ( bool cruise = true, uint16_t setPoint = defaultThrottle ){ +void setCruise ( bool cruise = true, uint16_t setPoint = defaultThrottle, uint16_t throttle = defaultThrottle ){ if( rxSettings.controlMode == 0 ){ setThrottle( setPoint ); @@ -451,7 +451,7 @@ void setCruise ( bool cruise = true, uint16_t setPoint = defaultThrottle ){ } else{ - UART.nunchuck.valueY = 127; + UART.nunchuck.valueY = map(throttle, 0, 1023, 0, 255); UART.setNunchuckValues(); } @@ -503,7 +503,7 @@ void speedControl( uint16_t throttle , bool trigger ) cruising = true; } - setCruise( true, cruiseThrottle ); + setCruise( true, cruiseThrottle, throttle ); }else{ cruising = false; From 7cca75bca6d0a783fab23eb5724bce0937142d8e Mon Sep 17 00:00:00 2001 From: Jorand Date: Sat, 2 Nov 2019 03:33:44 +0100 Subject: [PATCH 2/2] Update REDME start issue fix --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 4296fab..11f902e 100644 --- a/README.md +++ b/README.md @@ -24,3 +24,10 @@ Update 2.0 introduces quite a few new interesting features to the remote, and fi To-do: * UART throttle control * Introducing cruise control + +## Issues + +Randomly won't start, have to reset: +* Solder a 100uF capacitor in series with a 10K resistor from the reset pin to 3.3v and minus pin of the capacitor to GND. This [delays the setup of the Arduino](https://forum.arduino.cc/index.php?topic=256771.msg3893494#msg3893494), ensuring it doesn’t crash on startup. +[Like show on this image](https://forum.arduino.cc/index.php?action=dlattach;topic=256771.0;attach=276522;image). +