2.0.2016031001

OPTION_DISPLAY_HEADING_AZ_ONLY with settings LCD_AZ_ONLY_HEADING_ROW, LCD_AZ_ONLY_HEADING_FIELD_SIZE
      OPTION_DISPLAY_HEADING_EL_ONLY with settings LCD_EL_ONLY_HEADING_ROW, LCD_EL_ONLY_HEADING_FIELD_SIZE
This commit is contained in:
Anthony Good 2016-03-10 23:32:22 -05:00
parent a591a8a78e
commit 07a73c333f
6 changed files with 80 additions and 10 deletions

View File

@ -472,13 +472,18 @@
2.0.2016030501
FEATURE_SAINSMART_I2C_LCD
All library files should be placed in \sketchbook\libraries\some-directory\ in order to compile in Arduino IDE 1.6.7
2.0.2016031001
OPTION_DISPLAY_HEADING_AZ_ONLY with settings LCD_AZ_ONLY_HEADING_ROW, LCD_AZ_ONLY_HEADING_FIELD_SIZE
OPTION_DISPLAY_HEADING_EL_ONLY with settings LCD_EL_ONLY_HEADING_ROW, LCD_EL_ONLY_HEADING_FIELD_SIZE
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!
*/
#define CODE_VERSION "2.0.2016030501"
#define CODE_VERSION "2.0.2016031001"
#include <avr/pgmspace.h>
#include <EEPROM.h>
@ -3436,6 +3441,51 @@ void update_display(){
#endif //defined(OPTION_DISPLAY_HEADING)
//zzzzzzz
// OPTION_DISPLAY_HEADING_AZ_ONLY - show heading ***********************************************************************************
#if defined(OPTION_DISPLAY_HEADING_AZ_ONLY)
strcpy(workstring,AZIMUTH_STRING);
dtostrf(azimuth / LCD_HEADING_MULTIPLIER, 1, LCD_DECIMAL_PLACES, workstring2);
#ifdef OPTION_LCD_HEADING_FIELD_FIXED_DECIMAL_PLACE
if ((azimuth/ LCD_HEADING_MULTIPLIER) < 100){strcat(workstring," ");}
if ((azimuth/ LCD_HEADING_MULTIPLIER) < 10){strcat(workstring," ");}
#endif //OPTION_LCD_HEADING_FIELD_FIXED_DECIMAL_PLACE
strcat(workstring,workstring2);
strcat(workstring,DISPLAY_DEGREES_STRING);
k3ngdisplay.print_center_fixed_field_size(workstring,LCD_AZ_ONLY_HEADING_ROW-1,LCD_AZ_ONLY_HEADING_FIELD_SIZE);
#endif //defined(OPTION_DISPLAY_HEADING_AZ_ONLY)
// OPTION_DISPLAY_HEADING_EL_ONLY - show heading ***********************************************************************************
#if defined(OPTION_DISPLAY_HEADING_EL_ONLY) && defined(FEATURE_ELEVATION_CONTROL)
// #if defined(FEATURE_ONE_DECIMAL_PLACE_HEADINGS) || defined(FEATURE_TWO_DECIMAL_PLACE_HEADINGS)
// if ((elevation >= 1000)) {
// strcpy(workstring,SPACE_EL_STRING);
// } else {
// strcpy(workstring,SPACE_EL_SPACE_STRING);
// }
// #else
strcpy(workstring,ELEVATION_STRING);
// #endif // defined(FEATURE_ONE_DECIMAL_PLACE_HEADINGS) || defined(FEATURE_TWO_DECIMAL_PLACE_HEADINGS)
dtostrf(elevation / LCD_HEADING_MULTIPLIER, 1, LCD_DECIMAL_PLACES, workstring2);
#ifdef OPTION_LCD_HEADING_FIELD_FIXED_DECIMAL_PLACE
if ((elevation/ LCD_HEADING_MULTIPLIER) < 100){strcat(workstring," ");}
if ((elevation/ LCD_HEADING_MULTIPLIER) < 10){strcat(workstring," ");}
#endif //OPTION_LCD_HEADING_FIELD_FIXED_DECIMAL_PLACE
strcat(workstring,workstring2);
#if !defined(FEATURE_ONE_DECIMAL_PLACE_HEADINGS) && !defined(FEATURE_TWO_DECIMAL_PLACE_HEADINGS)
if (LCD_COLUMNS > 14) {
strcat(workstring,DISPLAY_DEGREES_STRING);
}
#else
if ((LCD_COLUMNS > 18) || (elevation < 100)) {
strcat(workstring,DISPLAY_DEGREES_STRING);
}
#endif
k3ngdisplay.print_center_fixed_field_size(workstring,LCD_EL_ONLY_HEADING_ROW-1,LCD_EL_ONLY_HEADING_FIELD_SIZE);
#endif //defined(OPTION_DISPLAY_HEADING_EL_ONLY)
// OPTION_DISPLAY_STATUS***********************************************************************************
#if defined(OPTION_DISPLAY_STATUS)
#if !defined(FEATURE_ELEVATION_CONTROL) // ---------------- az only ----------------------------------------------

View File

@ -120,6 +120,8 @@
#define OPTION_DISPLAY_STATUS
#define OPTION_DISPLAY_HEADING
#define OPTION_DISPLAY_HEADING_AZ_ONLY
#define OPTION_DISPLAY_HEADING_EL_ONLY
#define OPTION_DISPLAY_HHMM_CLOCK // display HH:MM clock (set position with #define LCD_HHMM_CLOCK_POSITION)
// #define OPTION_DISPLAY_HHMMSS_CLOCK // display HH:MM:SS clock (set position with #define LCD_HHMMSS_CLOCK_POSITION)
// #define OPTION_DISPLAY_ALT_HHMM_CLOCK_AND_MAIDENHEAD // display alternating HH:MM clock and maidenhead on LCD row 1 (set position with #define LCD_HHMMCLOCK_POSITION)

View File

@ -42,18 +42,18 @@
/* 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,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
@ -69,7 +69,7 @@
// All displays require k3ngdisplay.h and k3ngdisplay.cpp in a directory in \sketchbook\libraries\
// And if you are using an Adafruit, Yourduino, RFRobot, YWRobot, or SainSmart display, you must also 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 (also set this feature in rotator_k3ngdisplay.h)
// #define FEATURE_YOURDUINO_I2C_LCD
@ -124,9 +124,11 @@
//#define OPTION_BUTTON_RELEASE_NO_SLOWDOWN // disables slowdown when CW or CCW button is released, or stop button is depressed
#define OPTION_SYNC_RTC_TO_GPS // if both realtime clock and GPS are present, synchronize realtime clock to GPS
#define OPTION_DISPLAY_STATUS
#define OPTION_DISPLAY_HEADING
#define OPTION_DISPLAY_HHMM_CLOCK // display HH:MM clock (set position with #define LCD_HHMM_CLOCK_POSITION)
// #define OPTION_DISPLAY_STATUS
// #define OPTION_DISPLAY_HEADING
#define OPTION_DISPLAY_HEADING_AZ_ONLY
#define OPTION_DISPLAY_HEADING_EL_ONLY
// #define OPTION_DISPLAY_HHMM_CLOCK // display HH:MM clock (set position with #define LCD_HHMM_CLOCK_POSITION)
//#define OPTION_DISPLAY_HHMMSS_CLOCK // display HH:MM:SS clock (set position with #define LCD_HHMMSS_CLOCK_POSITION)
//#define OPTION_DISPLAY_ALT_HHMM_CLOCK_AND_MAIDENHEAD // display alternating HH:MM clock and maidenhead on LCD row 1 (set position with #define LCD_HHMMCLOCK_POSITION)
//#define OPTION_DISPLAY_CONSTANT_HHMMSS_CLOCK_AND_MAIDENHEAD // display constant HH:MM:SS clock and maidenhead on LCD row 1 (set position with #define LCD_CONSTANT_HHMMSSCLOCK_MAIDENHEAD_POSITION)

View File

@ -22,6 +22,7 @@
#define AZIMUTH_STRING "Azimuth "
#define AZ_STRING "Az"
#define AZ_SPACE_STRING "Az "
#define ELEVATION_STRING "Elevation "
#define SPACE_EL_STRING " El"
#define SPACE_EL_SPACE_STRING " El "
#define GPS_STRING "GPS"
@ -67,6 +68,7 @@
#define AZIMUTH_STRING "Azimuth "
#define AZ_STRING "Az"
#define AZ_SPACE_STRING "Az "
#define ELEVATION_STRING "Elevation "
#define SPACE_EL_STRING " El"
#define SPACE_EL_SPACE_STRING " El "
#define GPS_STRING "GPS"
@ -112,6 +114,7 @@
#define AZIMUTH_STRING "Azimut "
#define AZ_STRING "Az"
#define AZ_SPACE_STRING "Az "
#define ELEVATION_STRING "Elevation "
#define SPACE_EL_STRING " El"
#define SPACE_EL_SPACE_STRING " El "
#define GPS_STRING "GPS"
@ -157,6 +160,7 @@
#define AZIMUTH_STRING "Azimuth "
#define AZ_STRING "Az"
#define AZ_SPACE_STRING "Az "
#define ELEVATION_STRING "Elevation "
#define SPACE_EL_STRING " El"
#define SPACE_EL_SPACE_STRING " El "
#define GPS_STRING "GPS"
@ -202,6 +206,7 @@
#define AZIMUTH_STRING "Azimute "
#define AZ_STRING "Az"
#define AZ_SPACE_STRING "Az "
#define ELEVATION_STRING "Elevation "
#define SPACE_EL_STRING " El"
#define SPACE_EL_SPACE_STRING " El "
#define GPS_STRING "GPS"
@ -248,6 +253,7 @@
#define AZIMUTH_STRING "Azimuth "
#define AZ_STRING "Az"
#define AZ_SPACE_STRING "Az "
#define ELEVATION_STRING "Elevation "
#define SPACE_EL_STRING " El"
#define SPACE_EL_SPACE_STRING " El "
#define GPS_STRING "GPS"
@ -286,6 +292,7 @@
#define AZIMUTH_STRING "Azimut "
#define AZ_STRING "Az"
#define AZ_SPACE_STRING "Az "
#define ELEVATION_STRING "Elevation "
#define SPACE_EL_STRING " Él"
#define SPACE_EL_SPACE_STRING " Él "
#define GPS_STRING "GPS"
@ -331,6 +338,7 @@
#define AZIMUTH_STRING "Azimuth "
#define AZ_STRING "Az"
#define AZ_SPACE_STRING "Az "
#define ELEVATION_STRING "Elevation "
#define SPACE_EL_STRING " El"
#define SPACE_EL_SPACE_STRING " El "
#define GPS_STRING "GPS"

View File

@ -125,6 +125,10 @@ You can tweak these, but read the online documentation!
#define LCD_HEADING_ROW 2
#define LCD_HEADING_FIELD_SIZE 20
#define LCD_AZ_ONLY_HEADING_ROW 1
#define LCD_AZ_ONLY_HEADING_FIELD_SIZE 20
#define LCD_EL_ONLY_HEADING_ROW 2
#define LCD_EL_ONLY_HEADING_FIELD_SIZE 20
#define LCD_STATUS_ROW 1
#define LCD_STATUS_FIELD_SIZE 20
#define LCD_DIRECTION_ROW 1

View File

@ -136,6 +136,10 @@ You can tweak these, but read the online documentation!
#define LCD_HEADING_ROW 2
#define LCD_HEADING_FIELD_SIZE 20
#define LCD_AZ_ONLY_HEADING_ROW 1
#define LCD_AZ_ONLY_HEADING_FIELD_SIZE 20
#define LCD_EL_ONLY_HEADING_ROW 2
#define LCD_EL_ONLY_HEADING_FIELD_SIZE 20
#define LCD_STATUS_ROW 1
#define LCD_STATUS_FIELD_SIZE 20
#define LCD_DIRECTION_ROW 1