Frankthetech
Reaction score
1

Latest activity Postings About

    • Frankthetech
      Yep, back feeding is a problem. I had a project where the device I connected to had it's own power system. Everything went fine till someone thought my project should be turned off at night but left the connected device powered. This resulted in...
    • Frankthetech
      Frankthetech replied to the thread Char array behavior w/T3.2.
      I used StaticJsonBuffer<300> doc1 until I updated the library to 7.4.2 then it was deprecated and now its just JsonDocument doc1;
    • Frankthetech
      Frankthetech replied to the thread Char array behavior w/T3.2.
      Hi Kurt, I did try this, looks like it suggested the issue is in ArduinoJson library, likely my code calling it at some point. It reports nullptr, not too sure what to look for. I'm not using malloc or new in my code but I expect it could be...
    • Frankthetech
      Frankthetech replied to the thread Char array behavior w/T3.2.
      This is not as straight forward as I first thought, I'm trying to better understand this kind of issue. The reason I want know more is because in a rather large program I wrote (>5000 lines) running on T4.1 and is working 99.9% of the time. I...
    • Frankthetech
      Frankthetech replied to the thread Char array behavior w/T3.2.
      Done with, strncat(oneBuf, twoBuf, (sizeof(oneBuf)-(strlen(oneBuf)+1))); However, I can see an issue if either array is missing the nul terminator. Will have to confirm the arrays are properly null termed before any strcpy/strcat operation. Lots...
    • Frankthetech
      Frankthetech replied to the thread Char array behavior w/T3.2.
      Short of using a library (ie: Safestring) does anyone have ideas/examples about how to safely copy/cat buffer to buffer?
    • Frankthetech
      Frankthetech replied to the thread Char array behavior w/T3.2.
      Thanks, I got a better understanding on this now. Always learning new stuff. I used this code to show how coping beyond the buffer size can cause issues. char oneBuf[12]={"firstbuf "}; char twoBuf[20]={"secondbuffer"}; void showLines(){...
    • Frankthetech
      Frankthetech replied to the thread Char array behavior w/T3.2.
      Pete I agree, and I would never let this code be used. This was just an test of what could happen when you don't make sure there's room for the copy. The code has no two byte variable declared, just the buffers, could the 2 byte gap just be...
    • Frankthetech
      Frankthetech replied to the thread Char array behavior w/T3.2.
      I was trying to copy more char's into oneBuf[10] from twoBuf[20] than it could hold, to see the effect it would have on oneBuf. as expected strcat did what was asked of it and blindly added it to oneBuf (there by writing beyond the end of...
    • Frankthetech
      Hi, so I'm just trying to get a handle on the array (char type) operation. running this code char oneBuf[10]={"is one"}; char twoBuf[20]={"second34"}; char lstBuf[40]={"big array"}; void showdata(){ Serial.print("address of oneBuf --> ")...
    • Frankthetech
      The question then Why does the compiled code become 8 bytes larger when the reference type is used? If it makes a copy (pass by value) I might expect it to be larger. //pass test1 //void dotWait(int toWait){ //compiles ->59672 bytes...
    • Frankthetech
      Hi, I'm trying to figure out how these two code blocks differ. void dotWait(int toWait){ uint32_t startMillis=millis(); while(millis()<=(startMillis+toWait)){ Serial.print("."); delay(200); } Serial.println(); } void dotWait(int...
  • Loading…
  • Loading…
Back
Top