void mct_AdjustFan(uint8_t line, volatile long &pos, uint8_t arg) { limitEncoder(pos, 0, 255); FanSpeed = pos; analogWrite(FAN_PIN, FanSpeed); mct_Show(line, itostr3(pos)); }
static void mct_AdjustPid(uint8_t line, volatile long &pos, uint8_t which) { if (which == PID_P) { if (pos<1) pos=1; } else { if (pos<0) pos=0; } if (which == PID_C) { if (pos>990) pos=990; mct_Show(line, itostr3(pos)); } else { if (pos>9990) pos=9990; mct_Show(line, itostr4(pos)); } }
static void mct_ShowPid(uint8_t line, uint8_t which) { switch (which) { case PID_P: mct_Show(line, itostr4(Kp)); break; case PID_I: mct_Show(line, ftostr51(Ki/PID_dT)); break; case PID_D: mct_Show(line, itostr4(Kd*PID_dT)); break; case PID_C: mct_Show(line, itostr3(Kc)); break; default: break; } }
char *String::ftostr3(const float &x) { return itostr3((int)x); }
static void mct_AdjustFactor(uint8_t line, volatile long &pos, uint8_t arg) { limitEncoder(pos, 0, 99); mct_Show(line, itostr3(pos)); }
void mct_ShowNozzle(uint8_t line, uint8_t extruder) { mct_Show(line, itostr3(intround(degTargetHotend(extruder)))); }
void mct_AdjustTemp(uint8_t line, volatile long &pos, uint8_t arg) { limitEncoder(pos, 0, 260); mct_Show(line, itostr3(pos)); }
void mct_ShowFan(uint8_t line, uint8_t which) { mct_Show(line, itostr3(FanSpeed)); }
static void mp_AdjustPreheat(uint8_t line, volatile long &pos, uint8_t which) { if (which >= NUM_PARMS) return; limitEncoder(pos, 0, limit[which]); mp_Show(line, itostr3(pos)); }