You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Arduino String class is only intended for string data currently. In particular, it cannot handle embedded 0x0 bytes, which you might very well want to send or receive. See arduino/ArduinoCore-API#111 and arduino/ArduinoCore-API#97. If those issues are fixed, the String class could still be used, though.
The text was updated successfully, but these errors were encountered:
Can you add some context here? Is this an area where arduino_ci deviates from the standard Arduino library currently? Or is it at risk of deviating in the future?
I had some trouble using std:: anything when compiling, as we are essentially mocking the AVR behavior on non-AVR... which was frustrating. If fixing #146 enables std::string to be used, I'm all for it.
Is this an area where arduino_ci deviates from the standard Arduino library currently?
No, the Arduino String class is just broken when it comes to embedded nul bytes. Internally, the class uses some standard libc functions (e.g. things like strcpy) that will stop processing at the first embedded nul, so things might break when you use the String class for arbitrary binary data, rather than actual strings.
Also, since the Godmode stuff is only for unittests (i.e. it never has to actually run on AVR/MCU), it can use non-Arduino classes just normally (though using the Arduino String class could make interaction with other library code easier, of course).
I had some trouble using std:: anything when compiling, as we are essentially mocking the AVR behavior on non-AVR...
Hm, I haven't actually tried std::string yet, I'll have a look at #146 then.
The Arduino
String
class is only intended for string data currently. In particular, it cannot handle embedded 0x0 bytes, which you might very well want to send or receive. See arduino/ArduinoCore-API#111 and arduino/ArduinoCore-API#97. If those issues are fixed, the String class could still be used, though.The text was updated successfully, but these errors were encountered: