<commit_before>// HeaterMeter Copyright 2011 <NAME> <<EMAIL>> 
#include "hmcore.h"
#include "grillpid.h"
#include "strings.h"

static state_t menuHome(button_t button);
static state_t menuSetpoint(button_t button);
//static state_t menuProbename(button_t button);
static state_t menuProbeOffset(button_t button);
static state_t menuProbeSubmenu(button_t button);
static state_t menuLidOpenOff(button_t button);
static state_t menuLidOpenDur(button_t button);
static state_t menuManualMode(button_t button);
static state_t menuResetConfig(button_t button);
static state_t menuMaxFanSpeed(button_t button);
static state_t menuProbeAlarmOn(button_t button);
static state_t menuProbeAlarmVal(button_t button);
static state_t menuAlarmTriggered(button_t button);

#ifdef HEATERMETER_NETWORKING
static state_t menuConnecting(button_t button);
static state_t menuNetworkInfo(button_t button);
#endif  /* HEATERMETER_NETWORKING */

static const menu_definition_t MENU_DEFINITIONS[] PROGMEM = {
#ifdef HEATERMETER_NETWORKING
  { ST_CONNECTING, menuConnecting, 2 },
  { ST_NETWORK_INFO, menuNetworkInfo, 10 },
#endif  /* HEATERMETER_NETWORKING */
  { ST_HOME_FOOD1, menuHome, 5 },
  { ST_HOME_FOOD2, menuHome, 5 },
  { ST_HOME_AMB, menuHome, 5 },
  { ST_HOME_NOPROBES, menuHome, 1 },
  { ST_HOME_ALARM, menuAlarmTriggered, 0 },
  { ST_SETPOINT, menuSetpoint, 10 },
  { ST_MANUALMODE, menuManualMode, 10 },
  { ST_PROBESUB0, menuProbeSubmenu, 10 },
  { ST_PROBESUB1, menuProbeSubmenu, 10 },
  { ST_PROBESUB2, menuProbeSubmenu, 10 },
  { ST_PROBESUB3, menuProbeSubmenu, 10 },
//  { ST_PROBENAME1, menuProbename, 10 },
//  { ST_PROBENAME2, menuProbename, 10 },
//  { ST_PROBENAME3, menuProbename, 10 },
  { ST_PROBEOFF0, menuProbeOffset, 10 },
  { ST_PROBEOFF1, menuProbeOffset, 10 },
  { ST_PROBEOFF2, menuProbeOffset, 10 },
  { ST_PROBEOFF3, menuProbeOffset, 10 },
  { ST_LIDOPEN_OFF, menuLidOpenOff, 10 },
  { ST_LIDOPEN_DUR, menuLidOpenDur, 10 },
  { ST_RESETCONFIG, menuResetConfig, 10 },
  { ST_MAXFANSPEED, menuMaxFanSpeed, 10 },
  { ST_PALARM1_H_ON, menuProbeAlarmOn, 10 },
  { ST_PALARM1_H_VAL, menuProbeAlarmVal, 10 },
  { 0, 0 },
};

