1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-07-30 19:03:44 +02:00

Compare commits

..

5 Commits

Author SHA1 Message Date
Harald Barth
8853b23f88 uopdate version.h 2021-11-07 16:04:49 +01:00
Harald Barth
79ce71c2f9 Committing a SHA 2021-10-31 21:18:17 +00:00
Harald Barth
e3cbaf5f24 unknown locos should have speed forward 2021-10-31 22:17:51 +01:00
Harald Barth
250c372f5c Committing a SHA 2021-10-29 20:30:40 +00:00
Harald Barth
a9c31eb1ae YFROBOT: One more motor board with L298P 2021-10-29 22:30:01 +02:00
6 changed files with 11 additions and 10 deletions

View File

@@ -137,7 +137,7 @@ uint8_t DCC::getThrottleSpeed(int cab) {
bool DCC::getThrottleDirection(int cab) {
int reg=lookupSpeedTable(cab);
if (reg<0) return false ;
if (reg<0) return true;
return (speedTable[reg].speedCode & 0x80) !=0;
}

View File

@@ -156,14 +156,10 @@ void DCCWaveform::checkPowerOverload(bool ackManagerActive) {
else
if (power_sample_overload_wait>POWER_SAMPLE_OVERLOAD_WAIT) power_sample_overload_wait=POWER_SAMPLE_OVERLOAD_WAIT;
} else {
setPowerMode(POWERMODE::OVERLOAD);
unsigned int mA=motorDriver->raw2mA(lastCurrent);
unsigned int maxmA=motorDriver->raw2mA(tripValue);
if (power_good_counter > 0) {
power_good_counter = 0;
DIAG(F("*** %S TRACK POWER WARNING current=%d max=%d ***"), isMainTrack ? F("MAIN") : F("PROG"), mA, maxmA);
break;
}
setPowerMode(POWERMODE::OVERLOAD);
power_good_counter=0;
sampleDelay = power_sample_overload_wait;
DIAG(F("*** %S TRACK POWER OVERLOAD current=%d max=%d offtime=%d ***"), isMainTrack ? F("MAIN") : F("PROG"), mA, maxmA, sampleDelay);
if (power_sample_overload_wait >= 10000)

View File

@@ -23,7 +23,7 @@
#include "MotorDriver.h"
// Wait times for power management. Unit: milliseconds
const int POWER_SAMPLE_ON_WAIT = 50;
const int POWER_SAMPLE_ON_WAIT = 100;
const int POWER_SAMPLE_OFF_WAIT = 1000;
const int POWER_SAMPLE_OVERLOAD_WAIT = 20;

View File

@@ -1 +1 @@
#define GITHUB_SHA "50fcbc0"
#define GITHUB_SHA "e3cbaf5"

View File

@@ -82,5 +82,9 @@
#define IBT_2_WITH_ARDUINO F("IBT_2_WITH_ARDUINO_SHIELD"), \
new MotorDriver(4, 5, 6, UNUSED_PIN, A5, 41.54, 5000, UNUSED_PIN), \
new MotorDriver(11, 13, UNUSED_PIN, UNUSED_PIN, A1, 2.99, 2000, UNUSED_PIN)
// YFROBOT Motor Shield (V3.1)
#define YFROBOT_MOTOR_SHIELD F("YFROBOT_MOTOR_SHIELD"), \
new MotorDriver(5, 4, UNUSED_PIN, UNUSED_PIN, A0, 2.99, 2000, UNUSED_PIN), \
new MotorDriver(6, 7, UNUSED_PIN, UNUSED_PIN, A1, 2.99, 2000, UNUSED_PIN)
#endif

View File

@@ -4,7 +4,8 @@
#include "StringFormatter.h"
#define VERSION "3.1.6"
#define VERSION "3.1.7"
// 3.1.7 Bugfix: Unknown locos should have speed forward
// 3.1.6 Make output ID two bytes and guess format/size of registered outputs found in EEPROM
// 3.1.5 Fix LCD corruption on power-up
// 3.1.4 Refactor OLED and LCD drivers and remove unused code