Advertisement
Guest User

Untitled

a guest
Dec 26th, 2020
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.52 KB | None | 0 0
  1. /*
  2. * This Configuration file contains basic settings. Use Configuration_adv for
  3. * more advanced adjustments!
  4. */
  5. #pragma once
  6.  
  7. #include "Constants.hpp"
  8.  
  9. /**
  10. * We support local configurations so that you can setup it up once with your hardware and pinout
  11. * and not need to worry about a new version from Git overwriting your setup.
  12. * There are multiple ways to define a local config file:
  13. * - For all boards/hardware configs
  14. * Create a file called configuration_local.hpp (best to copy configuration_sample_local.hpp and
  15. * change it as needed)
  16. * - Specific to a board
  17. * Create a file called configuration_local_<board>.hpp, where <board> is either 'mega' or
  18. * 'esp32' or (here, too, best to copy Configuration_sample_local.hpp and change it as needed).
  19. * The code automatically picks the right one at compile time. This is useful if you are
  20. * developer or just have multiple OATs.
  21. * - Specific to a hardware config
  22. * Create a file called configuration_local_<foo>.hpp, where <foo> is whatever you want to use
  23. * to identify that setup. Then uncomment the lines 45 and 46 below. This is useful if have
  24. * multiple OATs.
  25. *
  26. * These files won't be tracked by Git and thus will remain after branch changes or code updates.
  27. **/
  28.  
  29. #if defined(ESP32) && __has_include("Configuration_local_esp32.hpp") // ESP32
  30. #include "Configuration_local_esp32.hpp"
  31. #elif defined(__AVR_ATmega2560__) && __has_include("Configuration_local_mega.hpp") // Mega2560
  32. #include "Configuration_local_mega.hpp"
  33. #elif __has_include("Configuration_local.hpp") // Custom config
  34. #include "Configuration_local.hpp"
  35. #endif
  36.  
  37. // Set to 1 for the northern hemisphere, 0 otherwise
  38. #ifndef NORTHERN_HEMISPHERE
  39. #define NORTHERN_HEMISPHERE 1
  40. #endif
  41.  
  42. // Used display
  43. #ifndef DISPLAY_TYPE
  44. #define DISPLAY_TYPE DISPLAY_TYPE_LCD_KEYPAD
  45. #endif
  46.  
  47. // Used RA wheel version. Unless you printed your OAT before March 2020, you're using
  48. // a version 2 or higher (software only differentiates between 1 and more than 1)
  49. #ifndef RA_WHEEL_VERSION
  50. #define RA_WHEEL_VERSION 4
  51. #endif
  52.  
  53. // Stepper types/models. See supported stepper values. Change according to the steppers you are using
  54. #ifndef RA_STEPPER_TYPE
  55. #define RA_STEPPER_TYPE STEPPER_TYPE_NEMA17
  56. #endif
  57. #ifndef DEC_STEPPER_TYPE
  58. #define DEC_STEPPER_TYPE STEPPER_TYPE_NEMA17
  59. #endif
  60.  
  61. // Driver selection
  62. // GENERIC drivers include A4988 and any Bipolar STEP/DIR based drivers. Note Microstep assignments in config_pins.
  63. #ifndef RA_DRIVER_TYPE
  64. #define RA_DRIVER_TYPE DRIVER_TYPE_TMC2209_UART
  65. #endif
  66. #ifndef DEC_DRIVER_TYPE
  67. #define DEC_DRIVER_TYPE DRIVER_TYPE_TMC2209_UART
  68. #endif
  69.  
  70. // Your pulley tooth count. 16 for the bought (aluminium) one, 20 for the printed one.
  71. #ifndef RA_PULLEY_TEETH
  72. #define RA_PULLEY_TEETH 16
  73. #endif
  74. #ifndef DEC_PULLEY_TEETH
  75. #define DEC_PULLEY_TEETH 16
  76. #endif
  77.  
  78. // Set this to 1 if you are using a NEO6m GPS module for HA/LST and location automatic determination.
  79. // GPS uses Serial1 by default, which is pins 18/19 on Mega. Change in configuration_adv.hpp
  80. // If supported, download the library https://github.com/mikalhart/TinyGPSPlus/releases and extract it to C:\Users\*you*\Documents\Arduino\libraries
  81. #ifndef USE_GPS
  82. #define USE_GPS 0
  83. #endif
  84.  
  85. // Set this to 1 if you are using a MPU6050 electronic level
  86. // Wire the board to 20/21 on Mega. Change pins in configuration_pins.hpp if you use other pins
  87. #ifndef USE_GYRO_LEVEL
  88. #define USE_GYRO_LEVEL 0
  89. #endif
  90.  
  91. // Set this to 1 if your gyro is mounted such that roll and pitch are in the wrong direction
  92. #ifndef GYRO_AXIS_SWAP
  93. #define GYRO_AXIS_SWAP 1
  94. #endif
  95.  
  96. // Set this to 1 if the mount has motorized Azimuth and Altitude adjustment. Set pins in configuration_pins.hpp. Change motor speeds in Configuration_adv.hpp
  97. #ifndef AZIMUTH_ALTITUDE_MOTORS
  98. #define AZIMUTH_ALTITUDE_MOTORS 0
  99. #endif
  100.  
  101. // These values are needed to calculate the current position during initial alignment.
  102. // Use something like Stellarium to look up the RA of Polaris in JNow (on date) variant.
  103. // This changes slightly over weeks, so adjust every couple of months.
  104. // This value is from 13.Aug.2020, next adjustment suggested at end 2020
  105. // The same could be done for the DEC coordinates but they dont change significantly for the next 5 years
  106. #ifndef POLARIS_RA_HOUR
  107. #define POLARIS_RA_HOUR 2
  108. #endif
  109. #ifndef POLARIS_RA_MINUTE
  110. #define POLARIS_RA_MINUTE 58
  111. #endif
  112. #ifndef POLARIS_RA_SECOND
  113. #define POLARIS_RA_SECOND 51
  114. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement