Example #1
0
static void reportConfig(void)
{
  reportVersion();
  reportPidParams();
  reportFanParams();
  reportProbeNames();
  reportProbeCoeffs();
  reportProbeOffsets();
  reportLidParameters();
  reportLcdParameters();
  reportAlarmLimits();
#ifdef HEATERMETER_RFM12
  reportRfMap();  
#endif /* HEATERMETER_RFM12 */
}
Example #2
0
static state_t menuLcdBacklight(button_t button)
{
  if (button == BUTTON_ENTER)
  {
    lcdprint_P(PSTR("LCD brightness"), true);
    editInt = g_LcdBacklight;
  }
  else if (button == BUTTON_LEAVE)
  {
    if (editInt != g_LcdBacklight)
    {
      storeLcdBacklight(editInt);
      reportLcdParameters();
    }
  }
  
  menuNumberEdit(button, 10, 0, 100, PSTR("%3d%%"));
  setLcdBacklight(0x80 | editInt);
  return ST_AUTO;
}
Example #3
0
static void handleCommandUrl(char *URL)
{
  unsigned char urlLen = strlen(URL);
  if (strncmp_P(URL, PSTR("set?sp="), 7) == 0) 
  {
    storeSetPoint(atoi(URL + 7));
    storePidUnits(URL[urlLen-1]);
  }
  else if (strncmp_P(URL, PSTR("set?lb="), 7) == 0)
  {
    csvParseI(URL + 7, storeLcdParam);
    reportLcdParameters();
  }
  else if (strncmp_P(URL, PSTR("set?ld="), 7) == 0)
  {
    csvParseI(URL + 7, storeLidParam);
    reportLidParameters();
  }
  else if (strncmp_P(URL, PSTR("set?po="), 7) == 0)
  {
    csvParseI(URL + 7, storeProbeOffset);
    reportProbeOffsets();
  }
  else if (strncmp_P(URL, PSTR("set?pid"), 7) == 0 && urlLen > 9)
  {
    float f = atof(URL + 9);
    storePidParam(URL[7], f);
    reportPidParams();
  }
  else if (strncmp_P(URL, PSTR("set?pn"), 6) == 0 && urlLen > 8)
  {
    // Store probe name will only store it if a valid probe number is passed
    storeAndReportProbeName(URL[6] - '0', URL + 8);
  }
  else if (strncmp_P(URL, PSTR("set?pc"), 6) == 0 && urlLen > 8)
  {
    storeProbeCoeff(URL[6] - '0', URL + 8);
  }
  else if (strncmp_P(URL, PSTR("set?al="), 7) == 0)
  {
    csvParseI(URL + 7, storeAlarmLimits);
    reportAlarmLimits();
  }
  else if (strncmp_P(URL, PSTR("set?fn="), 7) == 0)
  {
    csvParseI(URL + 7, storeFanParams);
    reportFanParams();
  }
  else if (strncmp_P(URL, PSTR("set?tt="), 7) == 0)
  {
    Menus.displayToast(URL+7);
  }
  else if (strncmp_P(URL, PSTR("set?tp="), 7) == 0)
  {
    csvParseI(URL + 7, setTempParam);
  }
  else if (strncmp_P(URL, PSTR("config"), 6) == 0)
  {
    reportConfig();
  }
  else if (strncmp_P(URL, PSTR("reboot"), 5) == 0)
  {
    reboot();
    // reboot doesn't return
  }
}