Closed reaper7 closed 8 years ago
Try and rename the variables N
and T
to NN
and TT
.
The former names may conflict with macros.
Which MSP430 board are you compiling against?
BTW still get one more error:
User_Defined_Connection.cpp: In function 'size_t BlynkStreamRead(void*, size_t)':
User_Defined_Connection.cpp:42:42: error: invalid conversion from 'byte* {aka unsigned char*}' to 'char*' [-fpermissive]
C:\PROGRAMY\energia\hardware\msp430\cores\msp430/Stream.h:76:10: error: initializing argument 1 of 'size_t Stream::readBytes(char*, size_t)' [-fpermissive]
T
or N
?byte*
to char*
.I rename T & N and error is gone:
template <unsigned NN, typename TT>
void BlynkAverageSample (TT& avg, const TT& input) {
avg -= avg/NN;
const TT add = input/NN;
// Fix for shorter delays
avg += (add > 0) ? add : -1;
}
I'm try on msp430f5529 and msp430g2955
EDIT: changing T is not neccesary, need only N to NN
Please report the issue and suggest the solution to Blynk! Thank you.
of course I report
what You mean: "Use transtype function to convert byte* to char*."
With the following declarations
function
is declared as void function(char * value)
myValue
as byte* myValue;
,
simply usefunction((char *)myValue);
.sorry but second problem is gone :) maybe energia restart was needed.
finally: rename N to NN solves problem tnx rei-vilo
when I try to compile examples from blynk library then I get error:
26 line from BlynkUtility looks:
the same code compiled OK on other Energia platforms CC3200/Stallaris/Tiva and Arduino/ESP8266
...this is compilator error? or maybe incorrect wrote template on blynk library ?