Browse Source

Optimized display refresh rate

master
Flo Smilari 3 years ago
parent
commit
a0533b9132
5 changed files with 130 additions and 239 deletions
  1. 27
    12
      Display.cpp
  2. 2
    0
      Display.h
  3. 44
    211
      Fraestisch_SFTools.ino
  4. 55
    15
      RouterSetup.cpp
  5. 2
    1
      sloeber.ino.cpp

+ 27
- 12
Display.cpp View File

#include "Display.h" #include "Display.h"
/***************** /*****************
** Constructors. ** Constructors.
****************/ ****************/
wlsConnected = false; wlsConnected = false;
angle = 0; angle = 0;
starttime = millis(); starttime = millis();
refreshScreen = true;
} }
/****************** /******************
} }
void Display::display() { void Display::display() {
ssd1306.display();
if (refreshScreen) {
refreshScreen = false;
ssd1306.display();
}
} }
void Display::clearDisplay() { void Display::clearDisplay() {
for (int i = 0; i < 6; i++) { for (int i = 0; i < 6; i++) {
g = &gauge[0]; g = &gauge[0];
u8g2_gfx.print(g); u8g2_gfx.print(g);
setRefreshScreen();
display(); display();
delay(500); delay(500);
if (i < 4) { if (i < 4) {
} }
} }
void Display::showFrame(Status status) { void Display::showFrame(Status status) {
switch (status) { switch (status) {
case MOVING_ELEVATOR: case MOVING_ELEVATOR:
case CONFIGURATION: case CONFIGURATION:
redrawFrame(); redrawFrame();
ssd1306.drawLine(37, SCREEN_HEIGHT / 2 - 1, SCREEN_WIDTH - 1, SCREEN_HEIGHT / 2 - 1, SSD1306_WHITE); ssd1306.drawLine(37, SCREEN_HEIGHT / 2 - 1, SCREEN_WIDTH - 1, SCREEN_HEIGHT / 2 - 1, SSD1306_WHITE);
drawStatusText (STATUS_TXT_CFG);
drawStatusText(STATUS_TXT_CFG);
drawConfigText(this->configText); drawConfigText(this->configText);
drawConfigOption(this->configOption); drawConfigOption(this->configOption);
break; break;
drawStatusText(STATUS_TXT_IDLE); drawStatusText(STATUS_TXT_IDLE);
break; break;
case NULLING: case NULLING:
case NULLING_TLS:
case NULLING_TLS:
redrawFrame(); redrawFrame();
drawStatusText(STATUS_TXT_NULLING); drawStatusText(STATUS_TXT_NULLING);
drawBitmap(37 + (SCREEN_WIDTH - 37 - imageSide) / 2, (SCREEN_HEIGHT - imageSide) / 2, imageSide, imageSide, epd_bitmap_Nulling); drawBitmap(37 + (SCREEN_WIDTH - 37 - imageSide) / 2, (SCREEN_HEIGHT - imageSide) / 2, imageSide, imageSide, epd_bitmap_Nulling);
} }
void Display::setConfigOption(const String &configOption) { void Display::setConfigOption(const String &configOption) {
this->configOption = configOption;
if (!this->configOption.equals(configOption)) {
this->configOption = configOption;
setRefreshScreen();
}
} }
const String& Display::getConfigText() const { const String& Display::getConfigText() const {
return configText; return configText;
} }
void Display::setWlsConnected(bool wlsConnected) {
this->wlsConnected = wlsConnected;
void Display::setConfigText(const String &configText) {
if (!this->configText.equals(configText)) {
this->configText = configText;
setRefreshScreen();
}
} }
void Display::setConfigText(const String &configText) {
this->configText = configText;
void Display::setWlsConnected(bool wlsConnected) {
if (this->wlsConnected != wlsConnected) {
this->wlsConnected = wlsConnected;
setRefreshScreen();
}
} }
void Display::drawWLSStatus() { void Display::drawWLSStatus() {
u8g2_gfx.println(F(s)); u8g2_gfx.println(F(s));
} }
/******************************** /********************************
** Private methods ** Private methods
*******************************/ *******************************/
u8g2_gfx.println(F(s)); u8g2_gfx.println(F(s));
} }
void Display::drawBitmap(int x, int y, int w, int h, const uint8_t bitmap[]) { void Display::drawBitmap(int x, int y, int w, int h, const uint8_t bitmap[]) {
ssd1306.drawBitmap(x, y, bitmap, w, h, SSD1306_WHITE); ssd1306.drawBitmap(x, y, bitmap, w, h, SSD1306_WHITE);
} }
drawBitmap((37 - imageSide_R) / 2, 30, imageSide_R, imageSide_R, epd_rotate_bitmap_allArray[angle]); drawBitmap((37 - imageSide_R) / 2, 30, imageSide_R, imageSide_R, epd_rotate_bitmap_allArray[angle]);
angle = (angle + 1) % 8; angle = (angle + 1) % 8;
starttime = millis(); starttime = millis();
setRefreshScreen();
display();
} }
} }
void Display::setRefreshScreen() {
refreshScreen = true;
}

