mirror of
https://github.com/k3ng/k3ng_rotator_controller.git
synced 2024-12-19 05:07:55 +00:00
2.0.2016030201
Fixed FEATURE_ADAFRUIT_BUTTONS to work with k3ngdisplay library and updated k3ngdisplay library to support Adafruit RGB display buttons
This commit is contained in:
parent
7c85a2e72b
commit
0151272d12
@ -458,7 +458,10 @@
|
||||
DEBUG_HH12 more information output
|
||||
|
||||
2.0.2016030101
|
||||
FEATURE_AZ_POSITION_HH12_AS5045_SSI: AZIMUTH_STARTING_POINT_DEFAULT used in heading calculation now
|
||||
FEATURE_AZ_POSITION_HH12_AS5045_SSI: AZIMUTH_STARTING_POINT_DEFAULT used in heading calculation now
|
||||
|
||||
2.0.2016030201
|
||||
Fixed FEATURE_ADAFRUIT_BUTTONS to work with k3ngdisplay library and updated k3ngdisplay library to support Adafruit RGB display buttons
|
||||
|
||||
All library files should be placed in \sketchbook\libraries\some-directory\ in order to compile in Arduino IDE 1.6.7
|
||||
Anything rotator_*.* should be in the ino directory!
|
||||
@ -466,7 +469,7 @@
|
||||
|
||||
*/
|
||||
|
||||
#define CODE_VERSION "2.0.2016030101"
|
||||
#define CODE_VERSION "2.0.2016030201"
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
#include <EEPROM.h>
|
||||
@ -2965,7 +2968,8 @@ void check_buttons(){
|
||||
|
||||
#ifdef FEATURE_ADAFRUIT_BUTTONS
|
||||
int buttons = 0;
|
||||
buttons = lcd.readButtons();
|
||||
// buttons = lcd.readButtons();
|
||||
buttons = k3ngdisplay.readButtons();
|
||||
|
||||
if (buttons & BUTTON_RIGHT) {
|
||||
#else
|
||||
|
@ -65,7 +65,7 @@
|
||||
// And if you are using an Adafruit, Yourduino, RFRobot, or YWRobot display, you must change the feature setting in k3ngdisplay.h!!!!
|
||||
// #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
|
||||
// #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
|
||||
// #define FEATURE_RFROBOT_I2C_DISPLAY
|
||||
// #define FEATURE_YWROBOT_I2C_DISPLAY
|
||||
|
@ -63,7 +63,7 @@
|
||||
// And if you are using an Adafruit, Yourduino, RFRobot, or YWRobot display, you must change the feature setting in k3ngdisplay.h!!!!
|
||||
#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
|
||||
// #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
|
||||
//#define FEATURE_RFROBOT_I2C_DISPLAY
|
||||
//#define FEATURE_ANALOG_OUTPUT_PINS
|
||||
|
@ -68,10 +68,10 @@
|
||||
|
||||
|
||||
// All displays require k3ngdisplay.h and k3ngdisplay.cpp in a directory in \sketchbook\libraries\
|
||||
// And if you are using an Adafruit, Yourduino, RFRobot, or YWRobot display, you must change the feature setting in k3ngdisplay.h!!!!
|
||||
#define FEATURE_4_BIT_LCD_DISPLAY // Uncomment for classic 4 bit LCD display (most common)
|
||||
// **** And if you are using an Adafruit, Yourduino, RFRobot, or YWRobot display, you must change the feature setting in k3ngdisplay.h!!!!
|
||||
// #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
|
||||
// #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
|
||||
// #define FEATURE_RFROBOT_I2C_DISPLAY
|
||||
// #define FEATURE_YWROBOT_I2C_DISPLAY
|
||||
|
@ -64,7 +64,7 @@
|
||||
// And if you are using an Adafruit, Yourduino, RFRobot, or YWRobot display, you must change the feature setting in k3ngdisplay.h!!!!
|
||||
//#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
|
||||
// #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
|
||||
//#define FEATURE_RFROBOT_I2C_DISPLAY
|
||||
//#define FEATURE_YWROBOT_I2C_DISPLAY
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef K3NG_DISPLAY_H
|
||||
#define K3NG_DISPLAY_H
|
||||
|
||||
// K3NG_DISPLAY_LIBRARY_VERSION "1.0.2016012301"
|
||||
// K3NG_DISPLAY_LIBRARY_VERSION "1.0.2016030201"
|
||||
|
||||
|
||||
#if defined(ARDUINO) && ARDUINO >= 100
|
||||
@ -102,12 +102,12 @@ void K3NGdisplay::initialize(){
|
||||
// k3ngdisplay.h and k3ngdisplay.cpp from your ino directory
|
||||
|
||||
#ifdef FEATURE_YOURDUINO_I2C_LCD
|
||||
lcd.setBacklightPin(BACKLIGHT_PIN, POSITIVE);
|
||||
lcd.setBacklight(I2C_LCD_COLOR);
|
||||
lcd.setBacklightPin(BACKLIGHT_PIN, POSITIVE);
|
||||
lcd.setBacklight(I2C_LCD_COLOR);
|
||||
#endif // FEATURE_YOURDUINO_I2C_LCD
|
||||
|
||||
#ifdef FEATURE_ADAFRUIT_I2C_LCD
|
||||
lcd.setBacklight(I2C_LCD_COLOR);
|
||||
lcd.setBacklight(I2C_LCD_COLOR);
|
||||
#endif // FEATURE_ADAFRUIT_I2C_LCD
|
||||
|
||||
clear();
|
||||
@ -724,6 +724,14 @@ void K3NGdisplay::revert_back_screen(){
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
|
||||
#if defined(FEATURE_ADAFRUIT_BUTTONS)
|
||||
uint8_t K3NGdisplay::readButtons(){
|
||||
|
||||
return lcd.readButtons();
|
||||
|
||||
}
|
||||
#endif //FEATURE_ADAFRUIT_BUTTONS
|
||||
|
||||
|
||||
#endif //K3NG_DISPLAY_H
|
||||
|
||||
|
@ -17,10 +17,13 @@
|
||||
*/
|
||||
|
||||
#define FEATURE_4_BIT_LCD_DISPLAY
|
||||
//#define FEATURE_ADAFRUIT_I2C_LCD
|
||||
//#define FEATURE_YOURDUINO_I2C_LCD
|
||||
//#define FEATURE_RFROBOT_I2C_DISPLAY
|
||||
//#define FEATURE_YWROBOT_I2C_DISPLAY
|
||||
// #define FEATURE_ADAFRUIT_I2C_LCD
|
||||
// #define FEATURE_YOURDUINO_I2C_LCD
|
||||
// #define FEATURE_RFROBOT_I2C_DISPLAY
|
||||
// #define FEATURE_YWROBOT_I2C_DISPLAY
|
||||
|
||||
// #define FEATURE_ADAFRUIT_BUTTONS
|
||||
|
||||
|
||||
|
||||
#include "rotator_hardware.h"
|
||||
@ -57,8 +60,11 @@
|
||||
#include "rotator_pins.h"
|
||||
#endif
|
||||
|
||||
#if defined(FEATURE_ADAFRUIT_I2C_LCD)
|
||||
#include "rotator.h"
|
||||
#endif
|
||||
|
||||
#define K3NG_DISPLAY_LIBRARY_VERSION "1.0.2016012301"
|
||||
#define K3NG_DISPLAY_LIBRARY_VERSION "1.0.2016030201"
|
||||
#define MAX_SCREEN_BUFFER_COLUMNS 20
|
||||
#define MAX_SCREEN_BUFFER_ROWS 4
|
||||
|
||||
@ -67,6 +73,8 @@
|
||||
#define TEXT_BLINK_MS 500
|
||||
#define WORK_STRING_SIZE 32
|
||||
|
||||
#define I2C_LCD_COLOR GREEN // default color of I2C LCD display, including Adafruit and Yourduino; some Yourduino units may want this as LED_ON
|
||||
|
||||
class K3NGdisplay {
|
||||
|
||||
public:
|
||||
@ -117,6 +125,10 @@ public:
|
||||
int length(char * print_string);
|
||||
void clear_row(uint8_t row_number); // clear one entire row
|
||||
|
||||
#if defined(FEATURE_ADAFRUIT_BUTTONS)
|
||||
uint8_t readButtons();
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
void save_current_screen_to_revert_screen_buffer(); // used by the timed message functionality to push the current screen to a buffer for saving
|
||||
|
@ -106,7 +106,6 @@ You can tweak these, but read the online documentation!
|
||||
#define LCD_COLUMNS 20 //16
|
||||
#define LCD_ROWS 4 //2 // this is automatically set below for HARDWARE_EA4TX_ARS_USB and HARDWARE_M0UPU
|
||||
#define LCD_UPDATE_TIME 1000 // LCD update time in milliseconds
|
||||
#define I2C_LCD_COLOR GREEN // default color of I2C LCD display, including Adafruit and Yourduino; some Yourduino may want this as LED_ON
|
||||
#define LCD_HHMM_CLOCK_POSITION LEFT //LEFT or RIGHT
|
||||
#define LCD_HHMMSS_CLOCK_POSITION LEFT //LEFT or RIGHT
|
||||
#define LCD_ALT_HHMM_CLOCK_AND_MAIDENHEAD_POSITION LEFT
|
||||
|
@ -106,7 +106,6 @@ You can tweak these, but read the online documentation!
|
||||
#define LCD_COLUMNS 20 //16
|
||||
#define LCD_ROWS 4 //2 // this is automatically set below for HARDWARE_EA4TX_ARS_USB and HARDWARE_M0UPU
|
||||
#define LCD_UPDATE_TIME 1000 // LCD update time in milliseconds
|
||||
#define I2C_LCD_COLOR GREEN // default color of I2C LCD display, including Adafruit and Yourduino; some Yourduino may want this as LED_ON
|
||||
#define LCD_HHMM_CLOCK_POSITION LEFT //LEFT or RIGHT
|
||||
#define LCD_HHMMSS_CLOCK_POSITION LEFT //LEFT or RIGHT
|
||||
#define LCD_ALT_HHMM_CLOCK_AND_MAIDENHEAD_POSITION LEFT
|
||||
|
@ -106,7 +106,6 @@ You can tweak these, but read the online documentation!
|
||||
#define LCD_COLUMNS 20 //16
|
||||
#define LCD_ROWS 4 //2 // this is automatically set below for HARDWARE_EA4TX_ARS_USB and HARDWARE_M0UPU
|
||||
#define LCD_UPDATE_TIME 1000 // LCD update time in milliseconds
|
||||
#define I2C_LCD_COLOR GREEN // default color of I2C LCD display, including Adafruit and Yourduino; some Yourduino may want this as LED_ON
|
||||
#define LCD_HHMM_CLOCK_POSITION LEFT //LEFT or RIGHT
|
||||
#define LCD_HHMMSS_CLOCK_POSITION LEFT //LEFT or RIGHT
|
||||
#define LCD_ALT_HHMM_CLOCK_AND_MAIDENHEAD_POSITION LEFT
|
||||
|
@ -117,7 +117,6 @@ You can tweak these, but read the online documentation!
|
||||
#define LCD_COLUMNS 20 //16
|
||||
#define LCD_ROWS 4 //2 // this is automatically set below for HARDWARE_EA4TX_ARS_USB and HARDWARE_M0UPU
|
||||
#define LCD_UPDATE_TIME 1000 // LCD update time in milliseconds
|
||||
#define I2C_LCD_COLOR GREEN // default color of I2C LCD display, including Adafruit and Yourduino; some Yourduino may want this as LED_ON
|
||||
#define LCD_HHMM_CLOCK_POSITION LEFT //LEFT or RIGHT
|
||||
#define LCD_HHMMSS_CLOCK_POSITION LEFT //LEFT or RIGHT
|
||||
#define LCD_ALT_HHMM_CLOCK_AND_MAIDENHEAD_POSITION LEFT
|
||||
|
@ -107,7 +107,6 @@ You can tweak these, but read the online documentation!
|
||||
#define LCD_COLUMNS 20 //16
|
||||
#define LCD_ROWS 4 //2
|
||||
#define LCD_UPDATE_TIME 1000 // LCD update time in milliseconds
|
||||
#define I2C_LCD_COLOR GREEN // default color of I2C LCD display, including Adafruit and Yourduino; some Yourduino may want this as LED_ON
|
||||
#define LCD_HHMM_CLOCK_POSITION LEFT //LEFT or RIGHT
|
||||
#define LCD_HHMMSS_CLOCK_POSITION LEFT //LEFT or RIGHT
|
||||
#define LCD_ALT_HHMM_CLOCK_AND_MAIDENHEAD_POSITION LEFT
|
||||
|
Loading…
Reference in New Issue
Block a user