Strung out
i have program of 68 kb on arduino due, it's 800 lines long , utilizes ten large subroutines. i communicate modbus field devices, various cell modems, inbound , outbound email servers, , there web server serve html configuration pages, images, , data on lan. has taken me months make , working great. finished bulk of , during long period testing encountering crashes. nothing on serial monitor indicates watchdog trip or endless loop. search answers points string usage , memory issues. have used
string1 += char(c);
scenario countless times , can find devastating the memory (heap no?). walked infamous "string trap" know:(. i sure you're used seeing posts crashes , talking string hatred , assure not looking rewrite code , fix because i'm lazy. have lost enough sleep on think of few ideas solve issue , input on them before serious reworking of various clients , servers.
i read #include <string.h> , using string functions(strcat() etc), i'll lose indexof() worse things have happened.
how recommended , reliable this?
there mention of 1 line fix free(), doable on due?
i read reserve() function. if use , make global(or not?) string use on clients , servers lots of room spare, 150 bytes in size, , ensure never exceed limit? need make =""; though..
http://code.google.com/p/arduino/issues/detail?id=449
i putting myself through paces of char arrays , learning ins , outs has been awakening slap in face! future code have no mention of string.
edit: open ideas well..
string1 += char(c);
scenario countless times , can find devastating the memory (heap no?). walked infamous "string trap" know:(. i sure you're used seeing posts crashes , talking string hatred , assure not looking rewrite code , fix because i'm lazy. have lost enough sleep on think of few ideas solve issue , input on them before serious reworking of various clients , servers.
i read #include <string.h> , using string functions(strcat() etc), i'll lose indexof() worse things have happened.
how recommended , reliable this?
there mention of 1 line fix free(), doable on due?
i read reserve() function. if use , make global(or not?) string use on clients , servers lots of room spare, 150 bytes in size, , ensure never exceed limit? need make =""; though..
http://code.google.com/p/arduino/issues/detail?id=449
i putting myself through paces of char arrays , learning ins , outs has been awakening slap in face! future code have no mention of string.
edit: open ideas well..
quote
my search answers points string usage , memory issues. have used the
string1 += char(c);
what string1? strings don't support +=. strings do. huge difference. perhaps clarification in order, before read rest of post.
Arduino Forum > Using Arduino > Programming Questions > Strung out
arduino
Comments
Post a Comment