mirror of
https://github.com/k3ng/k3ng_rotator_controller.git
synced 2024-12-19 05:07:55 +00:00
2020.03.30.01
FEATURE_NEXTION_DISPLAY - Nextion display support UNDER DEVELOPMENT Added file rotator_nextion.h Documentation in progress: https://github.com/k3ng/k3ng_rotator_controller/wiki/425-Human-Interface:-Nextion-Display
This commit is contained in:
parent
e5166c2b6d
commit
71a28f2ada
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
k3ng_rotator_controller/Nextion/calibri24all.zi
Normal file
BIN
k3ng_rotator_controller/Nextion/calibri24all.zi
Normal file
Binary file not shown.
BIN
k3ng_rotator_controller/Nextion/calibri24boldall.zi
Normal file
BIN
k3ng_rotator_controller/Nextion/calibri24boldall.zi
Normal file
Binary file not shown.
BIN
k3ng_rotator_controller/Nextion/calibri32all.zi
Normal file
BIN
k3ng_rotator_controller/Nextion/calibri32all.zi
Normal file
Binary file not shown.
BIN
k3ng_rotator_controller/Nextion/calibri40all.zi
Normal file
BIN
k3ng_rotator_controller/Nextion/calibri40all.zi
Normal file
Binary file not shown.
BIN
k3ng_rotator_controller/Nextion/calibri48all.zi
Normal file
BIN
k3ng_rotator_controller/Nextion/calibri48all.zi
Normal file
Binary file not shown.
BIN
k3ng_rotator_controller/Nextion/calibri64all.zi
Normal file
BIN
k3ng_rotator_controller/Nextion/calibri64all.zi
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -170,6 +170,26 @@
|
||||
#define AUDIBLE_ALERT_SERVICE 0
|
||||
#define AUDIBLE_ALERT_ACTIVATE 1
|
||||
|
||||
|
||||
// for debugging
|
||||
#define DBG_CHECK_AZ_PRESET_POT 44
|
||||
#define DBG_CHECK_PRESET_ENCODERS_NOT_IDLE 45
|
||||
|
||||
#define DBG_CHECK_PRESET_ENCODERS_PENDING 47
|
||||
|
||||
#define DBG_CHECK_AZ_MANUAL_ROTATE_LIMIT_CCW 49
|
||||
#define DBG_CHECK_AZ_MANUAL_ROTATE_LIMIT_CW 50
|
||||
#define DBG_CHECK_EL_MANUAL_ROTATE_LIMIT_DOWN 51
|
||||
#define DBG_CHECK_EL_MANUAL_ROTATE_LIMIT_UP 52
|
||||
|
||||
#define DBG_CHECK_BUTTONS_BTN_CW 61
|
||||
#define DBG_CHECK_BUTTONS_BTN_CCW 62
|
||||
#define DBG_CHECK_BUTTONS_ADAFRUIT_STOP 63
|
||||
#define DBG_CHECK_BUTTONS_RELEASE_NO_SLOWDOWN 64
|
||||
#define DBG_CHECK_BUTTONS_RELEASE_KILL 65
|
||||
|
||||
#define DBG_NEXTION_BUTTON 250
|
||||
|
||||
#define DBG_CHECK_BUTTONS_SUN 251
|
||||
#define DBG_CHECK_BUTTONS_MOON 252
|
||||
#define DBG_SERVICE_SUN_TRACKING 253
|
||||
|
@ -80,6 +80,8 @@
|
||||
// #define FEATURE_MIDAS_I2C_DISPLAY
|
||||
// #define FEATURE_FABO_LCD_PCF8574_DISPLAY
|
||||
|
||||
// #define FEATURE_NEXTION_DISPLAY // Documentation: https://github.com/k3ng/k3ng_rotator_controller/wiki/425-Human-Interface:-Nextion-Display
|
||||
|
||||
// #define FEATURE_ANALOG_OUTPUT_PINS
|
||||
|
||||
// #define FEATURE_SUN_PUSHBUTTON_AZ_EL_CALIBRATION
|
||||
|
@ -17,8 +17,8 @@
|
||||
// #define FEATURE_EASYCOM_EMULATION // Easycom protocol emulation on control port (undefine FEATURE_YAESU_EMULATION above)
|
||||
// #define FEATURE_DCU_1_EMULATION // DCU-1 protocol emulation on control port
|
||||
|
||||
#define FEATURE_MOON_TRACKING
|
||||
#define FEATURE_SUN_TRACKING
|
||||
// #define FEATURE_MOON_TRACKING
|
||||
// #define FEATURE_SUN_TRACKING
|
||||
#define FEATURE_CLOCK
|
||||
#define FEATURE_GPS
|
||||
#define FEATURE_RTC_DS1307
|
||||
@ -86,6 +86,8 @@
|
||||
// #define FEATURE_FABO_LCD_PCF8574_DISPLAY
|
||||
// #define FEATURE_HD44780_I2C_DISPLAY // Not working yet
|
||||
|
||||
// #define FEATURE_NEXTION_DISPLAY // Documentation: https://github.com/k3ng/k3ng_rotator_controller/wiki/425-Human-Interface:-Nextion-Display
|
||||
|
||||
// #define FEATURE_ANALOG_OUTPUT_PINS
|
||||
|
||||
// #define FEATURE_SUN_PUSHBUTTON_AZ_EL_CALIBRATION
|
||||
@ -94,7 +96,7 @@
|
||||
// #define FEATURE_AUDIBLE_ALERT
|
||||
|
||||
/* preset rotary encoder features and options */
|
||||
#define FEATURE_AZ_PRESET_ENCODER // Uncomment for Rotary Encoder Azimuth Preset support
|
||||
// #define FEATURE_AZ_PRESET_ENCODER // Uncomment for Rotary Encoder Azimuth Preset support
|
||||
// #define FEATURE_EL_PRESET_ENCODER // Uncomment for Rotary Encoder Elevation Preset support (requires FEATURE_AZ_PRESET_ENCODER above)
|
||||
#define OPTION_ENCODER_HALF_STEP_MODE
|
||||
#define OPTION_ENCODER_ENABLE_PULLUPS // define to enable weak pullups on rotary encoder pins
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef K3NG_DISPLAY_H
|
||||
#define K3NG_DISPLAY_H
|
||||
|
||||
// K3NG_DISPLAY_LIBRARY_VERSION "2018.11.21.01"
|
||||
// K3NG_DISPLAY_LIBRARY_VERSION "2020.03.16.01"
|
||||
|
||||
|
||||
#if defined(ARDUINO) && ARDUINO >= 100
|
||||
@ -12,9 +12,6 @@
|
||||
|
||||
#include "rotator_k3ngdisplay.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef FEATURE_4_BIT_LCD_DISPLAY
|
||||
#include <LiquidCrystal.h>
|
||||
LiquidCrystal lcd(lcd_4_bit_rs_pin, lcd_4_bit_enable_pin, lcd_4_bit_d4_pin, lcd_4_bit_d5_pin, lcd_4_bit_d6_pin, lcd_4_bit_d7_pin);
|
||||
@ -61,7 +58,6 @@
|
||||
// LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
|
||||
#endif //FEATURE_RFROBOT_I2C_DISPLAY
|
||||
|
||||
|
||||
#if defined(FEATURE_YWROBOT_I2C_DISPLAY)
|
||||
#include <LiquidCrystal_I2C.h>
|
||||
//LiquidCrystal_I2C lcd(ywrobot_address, ywrobot_pin_en, ywrobot_pin_rw, ywrobot_pin_rs, ywrobot_pin_d4, ywrobot_pin_d5, ywrobot_pin_d6, ywrobot_pin_d7, ywrobot_pin_bl, ywrobot_blpol);
|
||||
@ -94,7 +90,6 @@
|
||||
hd44780_I2Cexp lcd;
|
||||
#endif
|
||||
|
||||
|
||||
int display_columns = 0;
|
||||
uint8_t display_rows = 0;
|
||||
char screen_buffer_live[MAX_SCREEN_BUFFER_COLUMNS*MAX_SCREEN_BUFFER_ROWS];
|
||||
@ -304,11 +299,13 @@ void K3NGdisplay::update(){
|
||||
|
||||
// update the screen with changes that are pending in screen_buffer_pending
|
||||
|
||||
static int round_robin_refresh_position = 0;
|
||||
|
||||
lcd.noCursor();
|
||||
lcd.setCursor(0,0);
|
||||
|
||||
for (int x = 0;x < (display_columns*display_rows);x++){
|
||||
if (screen_buffer_live[x] != screen_buffer_pending[x]){ // do we have a new character to put on the screen ?
|
||||
if ((screen_buffer_live[x] != screen_buffer_pending[x]) || (x == round_robin_refresh_position)){ // do we have a new character to put on the screen ?
|
||||
lcd.setCursor(Xposition(x),Yposition(x));
|
||||
if (screen_buffer_attributes_pending[x] & ATTRIBUTE_BLINK){ // does this character have the blink attribute
|
||||
if (current_blink_state){
|
||||
@ -335,6 +332,11 @@ void K3NGdisplay::update(){
|
||||
}
|
||||
}
|
||||
|
||||
round_robin_refresh_position++;
|
||||
if (round_robin_refresh_position >= (display_columns*display_rows)){
|
||||
round_robin_refresh_position = 0;
|
||||
}
|
||||
|
||||
last_blink_state = current_blink_state;
|
||||
|
||||
}
|
||||
|
@ -67,7 +67,7 @@
|
||||
#include "rotator.h"
|
||||
#endif
|
||||
|
||||
#define K3NG_DISPLAY_LIBRARY_VERSION "2018.11.21.01"
|
||||
#define K3NG_DISPLAY_LIBRARY_VERSION "2020.03.16.01"
|
||||
#define MAX_SCREEN_BUFFER_COLUMNS 20
|
||||
#define MAX_SCREEN_BUFFER_ROWS 4
|
||||
|
||||
|
@ -6,23 +6,16 @@
|
||||
#define TARGET_STRING "Target "
|
||||
#define PARKING_STRING "Parking"
|
||||
#define PARKED_STRING "Parked"
|
||||
/*
|
||||
#define ROTATING_CW_STRING "Rotating CW" // depricated in 2015090402
|
||||
#define ROTATING_CCW_STRING "Rotating CCW"
|
||||
#define ROTATING_TO_STRING "Rotating to "
|
||||
#define ELEVATING_TO_STRING "Elevating to "
|
||||
#define ELEVATING_UP_STRING "Elevating Up"
|
||||
#define ELEVATING_DOWN_STRING "Elevating Down"
|
||||
#define ROTATING_STRING "Rotating "
|
||||
*/
|
||||
#define CW_STRING "CW"
|
||||
#define CCW_STRING "CCW"
|
||||
#define UP_STRING "UP"
|
||||
#define DOWN_STRING "DOWN"
|
||||
#define AZIMUTH_STRING "Azimuth "
|
||||
#define AZIMUTH_STRING_NO_SPACE "Azimuth"
|
||||
#define AZ_STRING "Az"
|
||||
#define AZ_SPACE_STRING "Az "
|
||||
#define ELEVATION_STRING "Elevation "
|
||||
#define ELEVATION_STRING_NO_SPACE "Elevation"
|
||||
#define SPACE_EL_STRING " El"
|
||||
#define SPACE_EL_SPACE_STRING " El "
|
||||
#define GPS_STRING "GPS"
|
||||
@ -42,6 +35,8 @@
|
||||
#define ESE_STRING "ESE"
|
||||
#define ENE_STRING "ENE"
|
||||
#define NNE_STRING "NNE"
|
||||
#define TOUCH_DISPLAY_TITLE "K3NG Rotator Controller"
|
||||
#define TOUCH_DISPLAY_STOP_STRING "Stop"
|
||||
#endif //LANGUAGE_ENGLISH
|
||||
|
||||
#ifdef LANGUAGE_SPANISH // Courtesy of Maximo, EA1DDO
|
||||
@ -66,9 +61,11 @@
|
||||
#define UP_STRING "Arriba"
|
||||
#define DOWN_STRING "Abajo"
|
||||
#define AZIMUTH_STRING "Azimuth "
|
||||
#define AZIMUTH_STRING_NO_SPACE "Azimuth"
|
||||
#define AZ_STRING "Az"
|
||||
#define AZ_SPACE_STRING "Az "
|
||||
#define ELEVATION_STRING "Elevation "
|
||||
#define ELEVATION_STRING_NO_SPACE "Elevation"
|
||||
#define SPACE_EL_STRING " El"
|
||||
#define SPACE_EL_SPACE_STRING " El "
|
||||
#define GPS_STRING "GPS"
|
||||
@ -88,6 +85,8 @@
|
||||
#define ESE_STRING "ESE"
|
||||
#define ENE_STRING "ENE"
|
||||
#define NNE_STRING "NNE"
|
||||
#define TOUCH_DISPLAY_TITLE "K3NG Rotator Controller"
|
||||
#define TOUCH_DISPLAY_STOP_STRING "Stop"
|
||||
#endif //LANGUAGE_SPANISH
|
||||
|
||||
#ifdef LANGUAGE_CZECH // courtesy of Jan, OK2ZAW
|
||||
@ -112,9 +111,11 @@
|
||||
#define UP_STRING "Nahoru"
|
||||
#define DOWN_STRING "Dolu"
|
||||
#define AZIMUTH_STRING "Azimut "
|
||||
#define AZIMUTH_STRING_NO_SPACE "Azimut"
|
||||
#define AZ_STRING "Az"
|
||||
#define AZ_SPACE_STRING "Az "
|
||||
#define ELEVATION_STRING "Elevation "
|
||||
#define ELEVATION_STRING_NO_SPACE "Elevation"
|
||||
#define SPACE_EL_STRING " El"
|
||||
#define SPACE_EL_SPACE_STRING " El "
|
||||
#define GPS_STRING "GPS"
|
||||
@ -134,6 +135,8 @@
|
||||
#define ESE_STRING "smer > 8Q"
|
||||
#define ENE_STRING "smer > ZL"
|
||||
#define NNE_STRING "smer ^ UA0"
|
||||
#define TOUCH_DISPLAY_TITLE "K3NG Rotator Controller"
|
||||
#define TOUCH_DISPLAY_STOP_STRING "Stop"
|
||||
#endif //LANGUAGE_CZECH
|
||||
|
||||
#ifdef LANGUAGE_ITALIAN // courtesy of Paolo, IT9IPQ
|
||||
@ -158,9 +161,11 @@
|
||||
#define UP_STRING "SU"
|
||||
#define DOWN_STRING "GIU'"
|
||||
#define AZIMUTH_STRING "Azimuth "
|
||||
#define AZIMUTH_STRING_NO_SPACE "Azimuth"
|
||||
#define AZ_STRING "Az"
|
||||
#define AZ_SPACE_STRING "Az "
|
||||
#define ELEVATION_STRING "Elevation "
|
||||
#define ELEVATION_STRING_NO_SPACE "Elevation"
|
||||
#define SPACE_EL_STRING " El"
|
||||
#define SPACE_EL_SPACE_STRING " El "
|
||||
#define GPS_STRING "GPS"
|
||||
@ -180,6 +185,8 @@
|
||||
#define ESE_STRING "ESE"
|
||||
#define ENE_STRING "ENE"
|
||||
#define NNE_STRING "NNE"
|
||||
#define TOUCH_DISPLAY_TITLE "K3NG Rotator Controller"
|
||||
#define TOUCH_DISPLAY_STOP_STRING "Stop"
|
||||
#endif //LANGUAGE_ITALIAN
|
||||
|
||||
#ifdef LANGUAGE_PORTUGUESE_BRASIL // courtesy of Ismael, PY4PI
|
||||
@ -204,9 +211,11 @@
|
||||
#define UP_STRING "SOBE"
|
||||
#define DOWN_STRING "DESCE"
|
||||
#define AZIMUTH_STRING "Azimute "
|
||||
#define AZIMUTH_STRING_NO_SPACE "Azimute"
|
||||
#define AZ_STRING "Az"
|
||||
#define AZ_SPACE_STRING "Az "
|
||||
#define ELEVATION_STRING "Elevation "
|
||||
#define ELEVATION_STRING_NO_SPACE "Elevation"
|
||||
#define SPACE_EL_STRING " El"
|
||||
#define SPACE_EL_SPACE_STRING " El "
|
||||
#define GPS_STRING "GPS"
|
||||
@ -226,6 +235,8 @@
|
||||
#define ESE_STRING "LSL"
|
||||
#define ENE_STRING "LNL"
|
||||
#define NNE_STRING "NNL"
|
||||
#define TOUCH_DISPLAY_TITLE "K3NG Rotator Controller"
|
||||
#define TOUCH_DISPLAY_STOP_STRING "Stop"
|
||||
#endif //LANGUAGE_PORTUGUESE_BRASIL
|
||||
|
||||
|
||||
@ -251,9 +262,11 @@
|
||||
#define UP_STRING "AUF"
|
||||
#define DOWN_STRING "AB"
|
||||
#define AZIMUTH_STRING "Azimuth "
|
||||
#define AZIMUTH_STRING_NO_SPACE "Azimuth"
|
||||
#define AZ_STRING "Az"
|
||||
#define AZ_SPACE_STRING "Az "
|
||||
#define ELEVATION_STRING "Elevation "
|
||||
#define ELEVATION_STRING_NO_SPACE "Elevation"
|
||||
#define SPACE_EL_STRING " El"
|
||||
#define SPACE_EL_SPACE_STRING " El "
|
||||
#define GPS_STRING "GPS"
|
||||
@ -273,6 +286,8 @@
|
||||
#define ESE_STRING "OSO (8Q)"
|
||||
#define ENE_STRING "ONO (ZL)"
|
||||
#define NNE_STRING "NNO (UA0)"
|
||||
#define TOUCH_DISPLAY_TITLE "K3NG Rotator Controller"
|
||||
#define TOUCH_DISPLAY_STOP_STRING "Stop"
|
||||
#endif //LANGUAGE_GERMAN
|
||||
|
||||
#ifdef LANGUAGE_FRENCH // contributed by Marc-Andre, VE2EVN
|
||||
@ -290,9 +305,11 @@
|
||||
#define CW_STRING "SH"
|
||||
#define CCW_STRING "SAH"
|
||||
#define AZIMUTH_STRING "Azimut "
|
||||
#define AZIMUTH_STRING_NO_SPACE "Azimut"
|
||||
#define AZ_STRING "Az"
|
||||
#define AZ_SPACE_STRING "Az "
|
||||
#define ELEVATION_STRING "Elevation "
|
||||
#define ELEVATION_STRING_NO_SPACE "Elevation"
|
||||
#define SPACE_EL_STRING " Él"
|
||||
#define SPACE_EL_SPACE_STRING " Él "
|
||||
#define GPS_STRING "GPS"
|
||||
@ -312,6 +329,8 @@
|
||||
#define ESE_STRING "ESE"
|
||||
#define ENE_STRING "ENE"
|
||||
#define NNE_STRING "NNE"
|
||||
#define TOUCH_DISPLAY_TITLE "K3NG Rotator Controller"
|
||||
#define TOUCH_DISPLAY_STOP_STRING "Arret"
|
||||
#endif //LANGUAGE_FRENCH
|
||||
|
||||
#ifdef LANGUAGE_DUTCH // Dutch language support courtesy of David, ON4BDS
|
||||
@ -336,9 +355,11 @@
|
||||
#define UP_STRING "OP"
|
||||
#define DOWN_STRING "Neer"
|
||||
#define AZIMUTH_STRING "Azimuth "
|
||||
#define AZIMUTH_STRING_NO_SPACE "Azimuth"
|
||||
#define AZ_STRING "Az"
|
||||
#define AZ_SPACE_STRING "Az "
|
||||
#define ELEVATION_STRING "Elevation "
|
||||
#define ELEVATION_STRING_NO_SPACE "Elevation"
|
||||
#define SPACE_EL_STRING " El"
|
||||
#define SPACE_EL_SPACE_STRING " El "
|
||||
#define GPS_STRING "GPS"
|
||||
@ -358,4 +379,6 @@
|
||||
#define ESE_STRING "OZO"
|
||||
#define ENE_STRING "ONO"
|
||||
#define NNE_STRING "NNO"
|
||||
#define TOUCH_DISPLAY_TITLE "K3NG Rotator Controller"
|
||||
#define TOUCH_DISPLAY_STOP_STRING "Stop"
|
||||
#endif //LANGUAGE_DUTCH
|
222
k3ng_rotator_controller/rotator_nextion.h
Normal file
222
k3ng_rotator_controller/rotator_nextion.h
Normal file
@ -0,0 +1,222 @@
|
||||
/* Nextion display settings and macros
|
||||
|
||||
Documentation: https://github.com/k3ng/k3ng_rotator_controller/wiki/425-Human-Interface:-Nextion-Display
|
||||
|
||||
|
||||
IMPORTANT !
|
||||
|
||||
|
||||
Be sure to edit NexConfig.h in your Nextion library directory:
|
||||
|
||||
Comment out line 27 as follows:
|
||||
//#define DEBUG_SERIAL_ENABLE
|
||||
|
||||
Comment out line 32 as follows:
|
||||
//#define dbSerial Serial
|
||||
|
||||
Edit line 37:
|
||||
#define nexSerial Serial //<-- Change "Serial to whatever Arduino Serial port you're connecting the Nextion display to (probably Serial1 or Serial2)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
// Page IDs
|
||||
#define NEXTION_PAGE_MAIN_ID 0
|
||||
#define NEXTION_PAGE_CONFIGURATION_ID 1
|
||||
#define NEXTION_PAGE_DIAGNOSTICS_ID 2
|
||||
#define NEXTION_PAGE_ABOUT_ID 3
|
||||
|
||||
|
||||
// Object Mappings - Update these to match the object names and IDs of the objects in your Nextion Editor HMI file. Comment out unused objects.
|
||||
|
||||
#define NEXTION_OBJNAME_MAIN_TITLE "tTitle"
|
||||
#define NEXTION_OBJID_MAIN_TITLE 1
|
||||
|
||||
#define NEXTION_OBJNAME_STATUS "tStat"
|
||||
#define NEXTION_OBJID_STATUS 7
|
||||
|
||||
#define NEXTION_OBJNAME_AZIMUTH_LABEL "tlblAz"
|
||||
#define NEXTION_OBJID_AZIMUTH_LABEL 2
|
||||
|
||||
#define NEXTION_OBJNAME_AZIMUTH_VALUE "tAz"
|
||||
#define NEXTION_OBJID_AZIMUTH_VALUE 3
|
||||
|
||||
#define NEXTION_OBJNAME_BUTTON_CW "bCW"
|
||||
#define NEXTION_OBJID_BUTTON_CW 17
|
||||
|
||||
#define NEXTION_OBJNAME_BUTTON_CCW "bCCW"
|
||||
#define NEXTION_OBJID_BUTTON_CCW 4
|
||||
|
||||
#define NEXTION_OBJNAME_BUTTON_UP "bUp"
|
||||
#define NEXTION_OBJID_BUTTON_UP 15
|
||||
|
||||
#define NEXTION_OBJNAME_BUTTON_DOWN "bDown"
|
||||
#define NEXTION_OBJID_BUTTON_DOWN 16
|
||||
|
||||
#define NEXTION_OBJNAME_BUTTON_STOP "bSTOP"
|
||||
#define NEXTION_OBJID_BUTTON_STOP 5
|
||||
|
||||
#define NEXTION_OBJNAME_ELEVATION_LABEL "tlblEl"
|
||||
#define NEXTION_OBJID_ELEVATION_LABEL 13
|
||||
|
||||
#define NEXTION_OBJNAME_ELEVATION_VALUE "tEl"
|
||||
#define NEXTION_OBJID_ELEVATION_VALUE 14
|
||||
|
||||
#define NEXTION_OBJNAME_GPS "tGPS"
|
||||
#define NEXTION_OBJID_GPS 7
|
||||
|
||||
#define NEXTION_OBJNAME_CLOCK "tClk"
|
||||
#define NEXTION_OBJID_CLOCK 8
|
||||
|
||||
#define NEXTION_OBJNAME_GRID "tGrid"
|
||||
#define NEXTION_OBJID_GRID 9
|
||||
|
||||
#define NEXTION_OBJNAME_COORDINATES "tCoord"
|
||||
#define NEXTION_OBJID_COORDINATES 10
|
||||
|
||||
#define NEXTION_OBJNAME_CODEVERSION "tCV"
|
||||
#define NEXTION_OBJID_CODEVERSION 5
|
||||
|
||||
#define NEXTION_OBJNAME_DIAGWINDOW "tDiag"
|
||||
#define NEXTION_OBJID_DIAGWINDOW 4
|
||||
|
||||
// Declare Nextion objects (page id, component id,component name) - do not touch these unless you know what you are doing
|
||||
|
||||
// Main Page
|
||||
#if defined(NEXTION_OBJNAME_MAIN_TITLE) && defined(NEXTION_OBJID_MAIN_TITLE)
|
||||
NexText tTitle = NexText(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_MAIN_TITLE, NEXTION_OBJNAME_MAIN_TITLE);
|
||||
#endif
|
||||
|
||||
#if defined(NEXTION_OBJNAME_STATUS) && defined(NEXTION_OBJID_STATUS)
|
||||
NexText tStatus = NexText(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_STATUS, NEXTION_OBJNAME_STATUS);
|
||||
#endif
|
||||
|
||||
#if defined(NEXTION_OBJNAME_GPS) && defined(NEXTION_OBJID_GPS)
|
||||
NexText tGPS = NexText(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_GPS, NEXTION_OBJNAME_GPS);
|
||||
#endif
|
||||
|
||||
#if defined(NEXTION_OBJNAME_CLOCK) && defined(NEXTION_OBJID_CLOCK)
|
||||
NexText tClock = NexText(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_CLOCK, NEXTION_OBJNAME_CLOCK);
|
||||
#endif
|
||||
|
||||
#if defined(NEXTION_OBJNAME_AZIMUTH_LABEL) && defined(NEXTION_OBJID_AZIMUTH_LABEL)
|
||||
NexText tAzLabel = NexText(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_AZIMUTH_LABEL, NEXTION_OBJNAME_AZIMUTH_LABEL);
|
||||
#endif
|
||||
|
||||
#if defined(NEXTION_OBJNAME_AZIMUTH_VALUE) && defined(NEXTION_OBJID_AZIMUTH_VALUE)
|
||||
NexText tAzValue = NexText(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_AZIMUTH_VALUE, NEXTION_OBJNAME_AZIMUTH_VALUE);
|
||||
#endif
|
||||
|
||||
#if defined(NEXTION_OBJNAME_ELEVATION_LABEL) && defined(NEXTION_OBJID_ELEVATION_LABEL)
|
||||
NexText tElLabel = NexText(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_ELEVATION_LABEL, NEXTION_OBJNAME_ELEVATION_LABEL);
|
||||
#endif
|
||||
|
||||
#if defined(NEXTION_OBJNAME_ELEVATION_VALUE) && defined(NEXTION_OBJID_ELEVATION_VALUE)
|
||||
NexText tElValue = NexText(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_ELEVATION_VALUE, NEXTION_OBJNAME_ELEVATION_VALUE);
|
||||
#endif
|
||||
|
||||
#if defined(NEXTION_OBJNAME_BUTTON_CW) && defined(NEXTION_OBJID_BUTTON_CW)
|
||||
NexButton bCW = NexButton(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_BUTTON_CW, NEXTION_OBJNAME_BUTTON_CW);
|
||||
#endif
|
||||
|
||||
#if defined(NEXTION_OBJNAME_BUTTON_CCW) && defined(NEXTION_OBJID_BUTTON_CCW)
|
||||
NexButton bCCW = NexButton(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_BUTTON_CCW, NEXTION_OBJNAME_BUTTON_CCW);
|
||||
#endif
|
||||
|
||||
#if defined(NEXTION_OBJNAME_BUTTON_UP) && defined(NEXTION_OBJID_BUTTON_UP)
|
||||
NexButton bUp = NexButton(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_BUTTON_UP, NEXTION_OBJNAME_BUTTON_UP);
|
||||
#endif
|
||||
|
||||
#if defined(NEXTION_OBJNAME_BUTTON_DOWN) && defined(NEXTION_OBJID_BUTTON_DOWN)
|
||||
NexButton bDown = NexButton(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_BUTTON_DOWN, NEXTION_OBJNAME_BUTTON_DOWN);
|
||||
#endif
|
||||
|
||||
#if defined(NEXTION_OBJNAME_BUTTON_STOP) && defined(NEXTION_OBJID_BUTTON_STOP)
|
||||
NexButton bSTOP = NexButton(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_BUTTON_STOP, NEXTION_OBJNAME_BUTTON_STOP);
|
||||
#endif
|
||||
|
||||
#if defined(NEXTION_OBJNAME_GRID) && defined(NEXTION_OBJID_GRID)
|
||||
NexText tGrid = NexText(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_GRID, NEXTION_OBJNAME_GRID);
|
||||
#endif
|
||||
|
||||
#if defined(NEXTION_OBJNAME_COORDINATES) && defined(NEXTION_OBJID_COORDINATES)
|
||||
NexText tCoordinates = NexText(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_COORDINATES, NEXTION_OBJNAME_COORDINATES);
|
||||
#endif
|
||||
|
||||
#if defined(NEXTION_OBJID_CODEVERSION) && defined(NEXTION_OBJNAME_CODEVERSION)
|
||||
NexText tCV = NexText(NEXTION_PAGE_ABOUT_ID, NEXTION_OBJID_CODEVERSION, NEXTION_OBJNAME_CODEVERSION);
|
||||
#endif
|
||||
|
||||
|
||||
// Diagnostics Page
|
||||
#if defined(NEXTION_OBJNAME_DIAGWINDOW) && defined(NEXTION_OBJID_DIAGWINDOW)
|
||||
NexText tDiag = NexText(NEXTION_PAGE_DIAGNOSTICS_ID, NEXTION_OBJID_DIAGWINDOW, NEXTION_OBJNAME_DIAGWINDOW);
|
||||
#endif
|
||||
|
||||
|
||||
// Page Navigation Buttons - we have to detect page changes because the data in the objects is volatile. (Why, Nextion, why?)
|
||||
#define NEXTION_OBJNAME_BUTTON_BACK "bBack"
|
||||
#define NEXTION_OBJNAME_BUTTON_NEXT "bNext"
|
||||
|
||||
#define NEXTION_OBJID_PAGE_MAIN_BUTTON_BACK 12
|
||||
#define NEXTION_OBJID_PAGE_MAIN_BUTTON_NEXT 11
|
||||
|
||||
#define NEXTION_OBJID_PAGE_CONFIGURATION_BUTTON_BACK 1
|
||||
#define NEXTION_OBJID_PAGE_CONFIGURATION_BUTTON_NEXT 2
|
||||
|
||||
#define NEXTION_OBJID_PAGE_DIAGNOSTICS_BUTTON_BACK 2
|
||||
#define NEXTION_OBJID_PAGE_DIAGNOSTICS_BUTTON_NEXT 1
|
||||
|
||||
#define NEXTION_OBJID_PAGE_ABOUT_BUTTON_BACK 3
|
||||
#define NEXTION_OBJID_PAGE_ABOUT_BUTTON_NEXT 4
|
||||
|
||||
|
||||
NexButton bBackPageMain = NexButton(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_PAGE_MAIN_BUTTON_BACK, NEXTION_OBJNAME_BUTTON_BACK);
|
||||
NexButton bNextPageMain = NexButton(NEXTION_PAGE_MAIN_ID, NEXTION_OBJID_PAGE_MAIN_BUTTON_NEXT, NEXTION_OBJNAME_BUTTON_NEXT);
|
||||
|
||||
NexButton bBackPageConfiguration = NexButton(NEXTION_PAGE_CONFIGURATION_ID, NEXTION_OBJID_PAGE_CONFIGURATION_BUTTON_BACK, NEXTION_OBJNAME_BUTTON_BACK);
|
||||
NexButton bNextPageConfiguration = NexButton(NEXTION_PAGE_CONFIGURATION_ID, NEXTION_OBJID_PAGE_CONFIGURATION_BUTTON_NEXT, NEXTION_OBJNAME_BUTTON_NEXT);
|
||||
|
||||
NexButton bBackPageDiagnostics = NexButton(NEXTION_PAGE_DIAGNOSTICS_ID, NEXTION_OBJID_PAGE_DIAGNOSTICS_BUTTON_BACK, NEXTION_OBJNAME_BUTTON_BACK);
|
||||
NexButton bNextPageDiagnostics = NexButton(NEXTION_PAGE_DIAGNOSTICS_ID, NEXTION_OBJID_PAGE_DIAGNOSTICS_BUTTON_NEXT, NEXTION_OBJNAME_BUTTON_NEXT);
|
||||
|
||||
NexButton bBackPageAbout = NexButton(NEXTION_PAGE_ABOUT_ID, NEXTION_OBJID_PAGE_ABOUT_BUTTON_BACK, NEXTION_OBJNAME_BUTTON_BACK);
|
||||
NexButton bNextPageAbout = NexButton(NEXTION_PAGE_ABOUT_ID, NEXTION_OBJID_PAGE_ABOUT_BUTTON_NEXT, NEXTION_OBJNAME_BUTTON_NEXT);
|
||||
|
||||
// Pages
|
||||
NexPage pageMain = NexPage(NEXTION_PAGE_MAIN_ID, 0, "Main");
|
||||
NexPage pageConfiguration = NexPage(NEXTION_PAGE_CONFIGURATION_ID, 0, "Configuration");
|
||||
NexPage pageDiagnostics = NexPage(NEXTION_PAGE_DIAGNOSTICS_ID, 0, "Diagnostics");
|
||||
NexPage pageAbout = NexPage(NEXTION_PAGE_ABOUT_ID, 0, "About");
|
||||
|
||||
|
||||
// Button registrations - do not touch these unless you know what you are doing
|
||||
NexTouch *nex_listen_list[] = {
|
||||
#if defined(NEXTION_OBJNAME_BUTTON_CW) && defined(NEXTION_OBJID_BUTTON_CW)
|
||||
&bCW,
|
||||
#endif
|
||||
#if defined(NEXTION_OBJNAME_BUTTON_CCW) && defined(NEXTION_OBJID_BUTTON_CCW)
|
||||
&bCCW,
|
||||
#endif
|
||||
#if defined(NEXTION_OBJNAME_BUTTON_STOP) && defined(NEXTION_OBJID_BUTTON_STOP)
|
||||
&bSTOP,
|
||||
#endif
|
||||
#if defined(NEXTION_OBJNAME_BUTTON_DOWN) && defined(NEXTION_OBJID_BUTTON_DOWN)
|
||||
&bDown,
|
||||
#endif
|
||||
#if defined(NEXTION_OBJNAME_BUTTON_UP) && defined(NEXTION_OBJID_BUTTON_UP)
|
||||
&bUp,
|
||||
#endif
|
||||
&bBackPageMain,
|
||||
&bNextPageMain,
|
||||
&bBackPageConfiguration,
|
||||
&bNextPageConfiguration,
|
||||
&bBackPageDiagnostics,
|
||||
&bNextPageDiagnostics,
|
||||
&bBackPageAbout,
|
||||
&bNextPageAbout,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
|
@ -141,10 +141,10 @@ You can tweak these, but read the online documentation!
|
||||
#define LCD_MOON_TRACKING_UPDATE_INTERVAL 5000
|
||||
#define LCD_SUN_TRACKING_ROW 4 // LCD display row for OPTION_DISPLAY_SUN_TRACKING_CONTINUOUSLY
|
||||
#define LCD_SUN_TRACKING_UPDATE_INTERVAL 5000
|
||||
#define LCD_MOON_OR_SUN_TRACKING_CONDITIONAL_ROW 3 // LCD display row for OPTION_DISPLAY_MOON_OR_SUN_TRACKING_CONDITIONAL
|
||||
#define LCD_MOON_OR_SUN_TRACKING_CONDITIONAL_ROW 4 // LCD display row for OPTION_DISPLAY_MOON_OR_SUN_TRACKING_CONDITIONAL
|
||||
#define SPLASH_SCREEN_TIME 3000
|
||||
#define LCD_PERIODIC_REDRAW_TIME_SECS 0 // set to 0 to totally disable periodically redrawing the screen
|
||||
#define LCD_CLEAR_BEFORE_REDRAW 1 // set to 0 to disable doing a clear before redraw
|
||||
#define LCD_CLEAR_BEFORE_REDRAW 0 // set to 0 to disable doing a clear before redraw
|
||||
#define LCD_REDRAW_UPON_COMMANDS 0 // set to 1 to enable screen redraws upon commands and button presses
|
||||
|
||||
#define LCD_HEADING_ROW 2
|
||||
@ -243,8 +243,6 @@ You can tweak these, but read the online documentation!
|
||||
#define SUN_AOS_ELEVATION_MIN 0
|
||||
#define SUN_AOS_ELEVATION_MAX 180
|
||||
|
||||
|
||||
|
||||
#define TRACKING_ACTIVE_CHAR "*"
|
||||
#define TRACKING_INACTIVE_CHAR "-"
|
||||
#define DISPLAY_DEGREES_STRING "\xDF"
|
||||
@ -263,7 +261,6 @@ You can tweak these, but read the online documentation!
|
||||
#define SYNC_MASTER_CLOCK_TO_SLAVE_CLOCK_SECS 10 // for OPTION_SYNC_MASTER_CLOCK_TO_SLAVE - use when GPS unit is connected to slave unit and you want to synchronize the master unit clock to the slave unit clock
|
||||
#define SYNC_MASTER_COORDINATES_TO_SLAVE_SECS 20 // for OPTION_SYNC_MASTER_COORDINATES_TO_SLAVE - use when GPS unit is connected to slave unit and you want to synchronize the master unit coordinates to the slave unit GPS
|
||||
|
||||
|
||||
#define ETHERNET_MAC_ADDRESS 0xDE,0xAD,0xBE,0xEF,0xFE,0xEE //<-DON'T FORGET TO USE DIFFERENT MAC ADDRESSES FOR MASTER AND SLAVE!!!
|
||||
#define ETHERNET_IP_ADDRESS 192,168,1,172 //<-DON'T FORGET TO USE DIFFERENT IP ADDRESSES FOR MASTER AND SLAVE!!!
|
||||
#define ETHERNET_IP_GATEWAY 192,168,1,1
|
||||
@ -280,11 +277,11 @@ You can tweak these, but read the online documentation!
|
||||
#define POWER_SWITCH_IDLE_TIMEOUT 15 // use with FEATURE_POWER_SWITCH; units are minutes
|
||||
|
||||
#ifdef HARDWARE_EA4TX_ARS_USB
|
||||
#define BUTTON_ACTIVE_STATE HIGH
|
||||
#define BUTTON_INACTIVE_STATE LOW
|
||||
#define BUTTON_ACTIVE_STATE HIGH
|
||||
#define BUTTON_INACTIVE_STATE LOW
|
||||
#else
|
||||
#define BUTTON_ACTIVE_STATE LOW
|
||||
#define BUTTON_INACTIVE_STATE HIGH
|
||||
#define BUTTON_ACTIVE_STATE LOW
|
||||
#define BUTTON_INACTIVE_STATE HIGH
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user