Skip to content

Commit

Permalink
v9.7.0: many changes according to change log
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDIYGuy999 committed Jun 6, 2022
1 parent a70c65b commit 4189aff
Show file tree
Hide file tree
Showing 18 changed files with 2,554 additions and 2,140 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,17 @@ const uint8_t shakerStop = 60; // Shaker power while engine stop (max. 255, abou

## Changelog (newest on top):

### New in V 9.7.0:
- NEOPIXEL_KNIGHT_RIDER scanner optimized, synchrone with sound
- NEOPIXEL_BLUELIGHT: red & blue bluelight animation for fire trucks etc.
- NEOPIXEL_HIGHBEAM: Neopixel bar now also usable for full beam and headlight flasher. Also working in combination with NEOPIXEL_KNIGHT_RIDER & NEOPIXEL_BLUELIGHT
- "Audio2Header.html" tool now able to remove noise in silent passages (option "remove noise floor")
- ESC state machine hanging in case 1 or 3, if throttle trigger direction changed qickly: bug solved
- Engine volume raising, if throttle trigger direction changed qickly: bug solved
- Improved ESC_DEBUG messages
- 3_adjustmentsESC.h: options better organized, OVERDRIVE now also usable with VIRTUAL_3_SPEED. In this case, the 4th (overdrive) gear is engaged @ full throttle & high RPM in 3rd gear
- 2_adjustmentsRemote.h: CHANNEL_AVERAGING option (recommended, if you have issues with unstable channels)

### New in V 9.6.0:
- New version numbering: mainVersion.subVersion.patch It is also displayed in Serial Monitor, so you always know, which version you have on your vehicle
- "Out of fuel" voice message in many languages in "3_adjustmentsESC.h"
Expand Down
4 changes: 2 additions & 2 deletions src/10_adjustmentsTrailer.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

// IMPORTANT!! Replace the addresses below with your trailers MAC addresses!! --------------------------
// Trailer 1
//uint8_t broadcastAddress1[] = {0x4C, 0xEB, 0xD6, 0x7C, 0x02, 0x74}; // Bruder Low Loader
uint8_t broadcastAddress1[] = {0x4C, 0xEB, 0xD6, 0x7C, 0x02, 0x74}; // Bruder Low Loader
//uint8_t broadcastAddress1[] = {0x4C, 0xEB, 0xD6, 0x7C, 0x1E, 0x10}; // US flatbed
uint8_t broadcastAddress1[] = {0xAC, 0x67, 0xB2, 0x12, 0x30, 0x28}; // white board
//uint8_t broadcastAddress1[] = {0xAC, 0x67, 0xB2, 0x12, 0x30, 0x28}; // white board
//uint8_t broadcastAddress1[] = {0xA0, 0x20, 0xA6, 0x10, 0x46, 0x3B}; // D1 Mini ESP8266

// Trailer 2
Expand Down
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
121 changes: 62 additions & 59 deletions src/2_adjustmentsRemote.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <Arduino.h>

// Select (remove //) the remote configuration profile you have:
//#define FLYSKY_FS_I6X // <------- Flysky FS-i6x
//#define FLYSKY_FS_I6S_EXCAVATOR // <------- Flysky FS-i6s for KABOLITE K336 hydraulic excavator (use IBUS communication setting)
Expand Down Expand Up @@ -38,8 +38,11 @@ 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_STEERING // Exponential steering curve. More steering accuracy around center position
//#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!) **********************************************************************************************************
//#define CHANNEL_AVERAGING // This is recommended, if you have issues with unstable channels

// CONFIGURATION PROFILES *********************************************************************************************************************
/*
Expand Down Expand Up @@ -74,7 +77,7 @@ uint32_t sbusBaud = 100000; // Standard is 100000. Try to lower it, if your chan
//
// (2) Now go to "Functions" -> "Dual rate/exp.".
// Note, that "Normal" changes to "Sport" as soon as the selected Fly mode switch is toggled.
//
//
// (3) Now switch to "Sport" and set the "Rate" of "Ch2" from 100 to 75.
// Do the exact same thing for "Ch4", but don't change "Ch1" (this one should still be 100 in both modes)!

Expand Down Expand Up @@ -113,7 +116,7 @@ boolean channelReversed[14] = {
false, // CH11
false, // CH12
false // CH13
};
};

// Channels auto zero adjustment or not (don't use it for channels without spring centered neutral position, switches or unused channels)
boolean channelAutoZero[14] = {
Expand All @@ -131,7 +134,7 @@ boolean channelAutoZero[14] = {
false, // CH11
false, // CH12
false // CH13
};
};

// Channels signal range calibration -----
const uint16_t pulseNeutral = 30;
Expand Down Expand Up @@ -181,7 +184,7 @@ boolean channelReversed[14] = {
false, // CH11
false, // CH12
false // CH13
};
};

// Channels auto zero adjustment or not (don't use it for channels without spring centered neutral position, switches or unused channels)
boolean channelAutoZero[14] = {
Expand All @@ -199,7 +202,7 @@ boolean channelAutoZero[14] = {
false, // CH11
false, // CH12
false // CH13
};
};

// Channels signal range calibration -----
const uint16_t pulseNeutral = 30;
Expand Down Expand Up @@ -249,7 +252,7 @@ boolean channelReversed[14] = {
false, // CH11
false, // CH12
false // CH13
};
};

// Channels auto zero adjustment or not (don't use it for channels without spring centered neutral position, switches or unused channels)
boolean channelAutoZero[14] = {
Expand All @@ -267,7 +270,7 @@ boolean channelAutoZero[14] = {
false, // CH11
false, // CH12
false // CH13
};
};

// Channels signal range calibration -----
const uint16_t pulseNeutral = 30;
Expand All @@ -284,30 +287,30 @@ const uint16_t pulseSpan = 480;
#ifdef FLYSKY_GT5

/* Communication settings (above):-----------------------
* #define IBUS_COMMUNICATION // Use IBUS (tested with FS-IA6B receiver)
*/
#define IBUS_COMMUNICATION // Use IBUS (tested with FS-IA6B receiver)
*/

