mirror of
https://github.com/k3ng/k3ng_rotator_controller.git
synced 2025-01-23 21:08:04 +00:00
2.0.2016102201
Fixed bug with FEATURE_AZ_POSITION_HH12_AS5045_SSI, negative offset, and crossing between 359 and 0 degrees
This commit is contained in:
parent
1b5c755619
commit
e4bf80dad3
@ -266,6 +266,9 @@
|
||||
2.0.2016100301
|
||||
FEATURE_AZ_POSITION_ROTARY_ENCODER_USE_PJRC_LIBRARY and FEATURE_EL_POSITION_ROTARY_ENCODER_USE_PJRC_LIBRARY ready for testing
|
||||
|
||||
2.0.2016102201
|
||||
Fixed bug with FEATURE_AZ_POSITION_HH12_AS5045_SSI, negative offset, and crossing between 359 and 0 degrees
|
||||
|
||||
All library files should be placed in directories likes \sketchbook\libraries\library1\ , \sketchbook\libraries\library2\ , etc.
|
||||
in order to compile in Arduino IDE 1.6.7
|
||||
Anything rotator_*.* should be in the ino directory!
|
||||
@ -273,7 +276,7 @@
|
||||
|
||||
*/
|
||||
|
||||
#define CODE_VERSION "2.0.2016100301"
|
||||
#define CODE_VERSION "2.0.2016102201"
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
#include <EEPROM.h>
|
||||
@ -4636,14 +4639,11 @@ void read_azimuth(byte force_read){
|
||||
raw_azimuth = (correct_azimuth(raw_azimuth / (float) HEADING_MULTIPLIER) * HEADING_MULTIPLIER);
|
||||
#endif // FEATURE_AZIMUTH_CORRECTION
|
||||
raw_azimuth = raw_azimuth + (configuration.azimuth_offset * HEADING_MULTIPLIER);
|
||||
if (raw_azimuth < 0){raw_azimuth = raw_azimuth + (360 * HEADING_MULTIPLIER);}
|
||||
if (raw_azimuth >= (360 * HEADING_MULTIPLIER)) {
|
||||
azimuth = raw_azimuth - (360 * HEADING_MULTIPLIER);
|
||||
} else {
|
||||
if (raw_azimuth < 0) {
|
||||
azimuth = raw_azimuth + (360 * HEADING_MULTIPLIER);
|
||||
} else {
|
||||
azimuth = raw_azimuth;
|
||||
}
|
||||
azimuth = raw_azimuth;
|
||||
}
|
||||
#endif // FEATURE_AZ_POSITION_HH12_AS5045_SSI
|
||||
/*
|
||||
|
@ -51,7 +51,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
|
||||
|
||||
@ -64,7 +64,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
|
||||
|
Loading…
Reference in New Issue
Block a user