+ 2
- 0
Display.h View File

String configText; String configText;
String configOption; String configOption;
bool wlsConnected; bool wlsConnected;
bool refreshScreen;
int angle; int angle;
unsigned long starttime; unsigned long starttime;
const String& getConfigText() const; const String& getConfigText() const;
void setConfigText(const String &configText); void setConfigText(const String &configText);
void setWlsConnected(bool wlsConnected); void setWlsConnected(bool wlsConnected);
void setRefreshScreen();
}; };
#endif /* DISPLAY_H_ */ #endif /* DISPLAY_H_ */

+ 44
- 211
Fraestisch_SFTools.ino View File

Status originStatus; Status originStatus;
String oldStatus = ""; String oldStatus = "";


//********************* Rotary test **************

long TimeOfLastDebounce = 0;
long DelayofDebounce = 5;

// Store previous Pins state
int PreviousCLK;
int PreviousDATA;

int displaycounter = 0; // Store current counter value
volatile boolean TurnDetected;


void printStatus(String actualStatus) { void printStatus(String actualStatus) {
if (!oldStatus.equals(actualStatus)) { if (!oldStatus.equals(actualStatus)) {
Serial.println(actualStatus); Serial.println(actualStatus);
} }


if (Router_Setup.isToolChangOnPowerOn()) { if (Router_Setup.isToolChangOnPowerOn()) {
actualStatus = TOOL_CHANGE;
SetActualStatus(TOOL_CHANGE);
} else { } else {
actualStatus = IDLE;
SetActualStatus(IDLE);
} }
} }


//********************** //**********************
void setup() { void setup() {


actualStatus = INITIALIZATION;
SetActualStatus(INITIALIZATION);


Wire.begin(SDA, SCX); Wire.begin(SDA, SCX);


pinMode(GreenBtn_Pin, INPUT); pinMode(GreenBtn_Pin, INPUT);
pinMode(RedBtn_Pin, INPUT); pinMode(RedBtn_Pin, INPUT);
pinMode(BlueBtn_Pin, INPUT); pinMode(BlueBtn_Pin, INPUT);
pinMode(RotEnc_Switch_Pin, INPUT);
pinMode(RotEnc_Clk_Pin, INPUT);
pinMode(RotEnc_Dta_Pin, INPUT);
pinMode(RotEnc_Switch_Pin, INPUT_PULLUP);
// pinMode(RotEnc_Clk_Pin, INPUT_PULLUP);
// pinMode(RotEnc_Dta_Pin, INPUT_PULLUP);
pinMode(LIMIT_SWITCH, INPUT); pinMode(LIMIT_SWITCH, INPUT);


RedButton.setDebounceTime(50); // set debounce time to 50 millis RedButton.setDebounceTime(50); // set debounce time to 50 millis
RotaryControler.setDebounceTime(50); RotaryControler.setDebounceTime(50);


delay(1500); delay(1500);
Display.setRefreshScreen();
Display.showBrand(); Display.showBrand();
delay(1500); delay(1500);
Display.setRefreshScreen();
Initialize(); Initialize();
} }