/* Transmitter settings -----------------------
* Menu EPA:
* select AUX 3
* L.F.U. 100%, R.B.D. 75%
* select AUX 6
* L.F.U. 75%, R.B.D. 75%
*
* SVC off
* CRAWL off
*
* Save
*/

/* Remote channel functions -----------------------
* Channel 1 = Steering and automatic indicators
* Channel 2 = Throttle & brake- reversing-lights
* Channel 3 = Push button on the transmitter grip = hazards on / off
* Channel 4 = 3 positiion switch on the transmitter grip = gearbox shifting
* Channel 5 = left pot: left turn = blue lights & siren, right turn = horn
* Channel 6 = right pot: left turn = engine start / stop, right turn = light sequences switching (hold it in end position, then return to center pos.)
*/
Menu EPA:
select AUX 3
L.F.U. 100%, R.B.D. 75%
select AUX 6
L.F.U. 75%, R.B.D. 75%
SVC off
CRAWL off
Save
*/

/* Remote channel functions -----------------------
Channel 1 = Steering and automatic indicators
Channel 2 = Throttle & brake- reversing-lights
Channel 3 = Push button on the transmitter grip = hazards on / off
Channel 4 = 3 positiion switch on the transmitter grip = gearbox shifting
Channel 5 = left pot: left turn = blue lights & siren, right turn = horn
Channel 6 = right pot: left turn = engine start / stop, right turn = light sequences switching (hold it in end position, then return to center pos.)
*/

// Channel assignment (use NONE for non existing channels!)
// Remote channel ####### // Sound controller channel ##########################################
Expand Down Expand Up @@ -341,7 +344,7 @@ boolean channelReversed[14] = {
false, // CH11
false, // CH12
false // CH13
};
};

// Channels auto zero adjustment or not (don't use it for channels without spring centered neutral position, switches or unused channels)
boolean channelAutoZero[14] = {
Expand All @@ -359,7 +362,7 @@ boolean channelAutoZero[14] = {
false, // CH11
false, // CH12
false // CH13
};
};

// Channels signal range calibration -----
const uint16_t pulseNeutral = 30;
Expand All @@ -376,25 +379,25 @@ const uint16_t pulseSpan = 480;
#ifdef RGT_EX86100

/* Communication settings (above):-----------------------
* Use PWM commmunication mode
*/
Use PWM commmunication mode
*/

/* Transmitter settings -----------------------
* CH1 & 2 reverse: R
* CH2 EPA (LO & HI): max.
* CH1 DR: about 60% (so that the steerning servo is not pushing against end stops)
* CH1 center position: 0
* CH2 center position: around 0, so that vehicle is driving a straight line
*
* NOTE: do not adjust the settings above without rebooting the ESP32!
*
*/

/* Remote channel functions -----------------------
* Channel 1 = Steering and automatic indicators
* Channel 2 = Throttle & brake- reversing-lights
* Channel 3 = 2 position switch on the transmitter grip = horn on / off
*/
CH1 & 2 reverse: R
CH2 EPA (LO & HI): max.
CH1 DR: about 60% (so that the steerning servo is not pushing against end stops)
CH1 center position: 0
CH2 center position: around 0, so that vehicle is driving a straight line
NOTE: do not adjust the settings above without rebooting the ESP32!
*/

/* Remote channel functions -----------------------
Channel 1 = Steering and automatic indicators
Channel 2 = Throttle & brake- reversing-lights
Channel 3 = 2 position switch on the transmitter grip = horn on / off
*/

// Channel assignment (use NONE for non existing channels!)
// Remote channel ####### // Sound controller channel ##########################################
Expand Down Expand Up @@ -428,7 +431,7 @@ boolean channelReversed[14] = {
false, // CH11
false, // CH12
false // CH13
};
};

// Channels auto zero adjustment or not (don't use it for channels without spring centered neutral position, switches or unused channels)
boolean channelAutoZero[14] = {
Expand All @@ -446,7 +449,7 @@ boolean channelAutoZero[14] = {
false, // CH11
false, // CH12
false // CH13
};
};

// Channels signal range calibration -----
const uint16_t pulseNeutral = 30;
Expand Down Expand Up @@ -494,7 +497,7 @@ boolean channelReversed[14] = {
false, // CH11
false, // CH12
false // CH13
};
};

// Channels auto zero adjustment or not (don't use it for channels without spring centered neutral position, switches or unused channels)
boolean channelAutoZero[14] = {
Expand All @@ -512,7 +515,7 @@ boolean channelAutoZero[14] = {
false, // CH11
false, // CH12
false // CH13
};
};

// Channels signal range calibration -----
const uint16_t pulseNeutral = 30;
Expand Down Expand Up @@ -560,7 +563,7 @@ boolean channelReversed[14] = {
false, // CH11
false, // CH12
false // CH13
};
};

// Channels auto zero adjustment or not (don't use it for channels without spring centered neutral position, switches or unused channels)
boolean channelAutoZero[14] = {
Expand All @@ -578,7 +581,7 @@ boolean channelAutoZero[14] = {
false, // CH11
false, // CH12
false // CH13
};
};

// Channels signal range calibration -----
const uint16_t pulseNeutral = 30;
Expand Down Expand Up @@ -626,7 +629,7 @@ boolean channelReversed[14] = {
false, // CH11
false, // CH12
false // CH13
};
};

// Channels auto zero adjustment or not (don't use it for channels without spring centered neutral position, switches or unused channels)
boolean channelAutoZero[14] = {
Expand All @@ -644,7 +647,7 @@ boolean channelAutoZero[14] = {
false, // CH11
false, // CH12
false // CH13
};
};

// Channels signal range calibration -----
const uint16_t pulseNeutral = 30;
Expand Down
17 changes: 9 additions & 8 deletions src/3_adjustmentsESC.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

// General options
//#define QUICRUN_FUSION // Linearity compensation for HOBBYWING Quicrun Fusion motor / ESC combo
//#define ESC_DIR // uncomment this, if your motor is spinning in the wrong direction
#define ESC_DIR // uncomment this, if your motor is spinning in the wrong direction

/* RZ7886 motor driver IC instead of ESC. Not in combination with #define THIRD_BRAKELIGHT or #define TRAILER_LIGHTS_TRAILER_PRESENCE_SWITCH_DEPENDENT
Wiring:
Expand Down Expand Up @@ -108,23 +108,24 @@ const uint16_t escTakeoffPunch = 0;
const uint16_t escReversePlus = 0;

// Brake margin: (Experimental!)
// This setting prevents the ESC to go completely back to zero / neutral as long as the braker trigger is pulled.
// This setting prevents the ESC from going completely back to zero / neutral as long as the braker trigger is pulled.
// This prevents the vehicle from rolling back as long as brake is applied. 0 = no effect, ca. 20 = strong effect.
// How it works? Prevents the ESC from entering the "drag brake range"
// Warning: vehicle may be unable to stop, if too high, especially when driving downhill!
const uint16_t brakeMargin = 10; // For RZ7886 motor driver and 370 motor = 10
// Warning: vehicle may be unable to stop, if too high, especially when driving downhill! NEVER more than 20!
const uint16_t brakeMargin = 0; // For RZ7886 motor driver and 370 motor = 10

// Battery low discharge protection (only for boards with voltage divider resistors):
// IMPORTANT: adjust RESISTOR_TO_BATTTERY_PLUS & DIODE_DROP until your readings are correct!
//#define BATTERY_PROTECTION // This will disable the ESC output, if the battery cutout voltage is reached
const float CUTOFF_VOLTAGE = 3.3; // Usually 3.3 V per LiPo cell. NEVER below 3.2 V!
const float FULLY_CHARGED_VOLTAGE = 4.2; // Usually 4.2 V per LiPo cell, NEVER above!
const uint16_t RESISTOR_TO_BATTTERY_PLUS = 9650; // 10000 Ohms (9900 for switch mode test board, 9650 for Ural)
const uint16_t RESISTOR_TO_BATTTERY_PLUS = 10000; // 10000 Ohms (9900 for switch mode test board, 9650 for Ural, 9500 for Landy)
const uint16_t RESISTOR_TO_GND = 1000; // 1000 Ohms
const float DIODE_DROP = 0.0; // About 0.34V for SS34 diode (0 for Ural)
const float DIODE_DROP = 0.34; // About 0.34V for SS34 diode on switch mode board (0 for Ural & Landy)
volatile int outOfFuelVolumePercentage = 80; // Adjust the message volume in %
// Select the out of fuel message you want:
//#include "vehicles/sounds/OutOfFuelEnglish.h"
#include "vehicles/sounds/OutOfFuelGerman.h"
#include "vehicles/sounds/OutOfFuelEnglish.h"
//#include "vehicles/sounds/OutOfFuelGerman.h"
//#include "vehicles/sounds/OutOfFuelFrench.h"
//#include "vehicles/sounds/OutOfFuelDutch.h"
//#include "vehicles/sounds/OutOfFuelSpanish.h"
Expand Down
Loading

0 comments on commit 4189aff

Please sign in to comment.