2.0.2016012101

Fixed bug with OPTION_REVERSE_AZ_HH12_AS5045 and OPTION_REVERSE_EL_HH12_AS5045
This commit is contained in:
Anthony Good 2016-01-21 00:40:49 -05:00
parent 8fe5db64fb
commit 165a1fa58d
3 changed files with 15 additions and 10 deletions

View File

@ -444,9 +444,12 @@
2.0.2016012001 2.0.2016012001
Fixed bug with DEBUG_GPS_SERIAL and also improved GPS port reading 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 <avr/pgmspace.h> #include <avr/pgmspace.h>
#include <EEPROM.h> #include <EEPROM.h>
@ -494,7 +497,7 @@
#endif #endif
#ifdef FEATURE_LCD_DISPLAY #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 <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
#endif #endif
#ifdef FEATURE_WIRE_SUPPORT #ifdef FEATURE_WIRE_SUPPORT
@ -4636,7 +4639,7 @@ void read_azimuth(byte force_read){
#ifdef FEATURE_AZ_POSITION_HH12_AS5045_SSI #ifdef FEATURE_AZ_POSITION_HH12_AS5045_SSI
#if defined(OPTION_REVERSE_AZ_HH12_AS5045) #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 #else
raw_azimuth = int(azimuth_hh12.heading() * HEADING_MULTIPLIER); raw_azimuth = int(azimuth_hh12.heading() * HEADING_MULTIPLIER);
#endif #endif
@ -4817,7 +4820,7 @@ void output_debug(){
} }
#endif // FEATURE_PARK #endif // FEATURE_PARK
debug.print("\n"); debug.println("");
debug.print("\tAZ: "); debug.print("\tAZ: ");
switch (az_state) { switch (az_state) {
@ -5484,7 +5487,7 @@ void read_elevation(byte force_read){
#ifdef FEATURE_EL_POSITION_HH12_AS5045_SSI #ifdef FEATURE_EL_POSITION_HH12_AS5045_SSI
#if defined(OPTION_REVERSE_EL_HH12_AS5045) #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 #else
elevation = int(elevation_hh12.heading() * HEADING_MULTIPLIER); elevation = int(elevation_hh12.heading() * HEADING_MULTIPLIER);
#endif #endif

View File

@ -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_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_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_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_INCREMENTAL_ENCODER
//#define FEATURE_AZ_POSITION_A2_ABSOLUTE_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_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_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_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_INCREMENTAL_ENCODER
//#define FEATURE_EL_POSITION_MEMSIC_2125 //#define FEATURE_EL_POSITION_MEMSIC_2125
//#define FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER //#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_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_RESET_METHOD_JMP_ASM_0
// #define OPTION_SAVE_MEMORY_EXCLUDE_REMOTE_CMDS // #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 // #define OPTION_DONT_READ_GPS_PORT_AS_OFTEN

View File

@ -113,9 +113,9 @@
#define blink_led 0 //13 #define blink_led 0 //13
#ifdef FEATURE_AZ_POSITION_HH12_AS5045_SSI #ifdef FEATURE_AZ_POSITION_HH12_AS5045_SSI
#define az_hh12_clock_pin 11 #define az_hh12_clock_pin 53 //11
#define az_hh12_cs_pin 12 #define az_hh12_cs_pin 52 //12
#define az_hh12_data_pin 13 #define az_hh12_data_pin 51 //13
#endif //FEATURE_AZ_POSITION_HH_12 #endif //FEATURE_AZ_POSITION_HH_12
#ifdef FEATURE_EL_POSITION_HH12_AS5045_SSI #ifdef FEATURE_EL_POSITION_HH12_AS5045_SSI