originStatus = TOOL_CHANGE; originStatus = TOOL_CHANGE;
if (intermediateState == 0) { if (intermediateState == 0) {
Router_Elevator.moveToUpperLimitSwitch(); Router_Elevator.moveToUpperLimitSwitch();
actualStatus = MOVING_ELEVATOR;
SetActualStatus(MOVING_ELEVATOR);
intermediateState = 1; intermediateState = 1;
} else if (intermediateState == 1) { } else if (intermediateState == 1) {
if (RotaryControler.isSwitchLongPressed()) { if (RotaryControler.isSwitchLongPressed()) {
actualStatus = CONFIGURATION;
SetActualStatus(CONFIGURATION);
intermediateState = 0; intermediateState = 0;
} else if (BlueButton.isPressed()) { } else if (BlueButton.isPressed()) {
actualStatus = IDLE;
SetActualStatus(IDLE);
intermediateState = 0; intermediateState = 0;
} }
} }
Router_Setup.onRotaryControlerSwitch(); Router_Setup.onRotaryControlerSwitch();
} else if (RotaryControler.isSwitchLongPressed()) { } else if (RotaryControler.isSwitchLongPressed()) {
Router_Setup.onRotaryControlerLongSwitch(); Router_Setup.onRotaryControlerLongSwitch();
actualStatus = INITIALIZATION;
SetActualStatus(INITIALIZATION);
} else if (BlueButton.isPressed()) { } else if (BlueButton.isPressed()) {
actualStatus = IDLE;
SetActualStatus(IDLE);
} }
break; break;


printStatus("NULLING"); printStatus("NULLING");
if (RedButton.isPressed()) { if (RedButton.isPressed()) {
Router_Elevator.setZeroPosition(); Router_Elevator.setZeroPosition();
actualStatus = IDLE;
SetActualStatus(IDLE);
} }
break; break;


printStatus("NULLING_TLS,0"); printStatus("NULLING_TLS,0");
//Move elevator to lowest point (lower limit switch triggers) //Move elevator to lowest point (lower limit switch triggers)
Router_Elevator.moveToLowerLimitSwitch(); Router_Elevator.moveToLowerLimitSwitch();
actualStatus = MOVING_ELEVATOR;
SetActualStatus(MOVING_ELEVATOR);
intermediateState = 1; intermediateState = 1;
} else if (intermediateState == 1) { } else if (intermediateState == 1) {
printStatus("NULLING_TLS,1"); printStatus("NULLING_TLS,1");
if (RedButton.isPressed()) { if (RedButton.isPressed()) {
//Move elevator until it touch the TLS (WLS_PIN goes HIGH) //Move elevator until it touch the TLS (WLS_PIN goes HIGH)
Router_Elevator.moveToUpperLimitSwitch(); Router_Elevator.moveToUpperLimitSwitch();
actualStatus = MOVING_ELEVATOR;
SetActualStatus(MOVING_ELEVATOR);
intermediateState = 2; intermediateState = 2;
} }
} else if (intermediateState == 2) { } else if (intermediateState == 2) {
Router_Elevator.clearLimitSwitch(); Router_Elevator.clearLimitSwitch();
Router_Elevator.moveRelativeInMillimeters(Router_Setup.getToolLenghtSensorHeight() * MOVE_DOWNWARD); Router_Elevator.moveRelativeInMillimeters(Router_Setup.getToolLenghtSensorHeight() * MOVE_DOWNWARD);
Serial.println(String(Router_Setup.getToolLenghtSensorHeight() * MOVE_DOWNWARD, 2)); Serial.println(String(Router_Setup.getToolLenghtSensorHeight() * MOVE_DOWNWARD, 2));
actualStatus = MOVING_ELEVATOR;
SetActualStatus(MOVING_ELEVATOR);
intermediateState = 3; intermediateState = 3;
} else { // nullingTLS_intermediateState is 3 } else { // nullingTLS_intermediateState is 3
printStatus("NULLING_TLS,3"); printStatus("NULLING_TLS,3");
//Set the 0-Position as actual position //Set the 0-Position as actual position
Router_Elevator.setZeroPosition(); Router_Elevator.setZeroPosition();
actualStatus = IDLE;
SetActualStatus(IDLE);
intermediateState = 0; intermediateState = 0;
} }
break; break;
printStatus("IDLE"); printStatus("IDLE");
if (RedButton.isLongPressed()) { if (RedButton.isLongPressed()) {
if (WlsDetect.isConnected()) { if (WlsDetect.isConnected()) {
actualStatus = NULLING_TLS;
SetActualStatus(NULLING_TLS);
} else { } else {
actualStatus = NULLING;
SetActualStatus(NULLING);
} }
} else if (BlueButton.isLongPressed()) { } else if (BlueButton.isLongPressed()) {
actualStatus = TOOL_CHANGE;
SetActualStatus(TOOL_CHANGE);
} }
break; break;