const menu_transition_t MENU_TRANSITIONS[] PROGMEM = {
#ifdef HEATERMETER_NETWORKING
  { ST_CONNECTING, BUTTON_TIMEOUT, ST_HOME_FOOD1 },
#endif  /* HEATERMETER_NETWORKING */
  { ST_HOME_FOOD1, BUTTON_DOWN | BUTTON_TIMEOUT, ST_HOME_FOOD2 },
  { ST_HOME_FOOD1, BUTTON_RIGHT,   ST_SETPOINT },
  { ST_HOME_FOOD1, BUTTON_UP,      ST_HOME_AMB },

  { ST_HOME_FOOD2, BUTTON_DOWN | BUTTON_TIMEOUT, ST_HOME_AMB },
  { ST_HOME_FOOD2, BUTTON_RIGHT,   ST_SETPOINT },
  { ST_HOME_FOOD2, BUTTON_UP,      ST_HOME_FOOD1 },

  { ST_HOME_AMB, BUTTON_DOWN | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_HOME_AMB, BUTTON_RIGHT,     ST_SETPOINT },
  { ST_HOME_AMB, BUTTON_UP,        ST_HOME_FOOD2 },

  { ST_HOME_NOPROBES, BUTTON_DOWN | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_HOME_NOPROBES, BUTTON_RIGHT,ST_SETPOINT },
  { ST_HOME_NOPROBES, BUTTON_UP,   ST_HOME_AMB },

  { ST_SETPOINT, BUTTON_LEFT | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_SETPOINT, BUTTON_RIGHT, ST_MANUALMODE },

  { ST_MANUALMODE, BUTTON_LEFT | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_MANUALMODE, BUTTON_RIGHT, ST_MAXFANSPEED },
  
  { ST_MAXFANSPEED, BUTTON_LEFT | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_MAXFANSPEED, BUTTON_RIGHT, ST_PROBEOFF1 },

  { ST_PROBEOFF1, BUTTON_LEFT | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_PROBEOFF1, BUTTON_RIGHT, ST_PROBEOFF2 },
  { ST_PROBEOFF2, BUTTON_LEFT | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_PROBEOFF2, BUTTON_RIGHT, ST_PROBEOFF3 },
  { ST_PROBEOFF3, BUTTON_LEFT | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_PROBEOFF3, BUTTON_RIGHT, ST_PROBEOFF0 },
  { ST_PROBEOFF0, BUTTON_LEFT | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_PROBEOFF0, BUTTON_RIGHT, ST_LIDOPEN_OFF },
  <commit_msg>[hm] Reorder probe offsets in the menu to be 0, 1, 2, 3<commit_after>// HeaterMeter Copyright 2011 <NAME> <<EMAIL>> 
#include "hmcore.h"
#include "grillpid.h"
#include "strings.h"

static state_t menuHome(button_t button);
static state_t menuSetpoint(button_t button);
//static state_t menuProbename(button_t button);
static state_t menuProbeOffset(button_t button);
static state_t menuProbeSubmenu(button_t button);
static state_t menuLidOpenOff(button_t button);
static state_t menuLidOpenDur(button_t button);
static state_t menuManualMode(button_t button);
static state_t menuResetConfig(button_t button);
static state_t menuMaxFanSpeed(button_t button);
static state_t menuProbeAlarmOn(button_t button);
static state_t menuProbeAlarmVal(button_t button);
static state_t menuAlarmTriggered(button_t button);

#ifdef HEATERMETER_NETWORKING
static state_t menuConnecting(button_t button);
static state_t menuNetworkInfo(button_t button);
#endif  /* HEATERMETER_NETWORKING */

static const menu_definition_t MENU_DEFINITIONS[] PROGMEM = {
#ifdef HEATERMETER_NETWORKING
  { ST_CONNECTING, menuConnecting, 2 },
  { ST_NETWORK_INFO, menuNetworkInfo, 10 },
#endif  /* HEATERMETER_NETWORKING */
  { ST_HOME_FOOD1, menuHome, 5 },
  { ST_HOME_FOOD2, menuHome, 5 },
  { ST_HOME_AMB, menuHome, 5 },
  { ST_HOME_NOPROBES, menuHome, 1 },
  { ST_HOME_ALARM, menuAlarmTriggered, 0 },
  { ST_SETPOINT, menuSetpoint, 10 },
  { ST_MANUALMODE, menuManualMode, 10 },
  { ST_PROBESUB0, menuProbeSubmenu, 10 },
  { ST_PROBESUB1, menuProbeSubmenu, 10 },
  { ST_PROBESUB2, menuProbeSubmenu, 10 },
  { ST_PROBESUB3, menuProbeSubmenu, 10 },
//  { ST_PROBENAME1, menuProbename, 10 },
//  { ST_PROBENAME2, menuProbename, 10 },
//  { ST_PROBENAME3, menuProbename, 10 },
  { ST_PROBEOFF0, menuProbeOffset, 10 },
  { ST_PROBEOFF1, menuProbeOffset, 10 },
  { ST_PROBEOFF2, menuProbeOffset, 10 },
  { ST_PROBEOFF3, menuProbeOffset, 10 },
  { ST_LIDOPEN_OFF, menuLidOpenOff, 10 },
  { ST_LIDOPEN_DUR, menuLidOpenDur, 10 },
  { ST_RESETCONFIG, menuResetConfig, 10 },
  { ST_MAXFANSPEED, menuMaxFanSpeed, 10 },
  { ST_PALARM1_H_ON, menuProbeAlarmOn, 10 },
  { ST_PALARM1_H_VAL, menuProbeAlarmVal, 10 },
  { 0, 0 },
};

const menu_transition_t MENU_TRANSITIONS[] PROGMEM = {
#ifdef HEATERMETER_NETWORKING
  { ST_CONNECTING, BUTTON_TIMEOUT, ST_HOME_FOOD1 },
#endif  /* HEATERMETER_NETWORKING */
  { ST_HOME_FOOD1, BUTTON_DOWN | BUTTON_TIMEOUT, ST_HOME_FOOD2 },
  { ST_HOME_FOOD1, BUTTON_RIGHT,   ST_SETPOINT },
  { ST_HOME_FOOD1, BUTTON_UP,      ST_HOME_AMB },

  { ST_HOME_FOOD2, BUTTON_DOWN | BUTTON_TIMEOUT, ST_HOME_AMB },
  { ST_HOME_FOOD2, BUTTON_RIGHT,   ST_SETPOINT },
  { ST_HOME_FOOD2, BUTTON_UP,      ST_HOME_FOOD1 },

  { ST_HOME_AMB, BUTTON_DOWN | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_HOME_AMB, BUTTON_RIGHT,     ST_SETPOINT },
  { ST_HOME_AMB, BUTTON_UP,        ST_HOME_FOOD2 },

  { ST_HOME_NOPROBES, BUTTON_DOWN | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_HOME_NOPROBES, BUTTON_RIGHT,ST_SETPOINT },
  { ST_HOME_NOPROBES, BUTTON_UP,   ST_HOME_AMB },

  { ST_SETPOINT, BUTTON_LEFT | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_SETPOINT, BUTTON_RIGHT, ST_MANUALMODE },

  { ST_MANUALMODE, BUTTON_LEFT | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_MANUALMODE, BUTTON_RIGHT, ST_MAXFANSPEED },
  
  { ST_MAXFANSPEED, BUTTON_LEFT | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_MAXFANSPEED, BUTTON_RIGHT, ST_PROBEOFF0 },

  { ST_PROBEOFF0, BUTTON_LEFT | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_PROBEOFF0, BUTTON_RIGHT, ST_PROBEOFF1 },
  { ST_PROBEOFF1, BUTTON_LEFT | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_PROBEOFF1, BUTTON_RIGHT, ST_PROBEOFF2 },
  { ST_PROBEOFF2, BUTTON_LEFT | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_PROBEOFF2, BUTTON_RIGHT, ST_PROBEOFF3 },
  { ST_PROBEOFF3, BUTTON_LEFT | BUTTON_TIMEOUT, ST_HOME_FOOD1 },
  { ST_PROBEOFF3, BUTTON_RIGHT, ST_LIDOPEN_OFF },
  
{'fraction_non_alphanumeric': 0.10125753209326696, 'fraction_numerical': 0.026198585276395073, 'mean_word_length': 5.656495204882302, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2990202', 'n_tokens_mistral': 3272, 'n_tokens_neox': 3123, 'n_words': 540}