Skip to content

Commit

Permalink
v9.9.0 manch changes according to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDIYGuy999 committed Jun 25, 2022
1 parent b7d3434 commit 9fe4d74
Show file tree
Hide file tree
Showing 11 changed files with 428 additions and 55 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,15 @@ const uint8_t shakerStop = 60; // Shaker power while engine stop (max. 255, abou

## Changelog (newest on top):

### New in V 9.9.0:
- New NEOPIXEL_UNION_JACK animation for Land Rover ;-)
- New MAX_POWER_MILLIAMPS setting for Neopixels. This and other optimizations is eliminating the flickering Neopixels issue
- 3_adjustmentsESC.h: globalAccelerationPercentage allows to adjust the acceleration, if vehicle setting is not OK
- 4_adjustmentsTransmission.h: lowRangePercentage allows to adjust the acceleration in low transmission (off road) range. Used for MODE1_SHIFTING and WPL 2 speed transmission
- Channel failsafe changed
- 2_adjustmentsRemote.h: External SBUS library not required anymore. See option #define EMBEDDED_SBUS. "sbusInverted" moved to remote configuration profiles, so you don't have to change it anymore
- SBUS still unstable with Flysky remotes! Especially in combination with WIRELESS_TRAILER. Use IBUS in this case! I'm thankful for hints about this bug. Differences: Micro RC is sending an SBUS packet every 14ms, Flysky every 7ms

### New in V 9.8.0:
- Adjustable RECOVERY_HYSTERESIS for battery protection
- 8_adjustmentsSound.h (masterVolumeCrawlerThreshold) and 3_adjustmentsESC.h (crawlerEscRampTime): switchable crawler mode with just minimal inertia for gearbox protection. Allows to have a "show mode" and a "competition mode"
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/1_adjustmentsVehicle.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//#include "vehicles/ScaniaV8_50ton.h" // SCANIA V8 50 ton truck. Unknown model. Bad quality!
//#include "vehicles/ScaniaV8.h" // SCANIA V8 truck, unknown model
//#include "vehicles/1000HpScaniaV8.h" // 1000 HP SCANIA V8 truck with open pipes. Insane sound! Good bass speakers reqired
//#include "vehicles/Scania143.h" // SCANIA 143 V8 - the legend! The best sounding in my opinion
#include "vehicles/Scania143.h" // SCANIA 143 V8 - the legend! The best sounding in my opinion
//#include "vehicles/ScaniaV8Firetruck.h" // SCANIA V8 firetruck, automatic Allison 6 speed transmission with torque converter, "Martinshorn" siren
//#include "vehicles/VolvoFH16_750.h" // Volvo FH16 750 truck. Inline 6, 750 horses, open pipes!
//#include "vehicles/VolvoFH16_OpenPipe.h" // Volvo FH truck. Inline 6, open pipes, alternative version
Expand Down Expand Up @@ -84,7 +84,7 @@
// EU SUV --------
//#include "vehicles/DefenderV8Automatic.h" // Land Rover Defender 90 V8 automatic (very nice V8 with lots of bass)
//#include "vehicles/DefenderV8OpenPipeAutomatic.h" // Land Rover Defender 90 V8 automatic, open pipes (optimised for smaller speakers)
#include "vehicles/DefenderV8OpenPipe.h" // Land Rover Defender 90 V8 manual, open pipes (optimised for smaller speakers)
//#include "vehicles/DefenderV8OpenPipe.h" // Land Rover Defender 90 V8 manual, open pipes (optimised for smaller speakers)
//#include "vehicles/DefenderV8CrawlerAutomatic.h" // Land Rover Defender 90 V8 automatic crawler
//#include "vehicles/DefenderTd5.h" // Land Rover Defender 90 Td5 R5 Diesel

Expand Down
33 changes: 30 additions & 3 deletions src/2_adjustmentsRemote.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//#define RGT_EX86100 // <------- MT-305 remote delivered with RGT EX86100 crawler (use PWM communication setting)
//#define GRAUPNER_MZ_12 // <------- Graupner MZ-12 PRO
#define MICRO_RC // <------- The car style DIY "Micro RC" remote. Don't use this with standard remotes!
//#define MICRO_RC_STICK // <------- The stick based DIY "Micro RC" remote. Don't use this with standard remotes!
//#define MICRO_RC_STICK // <------- The stick based DIY "Micro RC" remote. Don't use this with standard remotes!

