Frästisch mit elektronischer Höhenverstellung mittels Schrittmotoren.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RouterSetup.h 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * RouterSetup.h
  3. *
  4. * Created on: 25.01.2022
  5. * Author: FSmilari
  6. */
  7. #ifndef ROUTER_SETUP_H_
  8. #define ROUTER_SETUP_H_
  9. #include <stdint.h>
  10. #include <Preferences.h>
  11. const static char ROUTER_NAMESPACE[] = "routerelv_stp";
  12. const static char SPEED[] = "speed";
  13. const static char ACCELERATION[] = "acceleration";
  14. const static char STEPSPERREV[] = "stepsPerRev";
  15. const static char PITCH[] = "pitch";
  16. const static char TOOLLENGHTSNHT[] = "toolLenghtSnHt";
  17. const static char ENCSPEEDSLOW[] = "encSpeedSlow";
  18. const static char ENCSPEEDFAST[] = "encSpeedFast";
  19. const static char LVLHEIGHTDIVE[] = "lvlHeightDive";
  20. const static char TOOLCHGONPWRON[] = "toolChgOnPwrOn";
  21. class RouterSetup {
  22. private:
  23. Preferences eeprom;
  24. float speed; // in revolutions/second (U/s)
  25. float accelleration; // in revolutions/second (U/s)
  26. uint16_t stepsPerRev; // micro stepping: 200 400 800 1600 3200 6400
  27. float pitch; // in mm
  28. float toolLenghtSensorHeight; // in mm
  29. uint8_t encoderSpeedSlow; // in 1/100 mm
  30. uint8_t encoderSpeedFast; // in 1/100 mm
  31. float levelHeightDiving; // in mm
  32. bool toolChangeOnPowerOn; // Yes or No
  33. public:
  34. const static int eeprom_start_adress = 0;
  35. const static int eeprom_signatur = 1024;
  36. const static uint8_t version = 1;
  37. float getSpeed() const;
  38. void setSpeed(float speed);
  39. float getAcceleration() const;
  40. void setAcceleration(float accelleration);
  41. uint8_t getEncoderSpeedFast() const;
  42. void setEncoderSpeedFast(uint8_t encoderSpeedFast);
  43. uint8_t getEncoderSpeedSlow() const;
  44. void setEncoderSpeedSlow(uint8_t encoderSpeedSlow);
  45. float getLevelHeightDiving() const;
  46. void setLevelHeightDiving(float levelHeightDiving);
  47. float getPitch() const;
  48. void setPitch(float pitch);
  49. uint16_t getStepsPerRev() const;
  50. void setStepsPerRev(uint16_t stepsPerRev);
  51. float getToolLenghtSensorHeight() const;
  52. void setToolLenghtSensorHeight(float toolLenghtSensorHeight);
  53. bool isToolChangOnPowerOn() const;
  54. void setToolChangOnPowerOn(bool toolChangOnPowerOn);
  55. void clear();
  56. void readFromEEPROM();
  57. void saveToEEPROM();
  58. void printValues();
  59. };
  60. #endif /* ROUTER_SETUP_H_ */