RadioReceiverPCB_with_MPU_6050.ino: In function 'void ComplementaryFilter(float*, uint16_t, float, long unsigned int)':
RadioReceiverPCB_with_MPU_6050:378: error: invalid operands of types 'double' and 'float*' to binary 'operator*'
KeithRB:
This is an interesting case of parsing. since the *newAngle would make sense, it could also have complained about a missing operator.
Nothing special with parsing a * *b, just like a - -b
Perhaps the routine meant to take a float reference rather than a pointer:
void ComplementaryFilter(float &newAngle, uint16_t newRate, float accAngle, unsigned long looptime){
You only need the generality of pointers when its an array or buffer that you are
going to index, reference types are cleaner for pass-by-reference use-cases (unsurprisingly)
No but if you have a*b where b is a pointer, you can choose between two errors. Either an invalid type for multiplication, or a missing operator between two compatible types.