Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Loco Function are not working #17

Closed
Heclo opened this issue Mar 11, 2019 · 0 comments
Closed

Loco Function are not working #17

Heclo opened this issue Mar 11, 2019 · 0 comments
Assignees
Labels
bug JMRI JMRI Integration related bug/feature

Comments

@Heclo
Copy link

Heclo commented Mar 11, 2019

When trying to activate decoder functions in either the web interface or JMRI; nothing happens.
No response from decoder, no activity in serial monitor.
JMRI DCC++ traffic monitor shows correct command when function button is pressed.

Tested with: arduino motor shield, ESP32 devkit1, 15V psu, ESU loksound 4

Config_MotorBoard.h configured like this:
`// MAIN TRACK MOTORBOARD NAME
#define MOTORBOARD_NAME_OPS "OPS"
// MAIN TRACK NOTORBOARD ENABLED PIN
#define MOTORBOARD_ENABLE_PIN_OPS 27
// MAIN TRACK MOTORBOARD CURRENT SENSE ADC PIN
#define MOTORBOARD_CURRENT_SENSE_OPS ADC1_CHANNEL_5
// MAIN TRACK MOTORBOARD MOTOR_BOARD_TYPE
#define MOTORBOARD_TYPE_OPS ARDUINO_SHIELD

// PROG TRACK MOTORBOARD NAME
#define MOTORBOARD_NAME_PROG "PROG"
// PROG TRACK NOTORBOARD ENABLED PIN
#define MOTORBOARD_ENABLE_PIN_PROG 25
// PROG TRACK MOTORBOARD CURRENT SENSE ADC PIN
#define MOTORBOARD_CURRENT_SENSE_PROG ADC1_CHANNEL_4
// PROG TRACK MOTORBOARD MOTOR_BOARD_TYPE
#define MOTORBOARD_TYPE_PROG ARDUINO_SHIELD

/////////////////////////////////////////////////////////////////////////////////////
//
// DEFINE WHICH PINS ARE USED FOR DCC SIGNAL GENERATION
//
// OPERATIONS TRACK DCC SIGNAL PIN
#define DCC_SIGNAL_PIN_OPERATIONS 14

// PROGRAMMING TRACK DCC SIGNAL PIN
#define DCC_SIGNAL_PIN_PROGRAMMING 26

/////////////////////////////////////////////////////////////////////////////////////
//
// DEFINE THE CURRENT SENSE ATTENUATION. THIS IS USED BY THE ADC SYSTEM TO SCALE
// THE CURRENT SENSE VALUES BASED ON THE MOTOR SHIELD.
//
// SUPPORTED VALUES: ADC_ATTEN_DB_11, ADC_ATTEN_DB_6, ADC_ATTEN_DB_2_5, ADC_ATTEN_DB_0
//
// IF LEFT UNDEFINED ADC_ATTEN_DB_11 WILL BE USED.

#define ADC_CURRENT_ATTENUATION ADC_ATTEN_DB_6

/////////////////////////////////////////////////////////////////////////////////////`

@atanisoft atanisoft added bug JMRI JMRI Integration related bug/feature labels Mar 25, 2019
@atanisoft atanisoft self-assigned this Mar 25, 2019
atanisoft added a commit that referenced this issue Mar 25, 2019
The function commands were not being interpreted correctly as part of
the DCC++ text based protocol stream. The wrong set of functions were
being enabled due to missing guards on the bit masking.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug JMRI JMRI Integration related bug/feature
Projects
None yet
Development

No branches or pull requests

2 participants