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

RPS debug logging output format not as desired #37

Open
matthias-bs opened this issue Jan 13, 2023 · 2 comments
Open

RPS debug logging output format not as desired #37

matthias-bs opened this issue Jan 13, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@matthias-bs
Copy link
Owner

matthias-bs commented Jan 13, 2023

The debug output format for RPS information does not match other debug messages:

10:42:46.290 -> [ 47074][D][BresserWeatherSensorTTN.ino:820] NetTxComplete(): 
10:42:46.290 -> 41359 ms:[ 47090][I][BresserWeatherSensorTTN.ino:772] operator()(): TX @41359 ms: ch=2 rps=0x03 (SF9 BW125 CR 4/5 Crc IH=0)
10:42:46.290 -> 

(Preceeding extra timestamp 41359ms:, extra line-feed.)

This is due to the fact that there are still Serial.print() calls in ~/Arduino/libraries/MCCI_Arduino_LoRaWAN_Library/src/lib/arduino_lorawan_cEventLog.cpp even if debug output is implemented in the sketch with the myEventLog.logEvent() function. (see Arduino_LoRaWAN::cEventLog::processSingleEvent())

arduino_lorawan_cEventLog.cpp#L88

@matthias-bs matthias-bs added the enhancement New feature or request label Jan 13, 2023
@matthias-bs matthias-bs self-assigned this Jan 13, 2023
@matthias-bs
Copy link
Owner Author

Workaround

Comment out Serial.print() statements in arduino_lorawan_cEventLog.cpp:

bool
Arduino_LoRaWAN::cEventLog::processSingleEvent()
    {
    if (this->m_head == this->m_tail)
        {
        return false;
        }

    auto const pEvent = &this->m_queue[this->m_head];

    //Serial.print(osticks2ms(pEvent->time));
    //Serial.print(" ms:");
    pEvent->pCallBack(pEvent);
    //Serial.println();

    if (++m_head == sizeof(m_queue) / sizeof(m_queue[0]))
        {
        m_head = 0;
        }

    return true;
    }

@matthias-bs
Copy link
Owner Author

Created mcci-catena/arduino-lorawan#211

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant