<commit_before>/*
this is the advancing framework for lcd menus
 and hardware debounced buttons, Now includes Switch case tomfoolery/and other stuff
 */

#include <SerialLCD.h>
#include <SoftwareSerial.h> //this is a must


SerialLCD slcd(11,12); //Initialize the lcd lib.

const int inPin1 = 4; //right red button,  schmit I/O 4
const int inPin2 = 5; //left red button, I/O 5
const int inPin3 = 7; //green menu button, I/O 1
const int inPin4 = 6; //yellow enter button, I/O 2
const int inPin5 = 8; //left limit switch. I/O 6.
const int inPin6 = 9; //right limit switch, I/O 3.

boolean menuButtonPressed = false;  //button states
boolean menuBefore = false;         //**
boolean leftButtonPressed = false;  //**
boolean leftBefore = false;         //**
boolean RightButtonPressed = false; //**
boolean rightBefore = false;        //end button states.

int loopCounter = 0; //Loop counter to refresh screen.
unsigned long lcdUpdate;
unsigned long lastLcdUpdate;

int menuMode = 0; //Initialize the controller in setup mode.

//measurement variables.
unsigned int targetSteps = 32; //inital target for slew mode and setup mode.

int stepIncrements = 0;
int stepMultiplier = 1;

void setup() { //int yer inpins
  pinMode(inPin1, INPUT); 
  pinMode(inPin2, INPUT);
  pinMode(inPin3, INPUT);
  pinMode(inPin4, INPUT);
  pinMode(inPin5, INPUT);
  pinMode(inPin6, INPUT);
  Serial.begin(9600);
  slcd.begin();
  slcd.backlight();
}

void loop() { //high speed code goes here
if 
mainMenu();
}

void mainMenu() { //this is the overall menu controller
	int inputLeft = digitalRead(inPin2);
	int inputRight = digitalRead(inPin1);
	int menuButton = digitalRead(inPin3);
	int enterButton = digitalRead(inPin4);

  if (menuButton == HIGH){
    noClear();
    menuMode++;
    delay(50);
		
  }
  if (menuMode == 3) {
    menuMode = 0; 
  } 

  switch (menuMode) {
  case 1:
    jogMenuMode();
    break;
  case 2:<commit_msg>Derp, remove errant if.<commit_after>/*
this is the advancing framework for lcd menus
 and hardware debounced buttons, Now includes Switch case tomfoolery/and other stuff
 */

#include <SerialLCD.h>
#include <SoftwareSerial.h> //this is a must


SerialLCD slcd(11,12); //Initialize the lcd lib.

const int inPin1 = 4; //right red button,  schmit I/O 4
const int inPin2 = 5; //left red button, I/O 5
const int inPin3 = 7; //green menu button, I/O 1
const int inPin4 = 6; //yellow enter button, I/O 2
const int inPin5 = 8; //left limit switch. I/O 6.
const int inPin6 = 9; //right limit switch, I/O 3.

boolean menuButtonPressed = false;  //button states
boolean menuBefore = false;         //**
boolean leftButtonPressed = false;  //**
boolean leftBefore = false;         //**
boolean RightButtonPressed = false; //**
boolean rightBefore = false;        //end button states.

int loopCounter = 0; //Loop counter to refresh screen.
unsigned long lcdUpdate;
unsigned long lastLcdUpdate;

int menuMode = 0; //Initialize the controller in setup mode.

//measurement variables.
unsigned int targetSteps = 32; //inital target for slew mode and setup mode.

int stepIncrements = 0;
int stepMultiplier = 1;

void setup() { //int yer inpins
  pinMode(inPin1, INPUT); 
  pinMode(inPin2, INPUT);
  pinMode(inPin3, INPUT);
  pinMode(inPin4, INPUT);
  pinMode(inPin5, INPUT);
  pinMode(inPin6, INPUT);
  Serial.begin(9600);
  slcd.begin();
  slcd.backlight();
}

void loop() { //high speed code goes here
mainMenu();
}

void mainMenu() { //this is the overall menu controller
	int inputLeft = digitalRead(inPin2);
	int inputRight = digitalRead(inPin1);
	int menuButton = digitalRead(inPin3);
	int enterButton = digitalRead(inPin4);

  if (menuButton == HIGH){
    noClear();
    menuMode++;
    delay(50);
		
  }
  if (menuMode == 3) {
    menuMode = 0; 
  } 

  switch (menuMode) {
  case 1:
    jogMenuMode();
    break;
  case 2:
{'fraction_non_alphanumeric': 0.11801566579634465, 'fraction_numerical': 0.025065274151436032, 'mean_word_length': 3.3983926521239955, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3933734', 'n_tokens_mistral': 1354, 'n_tokens_neox': 1275, 'n_words': 447}