printStatus("MOVING_ELEVATOR"); printStatus("MOVING_ELEVATOR");
if (Router_Elevator.isLimitSwitchTriggerd()) { if (Router_Elevator.isLimitSwitchTriggerd()) {
delay(200); delay(200);
actualStatus = RELEASE_SWITCH;
SetActualStatus(RELEASE_SWITCH);
} else { // limitSwitchState is HIGH } else { // limitSwitchState is HIGH
if (Router_Elevator.isTargetPositionReached()) { if (Router_Elevator.isTargetPositionReached()) {
actualStatus = originStatus;
SetActualStatus(originStatus);
delay(200); delay(200);
} else if (Router_Elevator.isWLSTriggerd()) { } else if (Router_Elevator.isWLSTriggerd()) {
actualStatus = originStatus;
SetActualStatus(originStatus);
delay(200); delay(200);
} }
Router_Elevator.clearLimitSwitch(); Router_Elevator.clearLimitSwitch();
if (Router_Elevator.isLimitSwitchTriggerd()) { if (Router_Elevator.isLimitSwitchTriggerd()) {
Router_Elevator.tryReleaseLimitSwitch(); Router_Elevator.tryReleaseLimitSwitch();
} else { } else {
actualStatus = originStatus;
SetActualStatus(originStatus);
} }
break; break;


default: default:
break; break;
} }

//*********************** OLD EXAMPLE AND EXPERIMENTAL CODE ************************************

// if (WlsDetect.isPlugged()) {
// Serial.println("The WLS was connected");
// } else if (WlsDetect.isUnplugged()) {
// Serial.println("The WLS was disconnected");
// }
//
// if (WlsDetect.getStateRaw() == HIGH) {
// if (Wls.isPlugged()) {
// Serial.println("The Tool is away from WLS");
// } else if (Wls.isUnplugged()) {
// Serial.println("The Tool touched the WLS");
// }
// }
//
// if (RedButton.isPressed()) {
// Serial.println("Red button was pressed");
// digitalWrite(led_gpio, HIGH);
// Serial.print("Limit Switch: ");
// Serial.println(digitalRead(LIMIT_SWITCH) ? "HIGH" : "LOW");
// }
//
// if (RedButton.isLongPressed()) {
// Serial.println("Red button was long pressed");
// digitalWrite(led_gpio, LOW);
// }
//
// bool greenPressed = GreenButton.isPressed();
// bool bluePressed = BlueButton.isPressed();
//
// if (GreenButton.isPressing() && BlueButton.isPressing()) {
// Serial.println("Blue and green button were simultaneous pressed");
// } else if (greenPressed) {
// Serial.println("Green button was pressed");
// } else if (bluePressed) {
// Serial.println("Blue button was pressed");
// }
//
// if (RotarySwitch.isPressed()) {
// Serial.println("Rotary switch was pressed");
// }
// if (RotarySwitch.isLongPressed()) {
// Serial.println("Rotary switch long was pressed");
// }
//
// static int pos = 0;
//RotaryControler.tick();
//int newPos = RotaryControler.getPosition();
// if (pos != newPos) {
// Serial.print("pos:");
// Serial.print(newPos);
// Serial.print(" dir:");
// Serial.println((int) (RotaryControler.getDirection()));
// pos = newPos;
// }

