Der Kompiler will mir weiß machen, dass es kein Rückgabewert gibt, stimmt ja auch teilweise.
Wie kann ich den Compiler denn befriedigen?
CodeBox C
CodeBox C
Wie kann ich den Compiler denn befriedigen?
CodeBox C
float read_vrms(uint8_t phase) { static uint8_t cnt; ADE7758.vrms[0] += ((float)ADE7758_read_uint24(REG_AVRMS) / FULL_SCALE_VRMS) * RMS_SPANNUNG_MAX; ADE7758.vrms[1] += ((float)ADE7758_read_uint24(REG_BVRMS) / FULL_SCALE_VRMS) * RMS_SPANNUNG_MAX; ADE7758.vrms[2] += ((float)ADE7758_read_uint24(REG_CVRMS) / FULL_SCALE_VRMS) * RMS_SPANNUNG_MAX; if (cnt++ >= AVG) { cnt = 0; ADE7758.state |= (1<<0); // voltage average value ready ADE7758.vrms[0] /= AVG; ADE7758.vrms[1] /= AVG; ADE7758.vrms[2] /= AVG; return ADE7758.vrms[phase]; } // Hier gehört normalerweiße das "return" hin. }
CodeBox C
Warning control reaches end of non-void function [-Wreturn-type]