// For testing only!
//#define FLYSKY_FS_I6S_EXCAVATOR_TEST // <------- Flysky FS-i6s for KABOLITE K336 hydraulic excavator
Expand All @@ -23,9 +23,12 @@
// PWM mode active, if SBUS, IBUS, and PPM are disabled (// in front of #define)

// SBUS communication (RX header, 13 channels. This is my preferred communication protocol)--------
/* NOTE! SBUS is causing weird issues with Flysky remotes. Use IBUS instead! */
#define SBUS_COMMUNICATION // control signals are coming in via the SBUS interface (comment it out for classic PWM RC signals)
boolean sbusInverted = false; // false = wired to non standard (inverted) SBUS signal (for example from my "Micro RC" receiver)
// NOTE: "boolean sbusInverted = true / false" was moved to the remote configuration profiles, so you don't have to change it
uint32_t sbusBaud = 100000; // Standard is 100000. Try to lower it, if your channels are coming in unstable. Working range is about 96000 - 104000.
#define EMBEDDED_SBUS // SBUS library not used, if defined (It is working fine with MICRO_RC, but still unstable with Flysky remotes, use IBUS for them)
uint16_t sbusFailsafeTimeout = 100; // Failsafe is triggered after this timeout in milliseconds (about 100, was 50)

// IBUS communication (RX header, 13 channels not recommended, NO FAILSAFE, if bad contact in iBUS wiring!) --------
//#define IBUS_COMMUNICATION // control signals are coming in via the IBUS interface (comment it out for classic PWM RC signals)
Expand All @@ -38,7 +41,7 @@ uint32_t sbusBaud = 100000; // Standard is 100000. Try to lower it, if your chan

// CHANNEL LINEARITY SETTINGS ****************************************************************************************************************

#define EXPONENTIAL_THROTTLE // Exponential throttle curve. Ideal for enhanced slow speed control in crawlers
//#define EXPONENTIAL_THROTTLE // Exponential throttle curve. Ideal for enhanced slow speed control in crawlers
//#define EXPONENTIAL_STEERING // Exponential steering curve. More steering accuracy around center position

// CHANNEL AVERAGING (EXPERIMENTAL!) **********************************************************************************************************
Expand Down Expand Up @@ -145,6 +148,9 @@ const uint16_t pulseSpan = 480;
//#define AUTO_ENGINE_ON_OFF
//#define AUTO_INDICATORS

// SBUS mode ----
boolean sbusInverted = true; // true = standard (non inverted) SBUS signal

#endif

// Flysky FS-i6S remote configuration profile (for excavators only) ---------------------------------------------------------------------------------
Expand Down Expand Up @@ -213,6 +219,9 @@ const uint16_t pulseSpan = 480;
//#define AUTO_ENGINE_ON_OFF
//#define AUTO_INDICATORS

// SBUS mode ----
boolean sbusInverted = true; // true = standard (non inverted) SBUS signal

#endif

// Flysky FS-i6S remote configuration profile (for excavators only) ---------------------------------------------------------------------------------
Expand Down Expand Up @@ -281,6 +290,9 @@ const uint16_t pulseSpan = 480;
//#define AUTO_ENGINE_ON_OFF
//#define AUTO_INDICATORS

// SBUS mode ----
boolean sbusInverted = true; // true = standard (non inverted) SBUS signal

#endif

// Flysky GT5 / Reely GT6 EVO / Absima CR6P remote configuration profile (thanks to BlackbirdXL1 for making this profile)-----------------------
Expand Down Expand Up @@ -373,6 +385,9 @@ const uint16_t pulseSpan = 480;
//#define AUTO_ENGINE_ON_OFF
#define AUTO_INDICATORS

// SBUS mode ----
boolean sbusInverted = true; // true = standard (non inverted) SBUS signal

#endif

// RGT MT-305 configuration profile (comes with EX86100) -----------------------
Expand Down Expand Up @@ -460,6 +475,9 @@ const uint16_t pulseSpan = 500;
#define AUTO_ENGINE_ON_OFF
#define AUTO_INDICATORS

// SBUS mode ----
boolean sbusInverted = true; // true = standard (non inverted) SBUS signal

#endif

// Graupner mz-12 PRO remote configuration profile ---------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -526,6 +544,9 @@ const uint16_t pulseSpan = 480;
//#define AUTO_ENGINE_ON_OFF
#define AUTO_INDICATORS

