Continuing the discussion from Particle Firmware Update Thread:
I cannot use this new feature, even the Web IDE fails on the provided example code here with error: expected primary-expression before '.' token
Continuing the discussion from Particle Firmware Update Thread:
I cannot use this new feature, even the Web IDE fails on the provided example code here with error: expected primary-expression before '.' token
I’m poking around in the GitHub repo, and if I’m not totally crazy, it looks like format
is not defined anywhere in spark_wiring_string.{h,cpp} for the 0.4.6 release branch. Did you guys miss something?
This seems to work for me?
@Moors7, You’re using Time.format() in your example, not String.format() which was just added in 0.4.6.
@mdma, awesome, thanks for the reply.
My bad, but that is the example you’re referring to as ‘not working’
Seems that there’s some issue with duplicated links for different things in the docs. Guess you were indeed referencing the String functions.
Oh weird, looks like the HTML anchors for both String::format() (under the String section of the firmware reference) and Time.format() (under the Libraries section) are exactly the same, so clicking that link brings you to the first one - the Time.format() anchor.
Is this, in itself, a separate issue with the docs?
I’ve raised an issue with the docs here https://github.com/spark/docs/issues/192
Although I think the long term fix should be to prefix each function name with the library it’s contained in. e.g. rather than begin()
write Serial.begin()
because you never write just begin()
in actual firmware.