static void reportAlarmLimits(void) { #ifdef HEATERMETER_SERIAL print_P(PSTR("HMAL")); for (unsigned char i=0; i<TEMP_COUNT; ++i) { ProbeAlarm &a = pid.Probes[i]->Alarms; Serial_csv(); SerialX.print(a.getLow(), DEC); if (a.getLowRinging()) Serial_char('L'); Serial_csv(); SerialX.print(a.getHigh(), DEC); if (a.getHighRinging()) Serial_char('H'); } Serial_nl(); #endif }
void GrillPid::status(void) const { SerialX.print(getSetPoint(), DEC); Serial_csv(); for (unsigned char i=0; i<TEMP_COUNT; ++i) { if (Probes[i]->hasTemperature()) SerialX.print(Probes[i]->Temperature, 1); else Serial_char('U'); Serial_csv(); } SerialX.print(getPidOutput(), DEC); Serial_csv(); SerialX.print((int)PidOutputAvg, DEC); Serial_csv(); SerialX.print(LidOpenResumeCountdown, DEC); }
static void printSciFloat(float f) { // This function could use a rework, it is pretty expensive // in terms of space and speed. char exponent = 0; bool neg = f < 0.0f; if (neg) f *= -1.0f; while (f < 1.0f && f != 0.0f) { --exponent; f *= 10.0f; } while (f >= 10.0f) { ++exponent; f /= 10.0f; } if (neg) f *= -1.0f; SerialX.print(f, 7); Serial_char('e'); SerialX.print(exponent, DEC); }