// SBUS mode ----
boolean sbusInverted = true; // true = standard (non inverted) SBUS signal

#endif

// "Micro RC" (the car style one) DIY Arduino remote configuration profile -------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -592,6 +613,9 @@ const uint16_t pulseSpan = 480;
//#define AUTO_ENGINE_ON_OFF
#define AUTO_INDICATORS

// SBUS mode ----
boolean sbusInverted = false; // false = non standard (inverted) SBUS signal

#endif

// "Micro RC" (The stick based one) DIY Arduino remote configuration profile -------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -658,4 +682,7 @@ const uint16_t pulseSpan = 480;
//#define AUTO_ENGINE_ON_OFF
#define AUTO_INDICATORS

// SBUS mode ----
boolean sbusInverted = false; // false = non standard (inverted) SBUS signal

#endif
11 changes: 7 additions & 4 deletions src/3_adjustmentsESC.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ const uint16_t escReversePlus = 0;
const uint16_t brakeMargin = 0; // For RZ7886 motor driver and 370 motor = 10

// Crawler mode escRampTime (see "8_adjustmentsSound.h") WARNING: a very low setting may damage your transmission!
const uint8_t crawlerEscRampTime = 10; // about 10, less = more direct control = less virtual inertia
const uint8_t crawlerEscRampTime = 10; // about 10 (15 for Jeep), less = more direct control = less virtual inertia

// Allows to scale vehicle file dependent acceleration
uint16_t globalAccelerationPercentage = 100; // about 100 - 200% (200 for Jeep) Experimental, may cause automatic transmission shifting issues!

/* Battery low discharge protection (only for boards with voltage divider resistors):
* IMPORTANT: Enter used resistor values in Ohms (Ω) and THEN adjust DIODE_DROP, until your readings match the actual battery voltage! */
Expand All @@ -127,9 +130,9 @@ const float RECOVERY_HYSTERESIS = 0.2; // around 0.2 V
* When selecting resistors, always use two of the same magnitude: Like, for example, 10k/2k, 20k/4k or 100k/20k. NEVER exceed a ratio LOWER than (4:1 = 4)!
* WARNING: If the ratio is too LOW, like 10k/5k (2:1 = 2), the battery voltage will most likely DAMAGE the controller permanently!
* Example calculation: 2000 / (2000 + 10000) = 0.166 666 666 7; 7.4 V * 0.167 = 1.2358 V (of 3.3 V maximum on GPIO Pin). */
const uint16_t RESISTOR_TO_BATTTERY_PLUS = 10000; // Value in Ohms (Ω), for example 10000
const uint16_t RESISTOR_TO_GND = 2000; // Value in Ohms (Ω), for example 1000. Measuring exact resistor values before soldering, if possible is recommended!
const float DIODE_DROP = 0.34; // Fine adjust measured value and/or consider diode voltage drop (about 0.34V for SS34 diode)
uint16_t RESISTOR_TO_BATTTERY_PLUS = 10000; // Value in Ohms (Ω), for example 10000
uint16_t RESISTOR_TO_GND = 2000; // Value in Ohms (Ω), for example 2000. Measuring exact resistor values before soldering, if possible is recommended!
float DIODE_DROP = 0.34; // Fine adjust measured value and/or consider diode voltage drop (about 0.34V for SS34 diode)
/* It is recommended to add a sticker to your ESP32, which includes the 3 calibration values above */
volatile int outOfFuelVolumePercentage = 80; // Adjust the message volume in %
// Select the out of fuel message you want:
Expand Down
3 changes: 3 additions & 0 deletions src/4_adjustmentsTransmission.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
// In some cases we want a different reverse acceleration for automatic transmission vehicles.
uint16_t automaticReverseAccelerationPercentage = 100;

// Low range percentage is used for MODE1_SHIFTING (off road reducer)
uint16_t lowRangePercentage = 58;// WPL 2 speed ratios = 29:1, 17:1 = 58% in low range. You may want to change this for other 2 speed transmissions

// Transmission controls options ===========================================================================================================
// #define SEMI_AUTOMATIC This will simulate a semi automatic transmission. Shifting is not controlled by the 3 position switch in this mode!
//#define SEMI_AUTOMATIC // Works for VIRTUAL_3_SPEED or real 3 speed transmission. Don't select this @ the same time as VIRTUAL_16_SPEED_SEQUENTIAL
Expand Down
14 changes: 8 additions & 6 deletions src/6_adjustmentsLights.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <Arduino.h>

