mirror of
https://github.com/k3ng/k3ng_rotator_controller.git
synced 2024-12-21 06:03:12 +00:00
2.0.2016030101
FEATURE_AZ_POSITION_HH12_AS5045_SSI: AZIMUTH_STARTING_POINT_DEFAULT used in heading calculation now
This commit is contained in:
parent
5ddcfbe374
commit
b484828f3e
@ -454,13 +454,19 @@
|
||||
2.0.2016012301
|
||||
Further work to get k3ngdisplay files to play with Arduino IDE 1.6.7
|
||||
|
||||
2.0.2016021601
|
||||
DEBUG_HH12 more information output
|
||||
|
||||
2.0.2016030101
|
||||
FEATURE_AZ_POSITION_HH12_AS5045_SSI: AZIMUTH_STARTING_POINT_DEFAULT used in heading calculation now
|
||||
|
||||
All library files should be placed in \sketchbook\libraries\some-directory\ in order to compile in Arduino IDE 1.6.7
|
||||
Anything rotator_*.* should be in the ino directory!
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#define CODE_VERSION "2.0.2016012301"
|
||||
#define CODE_VERSION "2.0.2016030101"
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
#include <EEPROM.h>
|
||||
@ -4651,9 +4657,9 @@ void read_azimuth(byte force_read){
|
||||
|
||||
#ifdef FEATURE_AZ_POSITION_HH12_AS5045_SSI
|
||||
#if defined(OPTION_REVERSE_AZ_HH12_AS5045)
|
||||
raw_azimuth = int((360.0-azimuth_hh12.heading()) * HEADING_MULTIPLIER);
|
||||
raw_azimuth = int((360.0-azimuth_hh12.heading()+AZIMUTH_STARTING_POINT_DEFAULT) * HEADING_MULTIPLIER);
|
||||
#else
|
||||
raw_azimuth = int(azimuth_hh12.heading() * HEADING_MULTIPLIER);
|
||||
raw_azimuth = int((azimuth_hh12.heading()+AZIMUTH_STARTING_POINT_DEFAULT) * HEADING_MULTIPLIER);
|
||||
#endif
|
||||
#ifdef DEBUG_HH12
|
||||
if ((millis() - last_hh12_debug) > 5000) {
|
||||
@ -5503,10 +5509,13 @@ void read_elevation(byte force_read){
|
||||
#else
|
||||
elevation = int(elevation_hh12.heading() * HEADING_MULTIPLIER);
|
||||
#endif
|
||||
#ifdef DEBUG_HH12
|
||||
#ifdef DEBUG_HH12 //zzzzzzzz
|
||||
if ((millis() - last_hh12_debug) > 5000) {
|
||||
debug.print(F("read_elevation: HH-12 raw: "));
|
||||
control_port->println(elevation);
|
||||
debug.print(F("read_elevation: HH-12 from device: "));
|
||||
debug.print(elevation_hh12.heading());
|
||||
debug.print(F(" uncorrected: "));
|
||||
debug.println(elevation/HEADING_MULTIPLIER);
|
||||
// control_port->println(elevation);
|
||||
last_hh12_debug = millis();
|
||||
}
|
||||
#endif // DEBUG_HH12
|
||||
|
@ -61,7 +61,7 @@
|
||||
// #define FEATURE_EL_POSITION_MEMSIC_2125
|
||||
// #define FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER
|
||||
|
||||
// All displays require rotator_k3ngdisplay.h and rotator_k3ngdisplay.cpp in the ino directory!
|
||||
// All displays require k3ngdisplay.h and k3ngdisplay.cpp in a directory in \sketchbook\libraries\
|
||||
// And if you are using an Adafruit, Yourduino, RFRobot, or YWRobot display, you must change the feature setting in k3ngdisplay.h!!!!
|
||||
// #define FEATURE_4_BIT_LCD_DISPLAY // Uncomment for classic 4 bit LCD display (most common)
|
||||
// #define FEATURE_ADAFRUIT_I2C_LCD
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#define FEATURE_EL_POSITION_POTENTIOMETER
|
||||
|
||||
// LCD display requires k3ngdisplay.h and k3ngdisplay.cpp in a directory in \sketchbook\libraries\
|
||||
#define FEATURE_4_BIT_LCD_DISPLAY //Uncomment for classic 4 bit LCD display (most common)
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#define FEATURE_GPS
|
||||
#define FEATURE_RTC_DS1307
|
||||
// #define FEATURE_RTC_PCF8583
|
||||
#define FEATURE_ETHERNET
|
||||
// #define FEATURE_ETHERNET
|
||||
// #define FEATURE_STEPPER_MOTOR // requires Mega or an AVR with Timer 5 support
|
||||
// #define FEATURE_AUTOCORRECT
|
||||
|
||||
@ -38,22 +38,22 @@
|
||||
// #define FEATURE_REMOTE_UNIT_SLAVE // uncomment this to make this unit a remote unit controlled by a host unit
|
||||
|
||||
// #define FEATURE_MASTER_WITH_SERIAL_SLAVE // [master]{remote_port}<-------serial-------->{control_port}[slave]
|
||||
#define FEATURE_MASTER_WITH_ETHERNET_SLAVE // [master]<-------------------ethernet--------------------->[slave]
|
||||
// #define FEATURE_MASTER_WITH_ETHERNET_SLAVE // [master]<-------------------ethernet--------------------->[slave]
|
||||
|
||||
|
||||
/* position sensors - pick one for azimuth and one for elevation if using an az/el rotator */
|
||||
#define FEATURE_AZ_POSITION_POTENTIOMETER //this is used for both a voltage from a rotator control or a homebrew rotator with a potentiometer
|
||||
// #define FEATURE_AZ_POSITION_POTENTIOMETER //this is used for both a voltage from a rotator control or a homebrew rotator with a potentiometer
|
||||
// #define FEATURE_AZ_POSITION_ROTARY_ENCODER
|
||||
// #define FEATURE_AZ_POSITION_PULSE_INPUT
|
||||
// #define FEATURE_AZ_POSITION_HMC5883L // HMC5883L digital compass support
|
||||
// #define FEATURE_AZ_POSITION_GET_FROM_REMOTE_UNIT // requires FEATURE_MASTER_WITH_SERIAL_SLAVE or FEATURE_MASTER_WITH_ETHERNET_SLAVE
|
||||
// #define FEATURE_AZ_POSITION_ADAFRUIT_LSM303 // Uncomment for azimuth using LSM303 compass and Adafruit library (https://github.com/adafruit/Adafruit_LSM303) (also uncomment object declaration below)
|
||||
// #define FEATURE_AZ_POSITION_POLOLU_LSM303 // Uncomment for azimuth using LSM303 compass and Polulu library
|
||||
// #define FEATURE_AZ_POSITION_HH12_AS5045_SSI
|
||||
#define FEATURE_AZ_POSITION_HH12_AS5045_SSI
|
||||
// #define FEATURE_AZ_POSITION_INCREMENTAL_ENCODER
|
||||
// #define FEATURE_AZ_POSITION_A2_ABSOLUTE_ENCODER
|
||||
|
||||
#define FEATURE_EL_POSITION_POTENTIOMETER
|
||||
// #define FEATURE_EL_POSITION_POTENTIOMETER
|
||||
// #define FEATURE_EL_POSITION_ROTARY_ENCODER
|
||||
// #define FEATURE_EL_POSITION_PULSE_INPUT
|
||||
// #define FEATURE_EL_POSITION_ADXL345_USING_LOVE_ELECTRON_LIB // Uncomment for elevation ADXL345 accelerometer support using ADXL345 library
|
||||
@ -61,14 +61,15 @@
|
||||
// #define FEATURE_EL_POSITION_GET_FROM_REMOTE_UNIT // requires FEATURE_MASTER_WITH_SERIAL_SLAVE or FEATURE_MASTER_WITH_ETHERNET_SLAVE
|
||||
// #define FEATURE_EL_POSITION_ADAFRUIT_LSM303 // Uncomment for elevation using LSM303 accelerometer and Adafruit library (https://github.com/adafruit/Adafruit_LSM303) (also uncomment object declaration below)
|
||||
// #define FEATURE_EL_POSITION_POLOLU_LSM303 // Uncomment for elevation using LSM303 compass and Polulu library
|
||||
// #define FEATURE_EL_POSITION_HH12_AS5045_SSI
|
||||
#define FEATURE_EL_POSITION_HH12_AS5045_SSI
|
||||
// #define FEATURE_EL_POSITION_INCREMENTAL_ENCODER
|
||||
// #define FEATURE_EL_POSITION_MEMSIC_2125
|
||||
// #define FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER
|
||||
|
||||
// All displays require rotator_k3ngdisplay.h and rotator_k3ngdisplay.cpp in the ino directory!
|
||||
|
||||
// All displays require k3ngdisplay.h and k3ngdisplay.cpp in a directory in \sketchbook\libraries\
|
||||
// And if you are using an Adafruit, Yourduino, RFRobot, or YWRobot display, you must change the feature setting in k3ngdisplay.h!!!!
|
||||
// #define FEATURE_4_BIT_LCD_DISPLAY // Uncomment for classic 4 bit LCD display (most common)
|
||||
#define FEATURE_4_BIT_LCD_DISPLAY // Uncomment for classic 4 bit LCD display (most common)
|
||||
// #define FEATURE_ADAFRUIT_I2C_LCD
|
||||
// #define FEATURE_ADAFRUIT_BUTTONS // Uncomment this to use Adafruit I2C LCD buttons for manual AZ/EL instead of normal buttons
|
||||
// #define FEATURE_YOURDUINO_I2C_LCD
|
||||
@ -151,8 +152,8 @@
|
||||
// #define OPTION_SCANCON_2RMHF3600_INC_ENCODER // use with FEATURE_AZ_POSITION_INCREMENTAL_ENCODER and/or FEATURE_EL_POSITION_INCREMENTAL_ENCODER if using the ScanCon 2RMHF3600 incremental encoder
|
||||
// #define OPTION_RESET_METHOD_JMP_ASM_0
|
||||
// #define OPTION_SAVE_MEMORY_EXCLUDE_REMOTE_CMDS
|
||||
#define OPTION_REVERSE_AZ_HH12_AS5045
|
||||
#define OPTION_REVERSE_EL_HH12_AS5045
|
||||
// #define OPTION_REVERSE_AZ_HH12_AS5045
|
||||
// #define OPTION_REVERSE_EL_HH12_AS5045
|
||||
// #define OPTION_DONT_READ_GPS_PORT_AS_OFTEN
|
||||
|
||||
|
||||
|
@ -119,9 +119,9 @@
|
||||
#endif //FEATURE_AZ_POSITION_HH_12
|
||||
|
||||
#ifdef FEATURE_EL_POSITION_HH12_AS5045_SSI
|
||||
#define el_hh12_clock_pin 11
|
||||
#define el_hh12_cs_pin 12
|
||||
#define el_hh12_data_pin 13
|
||||
#define el_hh12_clock_pin 53 //11
|
||||
#define el_hh12_cs_pin 52 //12
|
||||
#define el_hh12_data_pin 51 //13
|
||||
#endif //FEATURE_EL_POSITION_HH_12
|
||||
|
||||
#ifdef FEATURE_PARK
|
||||
|
Loading…
Reference in New Issue
Block a user