// if (limitSwitchState == LOW) {
// stepper.setLimitSwitchActive(stepper.LIMIT_SWITCH_COMBINED_BEGIN_AND_END); // this will cause to stop any motion that is currently going on and block further movement in the same direction as long as the switch is agtive
// } else {
// stepper.clearLimitSwitchActive(); // clear the limit switch flag to allow movement in both directions again
// }
//
// if (limitSwitchState == HIGH && stepper.getDistanceToTargetSigned() == 0) {
// delay(100);
// previousDirection *= -1;
// long relativeTargetPosition = DISTANCE_TO_TRAVEL_IN_STEPS * previousDirection;
// Serial.printf("Moving stepper by %ld steps\n", relativeTargetPosition);
// stepper.setTargetPositionRelativeInSteps(relativeTargetPosition);
// }

} }


//void testdrawchar(void) {
// OLED.clearDisplay();
//
// OLED.setTextSize(1); // Normal 1:1 pixel scale
// OLED.setTextColor(SSD1306_WHITE); // Draw white text
// OLED.setCursor(0, 0); // Start at top-left corner
// OLED.cp437(true); // Use full 256 char 'Code Page 437' font
//
// // Not all the characters will fit on the Display. This is normal.
// // Library will draw what it can and the rest will be clipped.
// for (int16_t i = 0; i < 256; i++) {
// if (i == '\n')
// OLED.write(' ');
// else
// OLED.write(i);
// }
//
// OLED.display();
// delay(2000);
//}
//
//void testdrawstyles(void) {
// OLED.clearDisplay();

// Display.setFont(&Rubik_Regular8pt7b);
// Display.setTextSize(1); // Normal 1:1 pixel scale
// Display.setTextColor(SSD1306_WHITE); // Draw white text
// Display.setCursor(0, 8); // Start at top-left corner
// Display.println(F("Hello, world!"));
//
// Display.setFont(&Rubik_Regular12pt7b);
// Display.setTextSize(1); // Normal 1:1 pixel scale
// Display.setTextColor(SSD1306_WHITE); // Draw white text
// Display.setCursor(0, 24); // Start at top-left corner
// Display.println(F("Hello, world!"));

// Display.drawRect(0, 15, 128, 13, SSD1306_WHITE);

// Display.setFont(&Rubik_Regular24pt7b);
// Display.setTextSize(1); // Normal 1:1 pixel scale
// Display.setTextColor(SSD1306_WHITE); // Draw white text
// Display.setCursor(0, 55); // Start at top-left corner
// Display.println(F("Hello, world!"));
//
// Display.display();
// delay(2000);
//
// Display.clearDisplay();

// char decimals[3];
// uint16_t w = 0, h = 0;
// for (int i = 0; i <= 99; i++) {
// OLED.clearDisplay();
// OLED.drawRect(0, 0, 128, 64, SSD1306_WHITE);
// OLED.setFont(&titillium_web_semibold30pt7b);
// OLED.setTextSize(1); // Normal 1:1 pixel scale
// OLED.setTextColor(SSD1306_WHITE); // Draw white text
// sprintf(decimals, "%02d", i);
// if (i < 33) {
// calculateWH("99.", w, h);
// OLED.setCursor((SCREEN_WIDTH / 2 - 1) - w, SCREEN_HEIGHT / 2 + h / 2);
// OLED.print("99.");
// } else if (i >= 33 && i < 66) {
// calculateWH("01.", w, h);
// OLED.setCursor((SCREEN_WIDTH / 2 - 1) - w, SCREEN_HEIGHT / 2 + h / 2);
// OLED.print("01.");
// } else {
// calculateWH("55.", w, h);
// OLED.setCursor((SCREEN_WIDTH / 2 - 1) - w, SCREEN_HEIGHT / 2 + h / 2);
// OLED.print("55.");
// }
// OLED.println(decimals);
// OLED.display();
// delay(100);
// }