/* General LIGHTS SETTINGS ************************************************************************************************
/* General LIGHTS SETTINGS ***********************************************************************************************************************
*
* Most lights settings are done in the vehicle configuration files in the /vehicles/ directory.
*
Expand All @@ -10,12 +10,14 @@
//#define NEOPIXEL_ENABLED // GPIO0 used for WS2812 Neopixel control, if defined!
#define NEOPIXEL_COUNT 8 // How many Neopixels? 8 for Knight Rider, 3 for B33lz3bub
#define NEOPIXEL_BRIGHTNESS 127 // Brightness (255 is the maximum)
#define MAX_POWER_MILLIAMPS 100 // Maximum allowed current draw in mA (100 recommended, depending on your 5V supply)

// Choose the mode you want
// Choose the animation you want
//#define NEOPIXEL_DEMO // Demo
//#define NEOPIXEL_KNIGHT_RIDER // Knight Rider scanner animation for 8 LED (use it in combination with "kittScanner.h" "siren" sound in your vehicle file)
#define NEOPIXEL_BLUELIGHT // Bluelight animation for 8 LED
//#define NEOPIXEL_HIGHBEAM // Neopixel bar is used as high beam as well, if defined. Also usable in combination with NEOPIXEL_KNIGHT_RIDER & NEOPIXEL_BLUELIGHT
//#define NEOPIXEL_BLUELIGHT // Bluelight animation for 8 LED
#define NEOPIXEL_UNION_JACK // United Kingdom animation for 8 LED (use it in combination with "BritishNationalAnthemSiren.h" sound in your vehicle file)
#define NEOPIXEL_HIGHBEAM // Neopixel bar is used as high beam as well, if defined. Also usable in combination with NEOPIXEL_KNIGHT_RIDER & NEOPIXEL_BLUELIGHT
//#define NEOPIXEL_B33LZ3BUB // B33lz3bub Austria animation for 3 LED: https://www.rc-modellbau-portal.de/index.php?threads/baubericht-mercedes-actros-1851-gigaspace-tamiya.14349/page-3


Expand All @@ -33,9 +35,9 @@

// Adjust the brightness of your lights here -----------------------------------------------------------------------------------------------------
// All brightness values 0 - 255
uint8_t cabLightsBrightness = 255; // Usually 255, 100 for Actros
uint8_t cabLightsBrightness = 255; // Usually 255, 100 for Actros & Ural
uint8_t sideLightsBrightness = 200; // Usually 200, 100 for WPL C44, 50 for Landy, 100 for P407, 150 for Actros
uint8_t rearlightDimmedBrightness = 30; // tailligt brightness, if not braking, about 30
uint8_t rearlightParkingBrightness = 0; // 0, if you want the taillights being off, if side lights are on, or about 5 if you want them on (0 for US Mode)
uint8_t headlightParkingBrightness = 0; // 0, if you want the headlights being off, if side lights are on, or about 5 if you want them on (0 for US Mode)
uint8_t reversingLightBrightness = 140; // Around 140, 50 for Landy
uint8_t reversingLightBrightness = 140; // Around 140, 50 for Landy & Ural
2 changes: 1 addition & 1 deletion src/7_adjustmentsServos.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const uint8_t SERVO_FREQUENCY = 50; // usually 50Hz, some servos may run smoothe
// WARNING: never connect receiver PWM signals to the "CH" pins in BUS communication mode!

// Servo limits
const uint16_t CH1L = 2000, CH1C = 1660, CH1R = 1190; // CH1 steering left, center, right
const uint16_t CH1L = 2100, CH1C = 1660, CH1R = 1190; // CH1 steering left 2000, center 1660, right 1190
const uint16_t CH2L = 1000, CH2C = 1500, CH2R = 2000; // CH2 transmission gear 1, 2, 3
const uint16_t CH3L = 1435, CH3C = 1495, CH3R = 1560; // CH3 winch pull, off, release
const uint16_t CH4L = 1300, CH4R = 1700; // CH4 trailer coupler (5th. wheel) locked, unlocked
Expand Down
Loading

0 comments on commit 9fe4d74

Please sign in to comment.