Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. OddThomas
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by OddThomas

    • RE: OTALog() issue/questions

      Thanks for the links.

      Adding the delay in my code will not work in the case where a log message is being sent that is longer than 25 characters (MAX_PAYLOAD). The library code for that method splits the message and sends them in a loop where I have no control in my program via the wait() method.

      I think in my case, I will add some code similar to what was suggested in the github discussion, but I will add it to MyTransportRF24.cpp rather than at the top level send() method.

      Something similar to this:

      #ifdef MY_TRANSPORT_RF24_MESSAGE_DELAY
      unsigned int lastSendMS;
      #endif
      
      bool transportSend(const uint8_t to, const void *data, const uint8_t len, const bool noACK)
      {
      #ifdef MY_TRANSPORT_RF24_MESSAGE_DELAY
      	unsigned int waitTime=lastSendMS+MY_TRANSPORT_RF24_MESSAGE_DELAY-millis();
      	if(waitTime > 0) {
      		wait(waitTime);
      	}
      #endif
      ...
      

      Haven't tried this yet, but it should address my issue for now.

      posted in Development
      OddThomas
      OddThomas