mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-27 01:56:14 +01:00
less verbose diag, version stamp
This commit is contained in:
parent
82bcae627b
commit
c49d11573c
|
@ -138,14 +138,14 @@ RMTChannel::RMTChannel(pinpair pins, bool isMain) {
|
||||||
// NOTE: ESP_INTR_FLAG_IRAM is *NOT* included in this bitmask
|
// NOTE: ESP_INTR_FLAG_IRAM is *NOT* included in this bitmask
|
||||||
ESP_ERROR_CHECK(rmt_driver_install(config.channel, 0, ESP_INTR_FLAG_LOWMED|ESP_INTR_FLAG_SHARED));
|
ESP_ERROR_CHECK(rmt_driver_install(config.channel, 0, ESP_INTR_FLAG_LOWMED|ESP_INTR_FLAG_SHARED));
|
||||||
|
|
||||||
DIAG(F("Register interrupt on core %d"), xPortGetCoreID());
|
// DIAG(F("Register interrupt on core %d"), xPortGetCoreID());
|
||||||
|
|
||||||
ESP_ERROR_CHECK(rmt_set_tx_loop_mode(channel, true));
|
ESP_ERROR_CHECK(rmt_set_tx_loop_mode(channel, true));
|
||||||
channelHandle[channel] = this; // used by interrupt
|
channelHandle[channel] = this; // used by interrupt
|
||||||
rmt_register_tx_end_callback(interrupt, 0);
|
rmt_register_tx_end_callback(interrupt, 0);
|
||||||
rmt_set_tx_intr_en(channel, true);
|
rmt_set_tx_intr_en(channel, true);
|
||||||
|
|
||||||
DIAG(F("Starting channel %d signal generator for %s"), config.channel, isMain ? "MAIN" : "PROG");
|
DIAG(F("Channel %d DCC signal for %s start"), config.channel, isMain ? "MAIN" : "PROG");
|
||||||
|
|
||||||
// send one bit to kickstart the signal, remaining data will come from the
|
// send one bit to kickstart the signal, remaining data will come from the
|
||||||
// packet queue. We intentionally do not wait for the RMT TX complete here.
|
// packet queue. We intentionally do not wait for the RMT TX complete here.
|
||||||
|
|
|
@ -213,10 +213,10 @@ void DCCWaveform::begin() {
|
||||||
for(const auto& md: TrackManager::getMainDrivers()) {
|
for(const auto& md: TrackManager::getMainDrivers()) {
|
||||||
pinpair p = md->getSignalPin();
|
pinpair p = md->getSignalPin();
|
||||||
if(rmtMainChannel) {
|
if(rmtMainChannel) {
|
||||||
DIAG(F("added pins %d %d to MAIN channel"), p.pin, p.invpin);
|
// DIAG(F("added pins %d %d to MAIN channel"), p.pin, p.invpin);
|
||||||
rmtMainChannel->addPin(p); // add pin to existing main channel
|
rmtMainChannel->addPin(p); // add pin to existing main channel
|
||||||
} else {
|
} else {
|
||||||
DIAG(F("new MAIN channel with pins %d %d"), p.pin, p.invpin);
|
// DIAG(F("new MAIN channel with pins %d %d"), p.pin, p.invpin);
|
||||||
rmtMainChannel = new RMTChannel(p, true); /* create new main channel */
|
rmtMainChannel = new RMTChannel(p, true); /* create new main channel */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -224,10 +224,10 @@ void DCCWaveform::begin() {
|
||||||
if (md) {
|
if (md) {
|
||||||
pinpair p = md->getSignalPin();
|
pinpair p = md->getSignalPin();
|
||||||
if (rmtProgChannel) {
|
if (rmtProgChannel) {
|
||||||
DIAG(F("added pins %d %d to PROG channel"), p.pin, p.invpin);
|
// DIAG(F("added pins %d %d to PROG channel"), p.pin, p.invpin);
|
||||||
rmtProgChannel->addPin(p); // add pin to existing prog channel
|
rmtProgChannel->addPin(p); // add pin to existing prog channel
|
||||||
} else {
|
} else {
|
||||||
DIAG(F("new PROGchannel with pins %d %d"), p.pin, p.invpin);
|
// DIAG(F("new PROGchannel with pins %d %d"), p.pin, p.invpin);
|
||||||
rmtProgChannel = new RMTChannel(p, false);
|
rmtProgChannel = new RMTChannel(p, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
#define GITHUB_SHA "PORTX-HAL-20220809"
|
#define GITHUB_SHA "PORTX-HAL-20220813"
|
||||||
|
|
|
@ -141,7 +141,7 @@ bool TrackManager::setTrackMode(byte trackToSet, TRACK_MODE mode, int16_t dcAddr
|
||||||
#ifdef ARDUINO_ARCH_ESP32
|
#ifdef ARDUINO_ARCH_ESP32
|
||||||
// remove pin from MUX matrix and turn it off
|
// remove pin from MUX matrix and turn it off
|
||||||
pinpair p = track[trackToSet]->getSignalPin();
|
pinpair p = track[trackToSet]->getSignalPin();
|
||||||
DIAG(F("Track=%c remove pin %d"),trackToSet+'A', p.pin);
|
// DIAG(F("Track=%c remove pin %d"),trackToSet+'A', p.pin);
|
||||||
gpio_reset_pin((gpio_num_t)p.pin);
|
gpio_reset_pin((gpio_num_t)p.pin);
|
||||||
pinMode(p.pin, OUTPUT); // gpio_reset_pin may reset to input
|
pinMode(p.pin, OUTPUT); // gpio_reset_pin may reset to input
|
||||||
if (p.invpin != UNUSED_PIN) {
|
if (p.invpin != UNUSED_PIN) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user