2.0.2016011801

Fixed compilation bug involving last_moon_tracking_check_time and last_sun_tracking_check_time with some combinations of features
This commit is contained in:
Anthony Good 2016-01-18 17:32:05 -05:00
parent e84aa5b0e3
commit 0254044ed9
4 changed files with 25 additions and 11 deletions

View File

@ -438,9 +438,12 @@
2.0.2015122901
Corrections to bug fixes involving OPTION_CLOCK_ALWAYS_HAVE_HOUR_LEADING_ZERO (Thanks, UA9OLB)
2.0.2016011801
Fixed compilation bug involving last_moon_tracking_check_time and last_sun_tracking_check_time with some combinations of features
*/
#define CODE_VERSION "2.0.2015122901"
#define CODE_VERSION "2.0.2016011801"
#include <avr/pgmspace.h>
#include <EEPROM.h>
@ -1026,8 +1029,6 @@ DebugClass debug;
#endif
//yyyyyyyyy
@ -3304,7 +3305,13 @@ void update_display(){
k3ngdisplay.clear_pending_buffer();
#ifdef FEATURE_MOON_TRACKING
static unsigned long last_moon_tracking_check_time = 0;
#endif
#ifdef FEATURE_SUN_TRACKING
static unsigned long last_sun_tracking_check_time = 0;
#endif
// OPTION_DISPLAY_DIRECTION_STATUS - azimuth direction display ***********************************************************************************
#if defined(OPTION_DISPLAY_DIRECTION_STATUS)
@ -3729,7 +3736,7 @@ void update_display(){
// OPTION_DISPLAY_MOON_TRACKING_CONTINUOUSLY *************************************************************
#if defined(OPTION_DISPLAY_MOON_TRACKING_CONTINUOUSLY) && defined(FEATURE_MOON_TRACKING)
static unsigned long last_moon_tracking_check_time = 0;
// static unsigned long last_moon_tracking_check_time = 0;
if (!row_override[LCD_MOON_TRACKING_ROW]){
if (((millis()-last_moon_tracking_check_time) > LCD_MOON_TRACKING_UPDATE_INTERVAL)) {
@ -3766,7 +3773,7 @@ void update_display(){
// OPTION_DISPLAY_SUN_TRACKING_CONTINUOUSLY **********************************************************
#if defined(OPTION_DISPLAY_SUN_TRACKING_CONTINUOUSLY) && defined(FEATURE_SUN_TRACKING)
static unsigned long last_sun_tracking_check_time = 0;
// static unsigned long last_sun_tracking_check_time = 0;
if (!row_override[LCD_SUN_TRACKING_ROW]){
if ((millis()-last_sun_tracking_check_time) > LCD_SUN_TRACKING_UPDATE_INTERVAL) {
@ -3899,13 +3906,15 @@ void update_display(){
#endif //defined(OPTION_DISPLAY_CONSTANT_HHMMSS_CLOCK_AND_MAIDENHEAD) && defined(FEATURE_CLOCK)
// OPTION_DISPLAY_MOON_OR_SUN_TRACKING_CONDITIONAL *******************************************************
#ifdef OPTION_DISPLAY_MOON_OR_SUN_TRACKING_CONDITIONAL
// moon tracking ----
#ifdef FEATURE_MOON_TRACKING
static unsigned long last_moon_tracking_check_time = 0;
// static unsigned long last_moon_tracking_check_time = 0;
if ((!row_override[LCD_MOON_OR_SUN_TRACKING_CONDITIONAL_ROW]) && (moon_tracking_active)) {
if (((millis()-last_moon_tracking_check_time) > LCD_MOON_TRACKING_UPDATE_INTERVAL)) {
@ -3937,7 +3946,7 @@ void update_display(){
// sun tracking ----
#ifdef FEATURE_SUN_TRACKING
static unsigned long last_sun_tracking_check_time = 0;
// static unsigned long last_sun_tracking_check_time = 0;
if ((!row_override[LCD_MOON_OR_SUN_TRACKING_CONDITIONAL_ROW]) && (sun_tracking_active)){
if ((millis()-last_sun_tracking_check_time) > LCD_SUN_TRACKING_UPDATE_INTERVAL) {
@ -12497,3 +12506,4 @@ void set_el_stepper_freq(unsigned int frequency){
// that's all, folks !

View File

@ -1,4 +1,3 @@
#ifndef K3NG_DISPLAY_H
#define K3NG_DISPLAY_H
@ -723,3 +722,4 @@ void K3NGdisplay::revert_back_screen(){
//-----------------------------------------------------------------------------------------------------
#endif //K3NG_DISPLAY_H

View File

@ -1,3 +1,4 @@
#ifndef _K3NGDISPLAY_H
#define _K3NGDISPLAY_H
@ -7,6 +8,8 @@
#include "WProgram.h"
#endif
#include "rotator_hardware.h"
@ -120,3 +123,4 @@ private:
};
#endif //_K3NGDISPLAY_H

View File

@ -125,10 +125,10 @@
// #define OPTION_DISPLAY_BIG_CLOCK // display date & time clock (set row with #define LCD_BIG_CLOCK_ROW)
// #define OPTION_CLOCK_ALWAYS_HAVE_HOUR_LEADING_ZERO
#define OPTION_DISPLAY_GPS_INDICATOR // display GPS indicator on LCD - set position with LCD_GPS_INDICATOR_POSITION and LCD_GPS_INDICATOR_ROW
#define OPTION_DISPLAY_MOON_TRACKING_CONTINUOUSLY
// #define OPTION_DISPLAY_MOON_TRACKING_CONTINUOUSLY
// #define OPTION_DISPLAY_DIRECTION_STATUS // N, W, E, S, NW, etc. direction indicator
#define OPTION_DISPLAY_SUN_TRACKING_CONTINUOUSLY
// #define OPTION_DISPLAY_MOON_OR_SUN_TRACKING_CONDITIONAL
// #define OPTION_DISPLAY_SUN_TRACKING_CONTINUOUSLY
#define OPTION_DISPLAY_MOON_OR_SUN_TRACKING_CONDITIONAL
#define OPTION_DISPLAY_VERSION_ON_STARTUP //code provided by Paolo, IT9IPQ
// #define OPTION_LCD_HEADING_FIELD_FIXED_DECIMAL_PLACE
// #define OPTION_REVERSE_AZ_HH12_AS5045