Removed unused variables.

This commit is contained in:
2026-02-21 15:43:09 +01:00
parent c1bc52c5a3
commit 556c7888de
5 changed files with 87 additions and 123 deletions

View File

@@ -34,8 +34,6 @@ FastAccelStepper *g_pStepperRotate = NULL;
FastAccelStepper *g_pStepperPen = NULL;
// make Objects
// FastAccelStepper rotMotor(FastAccelStepper::DRIVER, step1, dir1);
// FastAccelStepper penMotor(FastAccelStepper::DRIVER, step2, dir2);
Servo penServo;
SerialCommand SCmd;
@@ -49,29 +47,28 @@ Button penToggle(penToggleButton, doTogglePen);
#ifdef motorsButton
Button motorsToggle(motorsButton, toggleMotors);
#endif
// Variables... be careful, by messing around here, everything has a reason and crossrelations...
int penMin = 0;
int penMax = 0;
int g_iPEN_UP_POS = 5; // can be overwritten from EBB-Command SC
int g_iPEN_DOWN_POS = 20; // can be overwritten from EBB-Command SC
int servoRateUp = 0; // from EBB-Protocol not implemented on machine-side
int servoRateDown = 0; // from EBB-Protocol not implemented on machine-side
long rotStepError = 0;
long penStepError = 0;
int penState = g_iPEN_UP_POS;
uint32_t nodeCount = 0;
unsigned int layer = 0;
boolean prgButtonState = 0;
uint8_t rotStepCorrection = 16 / rotMicrostep; // devide EBB-Coordinates by this factor to get EGGduino-Steps
uint8_t penStepCorrection = 16 / penMicrostep; // devide EBB-Coordinates by this factor to get EGGduino-Steps
float rotSpeed = 0;
float penSpeed = 0; // these are local variables for Function SteppermotorMove-Command, but for performance-reasons it will be initialized here
boolean motorsEnabled = 0;
int g_iPenUpPos = 5; // can be overwritten from EBB-Command SC
int g_iPenDownPos = 20; // can be overwritten from EBB-Command SC
int g_iServoRateUp = 0; // from EBB-Protocol not implemented on machine-side
int g_iServoRateDown = 0; // from EBB-Protocol not implemented on machine-side
long g_iRotStepError = 0;
long g_iPenStepError = 0;
int g_iPenState = g_iPenUpPos;
uint32_t g_uiNodeCount = 0;
unsigned int g_uiLayer = 0;
boolean g_bPrgButtonState = 0;
float fROT_STEP_CORRECTION = 16.0 / rotMicrostep; // devide EBB-Coordinates by this factor to get EGGduino-Steps
float fPEN_STEP_CORRECTION = 16.0 / penMicrostep; // devide EBB-Coordinates by this factor to get EGGduino-Steps
boolean g_bMotorsEnabled = 0;
// Stepper Test
#ifdef TEST
// #define dirPinStepper 16
// #define enablePinStepper 12
// #define stepPinStepper 26
#endif
void setup()
{
@@ -135,10 +132,11 @@ void loop()
}
Log("Alive");
}
#endif
#else
// moveOneStep();
SCmd.readSerial();
handleWebInterface();
#endif
#ifdef penToggleButton
penToggle.check();