// Display.setFont(&Rubik_Regular30pt7b);
// Display.setTextSize(1); // Normal 1:1 pixel scale
// Display.setTextColor(SSD1306_WHITE); // Draw white text
// Display.setCursor(0, 55); // Start at top-left corner
// Display.println(F("99.99"));
//
// Display.display();
// delay(1000);
//
// Display.clearDisplay();
//
// Display.setFont(&Rubik_Regular30pt7b);
// Display.setTextSize(1); // Normal 1:1 pixel scale
// Display.setTextColor(SSD1306_WHITE); // Draw white text
// Display.setCursor(0, 55); // Start at top-left corner
// Display.println(F("01.11"));

// Display.setTextColor(SSD1306_BLACK, SSD1306_WHITE); // Draw 'inverse' text
// Display.println("3.141592");
//
// Display.setTextSize(2); // Draw 2X-scale text
// Display.setTextColor(SSD1306_WHITE);
// Display.print(F("0x"));
// Display.println(0xDEADBEEF, HEX);
//
// OLED.display();
// delay(2000);
//}

//void calculateWH(String units, uint16_t &w, uint16_t &h) {
// int x = 0;
// int y = 0;
// int16_t x1, y1;
// uint16_t w1, h1;
//
// OLED.getTextBounds(units, x, y, &x1, &y1, &w1, &h1);
// w = w1;
// h = h1;
//}

void SetActualStatus(Status newStatus) {
if (actualStatus != newStatus) {
actualStatus = newStatus;
Display.setRefreshScreen();
}
}

+ 55
- 15
RouterSetup.cpp View File

