From 165a1fa58db9137fc934e41d84e28cad4e9a2be5 Mon Sep 17 00:00:00 2001 From: Anthony Good Date: Thu, 21 Jan 2016 00:40:49 -0500 Subject: [PATCH] 2.0.2016012101 Fixed bug with OPTION_REVERSE_AZ_HH12_AS5045 and OPTION_REVERSE_EL_HH12_AS5045 --- k3ng_rotator_controller.ino | 13 ++++++++----- rotator_features_test.h | 6 ++++-- rotator_pins_test.h | 6 +++--- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/k3ng_rotator_controller.ino b/k3ng_rotator_controller.ino index a26e42d..fcbb1ee 100644 --- a/k3ng_rotator_controller.ino +++ b/k3ng_rotator_controller.ino @@ -444,9 +444,12 @@ 2.0.2016012001 Fixed bug with DEBUG_GPS_SERIAL and also improved GPS port reading + + 2.0.2016012101 + Fixed bug with OPTION_REVERSE_AZ_HH12_AS5045 and OPTION_REVERSE_EL_HH12_AS5045 */ -#define CODE_VERSION "2.0.2016012001" +#define CODE_VERSION "2.0.2016012101" #include #include @@ -494,7 +497,7 @@ #endif #ifdef FEATURE_LCD_DISPLAY - #include "k3ngdisplay.h" // if you're getting an error on this line when compiling, you probably need to move k3ngdisplay.h and k3ngdisplay.cpp to your ino directory + #include // if you're getting an error on this line when compiling, you probably need to move k3ngdisplay.h and k3ngdisplay.cpp to your ino directory #endif #ifdef FEATURE_WIRE_SUPPORT @@ -4636,7 +4639,7 @@ 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()) * HEADING_MULTIPLIER); #else raw_azimuth = int(azimuth_hh12.heading() * HEADING_MULTIPLIER); #endif @@ -4817,7 +4820,7 @@ void output_debug(){ } #endif // FEATURE_PARK - debug.print("\n"); + debug.println(""); debug.print("\tAZ: "); switch (az_state) { @@ -5484,7 +5487,7 @@ void read_elevation(byte force_read){ #ifdef FEATURE_EL_POSITION_HH12_AS5045_SSI #if defined(OPTION_REVERSE_EL_HH12_AS5045) - elevation = int(360.0-(elevation_hh12.heading() * HEADING_MULTIPLIER)); + elevation = int((360.0-elevation_hh12.heading()) * HEADING_MULTIPLIER); #else elevation = int(elevation_hh12.heading() * HEADING_MULTIPLIER); #endif diff --git a/rotator_features_test.h b/rotator_features_test.h index 343a433..5dad89f 100755 --- a/rotator_features_test.h +++ b/rotator_features_test.h @@ -49,7 +49,7 @@ //#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 @@ -61,7 +61,7 @@ //#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 @@ -150,6 +150,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_DONT_READ_GPS_PORT_AS_OFTEN diff --git a/rotator_pins_test.h b/rotator_pins_test.h index 262114c..a576236 100644 --- a/rotator_pins_test.h +++ b/rotator_pins_test.h @@ -113,9 +113,9 @@ #define blink_led 0 //13 #ifdef FEATURE_AZ_POSITION_HH12_AS5045_SSI -#define az_hh12_clock_pin 11 -#define az_hh12_cs_pin 12 -#define az_hh12_data_pin 13 +#define az_hh12_clock_pin 53 //11 +#define az_hh12_cs_pin 52 //12 +#define az_hh12_data_pin 51 //13 #endif //FEATURE_AZ_POSITION_HH_12 #ifdef FEATURE_EL_POSITION_HH12_AS5045_SSI