Add files via upload

This commit is contained in:
Geoff Bunza
2018-07-05 15:18:48 -07:00
committed by GitHub
parent f171dd3894
commit c2de60b8cb
20 changed files with 2940 additions and 269 deletions

View File

@@ -1,4 +1,4 @@
// Production 17 Function DCC Decoder
// Production 17 Function DCC Decoder Dec_15Serv_2LED_6Ftn.ino
// Version 5.4 Geoff Bunza 2014,2015,2016
// NO LONGER REQUIRES modified software servo Lib
// Software restructuring mods added from Alex Shepherd and Franz-Peter
@@ -12,14 +12,13 @@
// ******** INFO TO THE SERIAL MONITOR
//#define DEBUG
#include <NmraDcc.h>
#include <SoftwareServo.h>
SoftwareServo servo[17];
#define servo_start_delay 50
#define servo_init_delay 7
#define servo_slowdown 3 //servo loop counter limit
#define servo_slowdown 12 //servo loop counter limit
int servo_slow_counter = 0; //servo loop counter to slowdown servo transit
int tim_delay = 500;
@@ -49,7 +48,6 @@ NmraDcc Dcc ;
DCC_MSG Packet ;
uint8_t CV_DECODER_MASTER_RESET = 120;
int t; // temp
#define This_Decoder_Address 24
struct QUEUE
{
int inuse;
@@ -65,6 +63,9 @@ struct CVPair
uint16_t CV;
uint8_t Value;
};
#define This_Decoder_Address 24
CVPair FactoryDefaultCVs [] =
{
{CV_MULTIFUNCTION_PRIMARY_ADDRESS, This_Decoder_Address},
@@ -147,15 +148,15 @@ CVPair FactoryDefaultCVs [] =
{102, 28}, // Start Position Fx=0
{103, 140}, // End Position Fx=1
{104, 28}, // Current Position
{105, 1}, //F15 Config 0=On/Off,1=Blink,2=Servo,3=DBL LED Blink,4=Pulsed,5=fade
{105, 3}, //F15 Config 0=On/Off,1=Blink,2=Servo,3=DBL LED Blink,4=Pulsed,5=fade
{106, 1}, // Rate Blink=Eate,PWM=Rate,Servo=Rate
{107, 1}, // Start Position Fx=0
{108, 10}, // End Position Fx=1
{108, 60}, // End Position Fx=1
{109, 1}, // Current Position
{110, 0}, //F16 Config 0=On/Off,1=Blink,2=Servo,3=DBL LED Blink,4=Pulsed,5=fade
{111, 1}, // Rate Blink=Eate,PWM=Rate,Servo=Rate
{112, 1}, // Start Position Fx=0
{113, 10}, // End Position Fx=1
{113, 4}, // End Position Fx=1
{114, 1}, // Current Position
//FUTURE USE
{115, 0}, //F17 Config 0=On/Off,1=Blink,2=Servo,3=DBL LED Blink,4=Pulsed,5=fade
@@ -295,7 +296,7 @@ void loop() //****************************************************************
// from the Arduino loop() function for correct library operation
Dcc.process();
SoftwareServo::refresh();
delay(4);
delay(3);
for (int i=0; i < numfpins; i++) {
if (ftn_queue[i].inuse==1) {