** Constructors ** Constructors
*****************/ *****************/
RouterSetup::RouterSetup(Display &_display) : display(_display) { RouterSetup::RouterSetup(Display &_display) : display(_display) {
this->doInitialization = true;
this->configStepIndex = 0;
doInitialization = true;
configStepIndex = 0;
} }
/****************** /******************
setSpeed(eeprom.getFloat(SPEED, 1.0)); setSpeed(eeprom.getFloat(SPEED, 1.0));
setAcceleration(eeprom.getFloat(ACCELERATION, 1.0)); setAcceleration(eeprom.getFloat(ACCELERATION, 1.0));
setStepsPerRev(eeprom.getUInt(STEPSPERREV, 1600)); setStepsPerRev(eeprom.getUInt(STEPSPERREV, 1600));
setPitch(eeprom.getInt(PITCH, 3.0));
setPitch(eeprom.getFloat(PITCH, 3.0));
setToolLenghtSensorHeight(eeprom.getFloat(TOOLLENGHTSNHT, 10.0)); setToolLenghtSensorHeight(eeprom.getFloat(TOOLLENGHTSNHT, 10.0));
setEncoderSpeedSlow(eeprom.getInt(ENCSPEEDSLOW, 1)); setEncoderSpeedSlow(eeprom.getInt(ENCSPEEDSLOW, 1));
setEncoderSpeedFast(eeprom.getInt(ENCSPEEDFAST, 20)); setEncoderSpeedFast(eeprom.getInt(ENCSPEEDFAST, 20));
eeprom.putFloat(SPEED, getSpeed()); eeprom.putFloat(SPEED, getSpeed());
eeprom.putFloat(ACCELERATION, getAcceleration()); eeprom.putFloat(ACCELERATION, getAcceleration());
eeprom.putUInt(STEPSPERREV, getStepsPerRev()); eeprom.putUInt(STEPSPERREV, getStepsPerRev());
eeprom.putInt(PITCH, getPitch());
eeprom.putFloat(PITCH, getPitch());
eeprom.putFloat(TOOLLENGHTSNHT, getToolLenghtSensorHeight()); eeprom.putFloat(TOOLLENGHTSNHT, getToolLenghtSensorHeight());
eeprom.putInt(ENCSPEEDSLOW, getEncoderSpeedSlow()); eeprom.putInt(ENCSPEEDSLOW, getEncoderSpeedSlow());
eeprom.putInt(ENCSPEEDFAST, getEncoderSpeedFast()); eeprom.putInt(ENCSPEEDFAST, getEncoderSpeedFast());
option.trim(); option.trim();
display.setConfigText(stepTxt); display.setConfigText(stepTxt);
display.setConfigOption(option); display.setConfigOption(option);
this->doInitialization = false;
doInitialization = false;
} }
} }
} }
void RouterSetup::onRotaryControlerLongSwitch() { void RouterSetup::onRotaryControlerLongSwitch() {
saveToEEPROM(); saveToEEPROM();
this->doInitialization = true;
doInitialization = true;
} }
void RouterSetup::onRotaryControlerTurn(RotaryEncoder::Direction turn) { void RouterSetup::onRotaryControlerTurn(RotaryEncoder::Direction turn) {
switch (turn) {
case RotaryEncoder::Direction::CLOCKWISE:
break;
case RotaryEncoder::Direction::COUNTERCLOCKWISE:
break;
default:
break;
}
if (turn != RotaryEncoder::Direction::NOROTATION) {
String value = "";
int sign = (turn == RotaryEncoder::Direction::CLOCKWISE) ? 1 : -1;
String unit = getCfgOptUnitForStepIndex(configStepIndex);
switch (configStepIndex) {
case 0:
setSpeed(getSpeed() + 0.1 * sign);
value = String(getSpeed(), 1);
break;
case 1:
setAcceleration(getAcceleration() + 0.1 * sign);
value = String(getAcceleration(), 1);
break;
case 2:
setStepsPerRev(getStepsPerRev() + 1 * sign);
value = String(getStepsPerRev());
break;
case 3:
setPitch(getPitch() + 0.1 * sign);
value = String(getPitch(), 1);
break;
case 4:
setToolLenghtSensorHeight(getToolLenghtSensorHeight() + 0.01 * sign);
value = String(getToolLenghtSensorHeight(), 2);
break;
case 5:
setEncoderSpeedSlow(getEncoderSpeedSlow() + 1 * sign);
value = String(getEncoderSpeedSlow());
break;
case 6:
setEncoderSpeedFast(getEncoderSpeedFast() + 1 * sign);
value = String(getEncoderSpeedFast());
break;
case 7:
setLevelHeightDiving(getLevelHeightDiving() + 0.1 * sign);
value = String(getLevelHeightDiving(), 1);
break;
case 8:
setToolChangOnPowerOn(sign > 0 ? true : false);
value = isToolChangOnPowerOn() ? "JA" : "NEIN";
break;
default:
break;
}
display.setConfigOption(value + " " + unit);
}
} }
String RouterSetup::getCfgOptForStepIndex(byte configStepIndex) { String RouterSetup::getCfgOptForStepIndex(byte configStepIndex) {

+ 2
- 1
sloeber.ino.cpp View File

//This is a automatic generated file //This is a automatic generated file
//Please do not modify this file //Please do not modify this file
//If you touch this file your change will be overwritten during the next build //If you touch this file your change will be overwritten during the next build
//This file has been generated on 2022-02-15 23:07:21
//This file has been generated on 2022-02-21 23:07:49


#include "Arduino.h" #include "Arduino.h"
#include <Arduino.h> #include <Arduino.h>
void Initialize() ; void Initialize() ;
void setup() ; void setup() ;
void loop() ; void loop() ;
void SetActualStatus(Status newStatus) ;


#include "Fraestisch_SFTools.ino" #include "Fraestisch_SFTools.ino"



Loading…
Cancel
Save