2017.08.02.01

FEATURE_AUTOPARK created and documented here https://github.com/k3ng/k3ng_rotator_controller/wiki/705-Park-and-AutoPark
This commit is contained in:
Anthony Good 2017-08-02 21:08:45 -04:00
parent 0f4e25b5c6
commit 31662cbc40
12 changed files with 159 additions and 470 deletions

View File

@ -4,7 +4,9 @@
K3NG
anthony.good@gmail.com
Documentation: https://github.com/k3ng/k3ng_rotator_controller/wiki
Support: https://groups.yahoo.com/neo/groups/radioartisan/info
Code contributions, testing, ideas, bug fixes, hardware, support, encouragement, and/or bourbon provided by:
John W3SA
@ -64,7 +66,7 @@
Rules for using this code:
Rule #1: Read the documentation.
Rule #1: Read the documentation at https://github.com/k3ng/k3ng_rotator_controller/wiki
Rule #2: Refer to rule #1.
@ -299,13 +301,19 @@
2017.08.01.01
Fixed local time display bugs and local time calculation for negative offset timezones (UTC-x)
2017.08.02.01
FEATURE_AUTOPARK created and documented here https://github.com/k3ng/k3ng_rotator_controller/wiki/705-Park-and-AutoPark
All library files should be placed in directories likes \sketchbook\libraries\library1\ , \sketchbook\libraries\library2\ , etc.
Anything rotator_*.* should be in the ino directory!
Documentation: https://github.com/k3ng/k3ng_rotator_controller/wiki
Support: https://groups.yahoo.com/neo/groups/radioartisan/info
*/
#define CODE_VERSION "2017.08.01.01"
#define CODE_VERSION "2017.08.02.01"
#include <avr/pgmspace.h>
#include <EEPROM.h>
@ -532,6 +540,8 @@ struct config_t {
#endif
byte brake_az_disabled;
float clock_timezone_offset;
byte autopark_active;
unsigned int autopark_time_minutes;
} configuration;
@ -1048,8 +1058,11 @@ void loop() {
service_rotation_indicator_pin();
#endif // FEATURE_ROTATION_INDICATOR_PIN
#ifdef FEATURE_PARK
#if defined(FEATURE_PARK)
service_park();
#if defined(FEATURE_AUTOPARK)
service_autopark();
#endif
#endif // FEATURE_PARK
#ifdef FEATURE_LIMIT_SENSE
@ -1581,8 +1594,6 @@ void check_az_preset_potentiometer() {
}
}
//zzzzzzz
if (check_pot) {
pot_read = analogReadEnhanced(az_preset_pot);
new_pot_azimuth = map(pot_read, AZ_PRESET_POT_FULL_CW, AZ_PRESET_POT_FULL_CCW, AZ_PRESET_POT_FULL_CW_MAP, AZ_PRESET_POT_FULL_CCW_MAP);
@ -4055,6 +4066,10 @@ void read_settings_from_eeprom(){
debug.print(configuration.azimuth_starting_point);
debug.print("az rotation capability:");
debug.print(configuration.azimuth_rotation_capability);
debug.print("autopark_active:");
debug.print(configuration.autopark_active);
debug.print("autopark_time_minutes:");
debug.print(configuration.autopark_time_minutes);
debug.println("");
}
#endif // DEBUG_EEPROM
@ -4143,6 +4158,8 @@ void initialize_eeprom_with_defaults(){
configuration.azimuth_rotation_capability = AZIMUTH_ROTATION_CAPABILITY_DEFAULT;
configuration.brake_az_disabled = 0; //(brake_az ? 1 : 0);
configuration.clock_timezone_offset = 0;
configuration.autopark_active = 0;
configuration.autopark_time_minutes = 0;
#ifdef FEATURE_ELEVATION_CONTROL
configuration.last_elevation = elevation;
@ -10818,13 +10835,88 @@ byte process_backslash_command(byte input_buffer[], int input_buffer_index, byte
break;
#endif // FEATURE_ANCILLARY_PIN_CONTROL
#if defined(FEATURE_AUTOPARK)
case 'Y':
if (input_buffer_index == 2){ // query command
if (configuration.autopark_active){
strcpy(return_string, "Autopark is on, timer: ");
dtostrf(configuration.autopark_time_minutes, 0, 0, temp_string);
strcat(return_string, temp_string);
strcat(return_string, " minutes");
} else {
strcpy(return_string, "Autopark is off");
}
}
if (input_buffer_index == 3){
if ((input_buffer[2] > 47) && (input_buffer[2] < 58)){
if (input_buffer[2] == 48){ // had to break this up - for some strange reason, properly written
strcpy(return_string, "Autopark off"); // this would not upload
configuration.autopark_active = 0;
configuration_dirty = 1;
}
if (input_buffer[2] != 48){
strcpy(return_string, "Autopark on, timer: ");
configuration.autopark_time_minutes = input_buffer[2] - 48;
dtostrf(configuration.autopark_time_minutes, 0, 0, temp_string);
strcat(return_string, temp_string);
strcat(return_string, " minute");
if (configuration.autopark_time_minutes > 1){
strcat(return_string, "s");
}
configuration.autopark_active = 1;
configuration_dirty = 1;
}
} else {
strcpy(return_string, "Error");
}
}
if (input_buffer_index == 4){
if ((input_buffer[2] > 47) && (input_buffer[2] < 58) && (input_buffer[3] > 47) && (input_buffer[3] < 58)){
strcpy(return_string, "Autopark on, timer: ");
configuration.autopark_time_minutes = ((input_buffer[2] - 48) * 10) + (input_buffer[3] - 48);
dtostrf(configuration.autopark_time_minutes, 0, 0, temp_string);
strcat(return_string, temp_string);
strcat(return_string, " minutes");
configuration.autopark_active = 1;
configuration_dirty = 1;
} else {
strcpy(return_string, "Error");
}
}
if (input_buffer_index == 5){
if ((input_buffer[2] > 47) && (input_buffer[2] < 58) && (input_buffer[3] > 47) && (input_buffer[3] < 58) && (input_buffer[4] > 47) && (input_buffer[4] < 58)){
strcpy(return_string, "Autopark on, timer: ");
configuration.autopark_time_minutes = ((input_buffer[2] - 48) * 100) + ((input_buffer[3] - 48) * 10) + (input_buffer[4] - 48);
dtostrf(configuration.autopark_time_minutes, 0, 0, temp_string);
strcat(return_string, temp_string);
strcat(return_string, " minutes");
configuration.autopark_active = 1;
configuration_dirty = 1;
} else {
strcpy(return_string, "Error");
}
}
if (input_buffer_index == 6){
if ((input_buffer[2] > 47) && (input_buffer[2] < 58) && (input_buffer[3] > 47) && (input_buffer[3] < 58) && (input_buffer[4] > 47) && (input_buffer[4] < 58) && (input_buffer[5] > 47) && (input_buffer[5] < 58)){
strcpy(return_string, "Autopark on, timer: ");
configuration.autopark_time_minutes = ((input_buffer[2] - 48) * 1000) + ((input_buffer[3] - 48) * 100) + ((input_buffer[4] - 48) * 10) + (input_buffer[5] - 48);
dtostrf(configuration.autopark_time_minutes, 0, 0, temp_string);
strcat(return_string, temp_string);
strcat(return_string, " minutes");
configuration.autopark_active = 1;
configuration_dirty = 1;
} else {
strcpy(return_string, "Error");
}
}
break;
#endif
// zzzzzzz
// TODO : one big status query command (get rid of all these little commands)
// TODO : one big status query command
#if !defined(OPTION_SAVE_MEMORY_EXCLUDE_REMOTE_CMDS)
#if !defined(OPTION_SAVE_MEMORY_EXCLUDE_EXTENDED_COMMANDS)
case '?':
strcpy(return_string, "\\!??"); // \\??xxyy - failed response back
@ -11233,9 +11325,7 @@ Not implemented yet:
#endif //!defined(OPTION_SAVE_MEMORY_EXCLUDE_REMOTE_CMDS)
#endif //!defined(OPTION_SAVE_MEMORY_EXCLUDE_EXTENDED_COMMANDS)
default: strcpy(return_string, "Error.");
@ -13034,5 +13124,38 @@ void test_display(){
#endif //FEATURE_TEST_DISPLAY_AT_STARTUP
//------------------------------------------------------
#if defined(FEATURE_AUTOPARK)
void service_autopark(){
static unsigned long last_activity_time = 0;
#if defined(FEATURE_ELEVATION_CONTROL)
if ((az_state != IDLE) || (el_state != IDLE) || (park_status == PARKED)){
last_activity_time = millis();
}
#else
if ((az_state != IDLE) || (park_status == PARKED)){
last_activity_time = millis();
}
#endif
if ((configuration.autopark_active) && ((millis() - last_activity_time) > (long(configuration.autopark_time_minutes) * 60000L))
&& ((park_status != PARK_INITIATED) || (park_status != PARKED))) {
#if defined(DEBUG_PARK)
debug.print(F("service_autopark: initiating park\n"));
#endif
initiate_park();
}
}
#endif //FEATURE_AUTOPARK
// that's all, folks !

View File

@ -120,6 +120,10 @@
#define HACK_REDUCED_DEBUG
#endif
#if defined(FEATURE_AUTOPARK) && !defined(FEATURE_PARK)
#define FEATURE_PARK
#endif

View File

@ -101,6 +101,7 @@
// #define FEATURE_TIMED_BUFFER // Support for Yaesu timed buffer commands
// #define OPTION_SERIAL_HELP_TEXT // Yaesu help command prints help
// #define FEATURE_PARK
// #define FEATURE_AUTOPARK // Requires FEATURE_PARK
// #define OPTION_AZ_MANUAL_ROTATE_LIMITS // this option will automatically stop the L and R commands when hitting a CCW or CW limit (settings are AZ_MANUAL_ROTATE_CCW_LIMIT, AZ_MANUAL_ROTATE_CW_LIMIT)
// #define OPTION_EL_MANUAL_ROTATE_LIMITS // (settings are EL_MANUAL_ROTATE_DOWN_LIMIT, EL_MANUAL_ROTATE_UP_LIMIT)
#define OPTION_EASYCOM_AZ_QUERY_COMMAND // Adds non-standard Easycom command: AZ with no parm returns current azimuth
@ -152,7 +153,7 @@
// #define OPTION_EL_PULSE_DEBOUNCE
// #define OPTION_SCANCON_2RMHF3600_INC_ENCODER // use with FEATURE_AZ_POSITION_INCREMENTAL_ENCODER and/or FEATURE_EL_POSITION_INCREMENTAL_ENCODER if using the ScanCon 2RMHF3600 incremental encoder
// #define OPTION_RESET_METHOD_JMP_ASM_0
// #define OPTION_SAVE_MEMORY_EXCLUDE_REMOTE_CMDS
// #define OPTION_SAVE_MEMORY_EXCLUDE_EXTENDED_COMMANDS
// #define OPTION_SEND_STRING_OUT_CONTROL_PORT_WHEN_INITIALIZING // change OPTION_SEND_STRING_OUT_CONTROL_PORT_WHEN_INITIALIZING_STRING in settings file
/* ---------------------- debug stuff - don't touch unless you know what you are doing --------------------------- */

View File

@ -30,6 +30,7 @@
//#define FEATURE_TIMED_BUFFER // Support for Yaesu timed buffer commands
//#define OPTION_SERIAL_HELP_TEXT // Yaesu help command prints help
//#define FEATURE_PARK
//#define FEATURE_AUTOPARK // Requires FEATURE_PARK
//#define OPTION_AZ_MANUAL_ROTATE_LIMITS // this option will automatically stop the L and R commands when hitting a CCW or CW limit (settings below - AZ_MANUAL_ROTATE_*_LIMIT)
//#define OPTION_EL_MANUAL_ROTATE_LIMITS
#define OPTION_EASYCOM_AZ_QUERY_COMMAND // Adds non-standard Easycom command: AZ with no parm returns current azimuth
@ -45,7 +46,7 @@
//#define FEATURE_POWER_SWITCH
//#define OPTION_EXTERNAL_ANALOG_REFERENCE //Activate external analog voltage reference (needed for RemoteQTH.com unit)
#define OPTION_DISPLAY_DIRECTION_STATUS
#define OPTION_SAVE_MEMORY_EXCLUDE_REMOTE_CMDS
#define OPTION_SAVE_MEMORY_EXCLUDE_EXTENDED_COMMANDS
//#define OPTION_DONT_READ_GPS_PORT_AS_OFTEN
// #define OPTION_SEND_STRING_OUT_CONTROL_PORT_WHEN_INITIALIZING // change OPTION_SEND_STRING_OUT_CONTROL_PORT_WHEN_INITIALIZING_STRING in settings file

View File

@ -97,6 +97,7 @@
//#define FEATURE_TIMED_BUFFER // Support for Yaesu timed buffer commands
//#define OPTION_SERIAL_HELP_TEXT // Yaesu help command prints help
//#define FEATURE_PARK
//#define FEATURE_AUTOPARK // Requires FEATURE_PARK
//#define OPTION_AZ_MANUAL_ROTATE_LIMITS // this option will automatically stop the L and R commands when hitting a CCW or CW limit (settings below - AZ_MANUAL_ROTATE_*_LIMIT)
//#define OPTION_EL_MANUAL_ROTATE_LIMITS
#define OPTION_EASYCOM_AZ_QUERY_COMMAND // Adds non-standard Easycom command: AZ with no parm returns current azimuth
@ -139,7 +140,7 @@
//#define OPTION_EL_PULSE_DEBOUNCE
//#define OPTION_SCANCON_2RMHF3600_INC_ENCODER // use with FEATURE_AZ_POSITION_INCREMENTAL_ENCODER and/or FEATURE_EL_POSITION_INCREMENTAL_ENCODER if using the ScanCon 2RMHF3600 incremental encoder
//#define OPTION_RESET_METHOD_JMP_ASM_0
#define OPTION_SAVE_MEMORY_EXCLUDE_REMOTE_CMDS
#define OPTION_SAVE_MEMORY_EXCLUDE_EXTENDED_COMMANDS
//#define OPTION_DONT_READ_GPS_PORT_AS_OFTEN
// #define OPTION_SEND_STRING_OUT_CONTROL_PORT_WHEN_INITIALIZING // change OPTION_SEND_STRING_OUT_CONTROL_PORT_WHEN_INITIALIZING_STRING in settings file

View File

@ -43,7 +43,7 @@
/* 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_ROTARY_ENCODER_USE_PJRC_LIBRARY // library @ http://www.pjrc.com/teensy/td_libs_Encoder.html
// #define FEATURE_AZ_POSITION_PULSE_INPUT
@ -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
@ -106,6 +106,7 @@
// #define FEATURE_TIMED_BUFFER // Support for Yaesu timed buffer commands
#define OPTION_SERIAL_HELP_TEXT // Yaesu help command prints help
#define FEATURE_PARK
// #define FEATURE_AUTOPARK // Requires FEATURE_PARK
#define OPTION_AZ_MANUAL_ROTATE_LIMITS // this option will automatically stop the L and R commands when hitting a CCW or CW limit (settings below - AZ_MANUAL_ROTATE_*_LIMIT)
#define OPTION_EL_MANUAL_ROTATE_LIMITS
#define OPTION_EASYCOM_AZ_QUERY_COMMAND // Adds non-standard Easycom command: AZ with no parm returns current azimuth
@ -155,7 +156,7 @@
// #define OPTION_EL_PULSE_DEBOUNCE
// #define OPTION_SCANCON_2RMHF3600_INC_ENCODER // use with FEATURE_AZ_POSITION_INCREMENTAL_ENCODER and/or FEATURE_EL_POSITION_INCREMENTAL_ENCODER if using the ScanCon 2RMHF3600 incremental encoder
// #define OPTION_RESET_METHOD_JMP_ASM_0
// #define OPTION_SAVE_MEMORY_EXCLUDE_REMOTE_CMDS
// #define OPTION_SAVE_MEMORY_EXCLUDE_EXTENDED_COMMANDS
// #define OPTION_REVERSE_AZ_HH12_AS5045
// #define OPTION_REVERSE_EL_HH12_AS5045
// #define OPTION_DONT_READ_GPS_PORT_AS_OFTEN

View File

@ -100,6 +100,7 @@
//#define FEATURE_TIMED_BUFFER // Support for Yaesu timed buffer commands
//#define OPTION_SERIAL_HELP_TEXT // Yaesu help command prints help
//#define FEATURE_PARK
//#define FEATURE_AUTOPARK // Requires FEATURE_PARK
//#define OPTION_AZ_MANUAL_ROTATE_LIMITS // this option will automatically stop the L and R commands when hitting a CCW or CW limit (settings below - AZ_MANUAL_ROTATE_*_LIMIT)
//#define OPTION_EL_MANUAL_ROTATE_LIMITS
#define OPTION_EASYCOM_AZ_QUERY_COMMAND // Adds non-standard Easycom command: AZ with no parm returns current azimuth
@ -139,7 +140,8 @@
//#define OPTION_NO_ELEVATION_CHECK_TARGET_DELAY
//#define OPTION_RESET_METHOD_JMP_ASM_0
//#define OPTION_DONT_READ_GPS_PORT_AS_OFTEN
// #define OPTION_SEND_STRING_OUT_CONTROL_PORT_WHEN_INITIALIZING // change OPTION_SEND_STRING_OUT_CONTROL_PORT_WHEN_INITIALIZING_STRING in settings file
//#define OPTION_SEND_STRING_OUT_CONTROL_PORT_WHEN_INITIALIZING // change OPTION_SEND_STRING_OUT_CONTROL_PORT_WHEN_INITIALIZING_STRING in settings file
//#define OPTION_SAVE_MEMORY_EXCLUDE_EXTENDED_COMMANDS
/*

View File

@ -153,7 +153,7 @@ You can tweak these, but read the online documentation!
#define BRAKE_ACTIVE_STATE HIGH
#define BRAKE_INACTIVE_STATE LOW
#define EEPROM_MAGIC_NUMBER 107
#define EEPROM_MAGIC_NUMBER 108
#define EEPROM_WRITE_DIRTY_CONFIG_TIME 30 //time in seconds
@ -322,97 +322,4 @@ You can tweak these, but read the online documentation!
#define POLOLU_LSM_303_MAX_ARRAY {+909, +491, +14}
#define AUTOCORRECT_TIME_MS_AZ 1000
#define AUTOCORRECT_TIME_MS_EL 1000
/* ---------------------------- object declarations ----------------------------------------------
Object declarations are required for several devices, including LCD displays, compass devices, and accelerometers
*/
/*
#if defined(FEATURE_4_BIT_LCD_DISPLAY) || defined(FEATURE_ADAFRUIT_I2C_LCD) || defined(FEATURE_YOURDUINO_I2C_LCD) || defined(FEATURE_YWROBOT_I2C_DISPLAY)
K3NGdisplay k3ngdisplay(LCD_COLUMNS,LCD_ROWS,LCD_UPDATE_TIME);
#endif
#ifdef FEATURE_AZ_POSITION_HMC5883L
HMC5883L compass;
#endif //FEATURE_AZ_POSITION_HMC5883L
#ifdef FEATURE_EL_POSITION_ADXL345_USING_LOVE_ELECTRON_LIB
ADXL345 accel;
#endif //FEATURE_EL_POSITION_ADXL345_USING_LOVE_ELECTRON_LIB
#ifdef FEATURE_EL_POSITION_ADXL345_USING_ADAFRUIT_LIB
Adafruit_ADXL345_Unified accel = Adafruit_ADXL345_Unified(12345);
#endif //FEATURE_EL_POSITION_ADXL345_USING_ADAFRUIT_LIB
#if defined(FEATURE_EL_POSITION_ADAFRUIT_LSM303) || defined(FEATURE_AZ_POSITION_ADAFRUIT_LSM303)
Adafruit_LSM303 lsm;
#endif
#if defined(FEATURE_AZ_POSITION_POLOLU_LSM303) || defined(FEATURE_EL_POSITION_POLOLU_LSM303)
LSM303 compass;
LSM303::vector<int16_t> running_min = {32767, 32767, 32767}, running_max = {-32768, -32768, -32768};
char report[80];
#endif //FEATURE_AZ_POSITION_POLOLU_LSM303
#ifdef FEATURE_AZ_POSITION_HH12_AS5045_SSI
#include "hh12.h"
hh12 azimuth_hh12;
#endif //FEATURE_AZ_POSITION_HH12_AS5045_SSI
#ifdef FEATURE_EL_POSITION_HH12_AS5045_SSI
#include "hh12.h"
hh12 elevation_hh12;
#endif //FEATURE_EL_POSITION_HH12_AS5045_SSI
#ifdef FEATURE_GPS
TinyGPS gps;
#endif //FEATURE_GPS
#ifdef FEATURE_RTC_DS1307
RTC_DS1307 rtc;
#endif //FEATURE_RTC_DS1307
#ifdef FEATURE_RTC_PCF8583
PCF8583 rtc(0xA0);
#endif //FEATURE_RTC_PCF8583
#ifdef HARDWARE_EA4TX_ARS_USB
#undef LCD_COLUMNS
#undef LCD_ROWS
#define LCD_COLUMNS 16
#define LCD_ROWS 2
#endif //HARDWARE_EA4TX_ARS_USB
#ifdef HARDWARE_M0UPU
#undef LCD_ROWS
#define LCD_ROWS 2
#endif //HARDWARE_M0UPU
#ifdef FEATURE_AZ_POSITION_A2_ABSOLUTE_ENCODER
#define AZ_A2_ENCODER_RESOLUTION 32767 //36000
#define AZ_A2_ENCODER_ADDRESS 0x00
#define AZ_QUERY_FREQUENCY_MS 250
#define AZ_A2_ENCODER_MODE MODE_TWO_BYTE_POSITION//|MODE_MULTITURN
#endif //FEATURE_AZ_POSITION_A2_ABSOLUTE_ENCODER
#ifdef FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER
#define EL_A2_ENCODER_RESOLUTION 32767 //36000
#define EL_A2_ENCODER_ADDRESS 0x00
#define EL_QUERY_FREQUENCY_MS 250
#define EL_A2_ENCODER_MODE MODE_MULTITURN//|MODE_TWO_BYTE_POSITION
#endif //FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER
#if defined(FEATURE_AZ_POSITION_A2_ABSOLUTE_ENCODER) || defined(FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER)
#include "sei_bus.h"
SEIbus SEIbus1(&Serial1,9600,pin_sei_bus_busy,pin_sei_bus_send_receive);
// (Serial Port,Baud Rate,Busy Pin,Send/Receive Pin)
#define SEI_BUS_COMMAND_TIMEOUT_MS 6000
#endif
*/
#define AUTOCORRECT_TIME_MS_EL 1000

View File

@ -149,7 +149,7 @@ You can tweak these, but read the online documentation!
#define BRAKE_ACTIVE_STATE HIGH
#define BRAKE_INACTIVE_STATE LOW
#define EEPROM_MAGIC_NUMBER 107
#define EEPROM_MAGIC_NUMBER 108
#define EEPROM_WRITE_DIRTY_CONFIG_TIME 30 //time in seconds
@ -315,74 +315,3 @@ You can tweak these, but read the online documentation!
#define AUTOCORRECT_TIME_MS_EL 1000
/* ---------------------------- object declarations ----------------------------------------------
Object declarations are required for several devices, including LCD displays, compass devices, and accelerometers
*/
/*
#if defined(FEATURE_4_BIT_LCD_DISPLAY) || defined(FEATURE_ADAFRUIT_I2C_LCD) || defined(FEATURE_YOURDUINO_I2C_LCD) || defined(FEATURE_YWROBOT_I2C_DISPLAY)
K3NGdisplay k3ngdisplay(LCD_COLUMNS,LCD_ROWS,LCD_UPDATE_TIME);
#endif
#ifdef FEATURE_AZ_POSITION_HMC5883L
HMC5883L compass;
#endif //FEATURE_AZ_POSITION_HMC5883L
#ifdef FEATURE_EL_POSITION_ADXL345_USING_LOVE_ELECTRON_LIB
ADXL345 accel;
#endif //FEATURE_EL_POSITION_ADXL345_USING_LOVE_ELECTRON_LIB
#ifdef FEATURE_EL_POSITION_ADXL345_USING_ADAFRUIT_LIB
Adafruit_ADXL345_Unified accel = Adafruit_ADXL345_Unified(12345);
#endif //FEATURE_EL_POSITION_ADXL345_USING_ADAFRUIT_LIB
#if defined(FEATURE_EL_POSITION_ADAFRUIT_LSM303) || defined(FEATURE_AZ_POSITION_ADAFRUIT_LSM303)
Adafruit_LSM303 lsm;
#endif
#if defined(FEATURE_AZ_POSITION_POLOLU_LSM303) || defined(FEATURE_EL_POSITION_POLOLU_LSM303)
LSM303 compass;
LSM303::vector<int16_t> running_min = {32767, 32767, 32767}, running_max = {-32768, -32768, -32768};
char report[80];
#endif //FEATURE_AZ_POSITION_POLOLU_LSM303
#ifdef FEATURE_AZ_POSITION_HH12_AS5045_SSI
#include "hh12.h"
hh12 azimuth_hh12;
#endif //FEATURE_AZ_POSITION_HH12_AS5045_SSI
#ifdef FEATURE_EL_POSITION_HH12_AS5045_SSI
#include "hh12.h"
hh12 elevation_hh12;
#endif //FEATURE_EL_POSITION_HH12_AS5045_SSI
#ifdef FEATURE_GPS
TinyGPS gps;
#endif //FEATURE_GPS
#ifdef FEATURE_RTC_DS1307
RTC_DS1307 rtc;
#endif //FEATURE_RTC_DS1307
#ifdef FEATURE_RTC_PCF8583
PCF8583 rtc(0xA0);
#endif //FEATURE_RTC_PCF8583
#ifdef HARDWARE_EA4TX_ARS_USB
#undef LCD_COLUMNS
#undef LCD_ROWS
#define LCD_COLUMNS 16
#define LCD_ROWS 2
#endif //HARDWARE_EA4TX_ARS_USB
#ifdef HARDWARE_M0UPU
#undef LCD_ROWS
#define LCD_ROWS 2
#endif //HARDWARE_M0UPU
*/

View File

@ -149,7 +149,7 @@ You can tweak these, but read the online documentation!
#define BRAKE_ACTIVE_STATE HIGH
#define BRAKE_INACTIVE_STATE LOW
#define EEPROM_MAGIC_NUMBER 107
#define EEPROM_MAGIC_NUMBER 108
#define EEPROM_WRITE_DIRTY_CONFIG_TIME 30 //time in seconds
@ -315,94 +315,3 @@ You can tweak these, but read the online documentation!
#define AUTOCORRECT_TIME_MS_EL 1000
/* ---------------------------- object declarations ----------------------------------------------
Object declarations are required for several devices, including LCD displays, compass devices, and accelerometers
*/
/*
#if !defined(UNDER_DEVELOPMENT_K3NGDISPLAY_LIBRARY)
#if defined(FEATURE_4_BIT_LCD_DISPLAY)
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);
#endif //FEATURE_4_BIT_LCD_DISPLAY
#ifdef FEATURE_ADAFRUIT_I2C_LCD
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();
#endif //FEATURE_ADAFRUIT_I2C_LCD
#ifdef FEATURE_YOURDUINO_I2C_LCD
#define I2C_ADDR 0x20
#define BACKLIGHT_PIN 3
#define LED_OFF 1
#define LED_ON 0
LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);
#endif //FEATURE_YOURDUINO_I2C_LCD
#ifdef FEATURE_RFROBOT_I2C_DISPLAY
LiquidCrystal_I2C lcd(0x27,16,2);
#endif //FEATURE_RFROBOT_I2C_DISPLAY
#else
K3NGdisplay k3ngdisplay(LCD_COLUMNS,LCD_ROWS,LCD_UPDATE_TIME);
#endif //!defined(UNDER_DEVELOPMENT_K3NGDISPLAY_LIBRARY)
#ifdef FEATURE_AZ_POSITION_HMC5883L
HMC5883L compass;
#endif //FEATURE_AZ_POSITION_HMC5883L
#ifdef FEATURE_EL_POSITION_ADXL345_USING_LOVE_ELECTRON_LIB
ADXL345 accel;
#endif //FEATURE_EL_POSITION_ADXL345_USING_LOVE_ELECTRON_LIB
#ifdef FEATURE_EL_POSITION_ADXL345_USING_ADAFRUIT_LIB
Adafruit_ADXL345_Unified accel = Adafruit_ADXL345_Unified(12345);
#endif //FEATURE_EL_POSITION_ADXL345_USING_ADAFRUIT_LIB
#if defined(FEATURE_EL_POSITION_ADAFRUIT_LSM303) || defined(FEATURE_AZ_POSITION_ADAFRUIT_LSM303)
Adafruit_LSM303 lsm;
#endif
#if defined(FEATURE_AZ_POSITION_POLOLU_LSM303) || defined(FEATURE_EL_POSITION_POLOLU_LSM303)
LSM303 compass;
LSM303::vector<int16_t> running_min = {32767, 32767, 32767}, running_max = {-32768, -32768, -32768};
char report[80];
#endif //FEATURE_AZ_POSITION_POLOLU_LSM303
#ifdef FEATURE_AZ_POSITION_HH12_AS5045_SSI
#include "hh12.h"
hh12 azimuth_hh12;
#endif //FEATURE_AZ_POSITION_HH12_AS5045_SSI
#ifdef FEATURE_EL_POSITION_HH12_AS5045_SSI
#include "hh12.h"
hh12 elevation_hh12;
#endif //FEATURE_EL_POSITION_HH12_AS5045_SSI
#ifdef FEATURE_GPS
TinyGPS gps;
#endif //FEATURE_GPS
#ifdef FEATURE_RTC_DS1307
RTC_DS1307 rtc;
#endif //FEATURE_RTC_DS1307
#ifdef FEATURE_RTC_PCF8583
PCF8583 rtc(0xA0);
#endif //FEATURE_RTC_PCF8583
#ifdef HARDWARE_EA4TX_ARS_USB
#undef LCD_COLUMNS
#undef LCD_ROWS
#define LCD_COLUMNS 16
#define LCD_ROWS 2
#endif //HARDWARE_EA4TX_ARS_USB
#ifdef HARDWARE_M0UPU
#undef LCD_ROWS
#define LCD_ROWS 2
#endif //HARDWARE_M0UPU
*/

View File

@ -163,7 +163,7 @@ You can tweak these, but read the online documentation!
#define BRAKE_ACTIVE_STATE HIGH
#define BRAKE_INACTIVE_STATE LOW
#define EEPROM_MAGIC_NUMBER 107
#define EEPROM_MAGIC_NUMBER 108
#define EEPROM_WRITE_DIRTY_CONFIG_TIME 30 //time in seconds
@ -345,101 +345,3 @@ You can tweak these, but read the online documentation!
// ## ######## ###### ##
/* ---------------------------- object declarations ----------------------------------------------
Object declarations are required for several devices, including LCD displays, compass devices, and accelerometers
*/
// #if defined(FEATURE_4_BIT_LCD_DISPLAY) || defined(FEATURE_ADAFRUIT_I2C_LCD) || defined(FEATURE_YOURDUINO_I2C_LCD) || defined(FEATURE_YWROBOT_I2C_DISPLAY)
// K3NGdisplay k3ngdisplay(LCD_COLUMNS,LCD_ROWS,LCD_UPDATE_TIME);
// #endif
// #ifdef FEATURE_AZ_POSITION_HMC5883L
// HMC5883L compass;
// #endif //FEATURE_AZ_POSITION_HMC5883L
// #ifdef FEATURE_EL_POSITION_ADXL345_USING_LOVE_ELECTRON_LIB
// ADXL345 accel;
// #endif //FEATURE_EL_POSITION_ADXL345_USING_LOVE_ELECTRON_LIB
// #ifdef FEATURE_EL_POSITION_ADXL345_USING_ADAFRUIT_LIB
// Adafruit_ADXL345_Unified accel = Adafruit_ADXL345_Unified(12345);
// #endif //FEATURE_EL_POSITION_ADXL345_USING_ADAFRUIT_LIB
// #if defined(FEATURE_EL_POSITION_ADAFRUIT_LSM303) || defined(FEATURE_AZ_POSITION_ADAFRUIT_LSM303)
// Adafruit_LSM303 lsm;
// #endif
// #if defined(FEATURE_AZ_POSITION_POLOLU_LSM303) || defined(FEATURE_EL_POSITION_POLOLU_LSM303)
// LSM303 compass;
// LSM303::vector<int16_t> running_min = {32767, 32767, 32767}, running_max = {-32768, -32768, -32768};
// char report[80];
// #endif //FEATURE_AZ_POSITION_POLOLU_LSM303
// #ifdef FEATURE_AZ_POSITION_HH12_AS5045_SSI
// #include "hh12.h"
// hh12 azimuth_hh12;
// #endif //FEATURE_AZ_POSITION_HH12_AS5045_SSI
// #ifdef FEATURE_EL_POSITION_HH12_AS5045_SSI
// #include "hh12.h"
// hh12 elevation_hh12;
// #endif //FEATURE_EL_POSITION_HH12_AS5045_SSI
// #ifdef FEATURE_GPS
// TinyGPS gps;
// #endif //FEATURE_GPS
// #ifdef FEATURE_RTC_DS1307
// RTC_DS1307 rtc;
// #endif //FEATURE_RTC_DS1307
// #ifdef FEATURE_RTC_PCF8583
// PCF8583 rtc(0xA0);
// #endif //FEATURE_RTC_PCF8583
// #ifdef HARDWARE_EA4TX_ARS_USB
// #undef LCD_COLUMNS
// #undef LCD_ROWS
// #define LCD_COLUMNS 16
// #define LCD_ROWS 2
// #endif //HARDWARE_EA4TX_ARS_USB
// #ifdef HARDWARE_M0UPU
// #undef LCD_ROWS
// #define LCD_ROWS 2
// #endif //HARDWARE_M0UPU
// #ifdef FEATURE_AZ_POSITION_A2_ABSOLUTE_ENCODER
// #define AZ_A2_ENCODER_RESOLUTION 32767 //36000
// #define AZ_A2_ENCODER_ADDRESS 0x00
// #define AZ_QUERY_FREQUENCY_MS 250
// #define AZ_A2_ENCODER_MODE MODE_TWO_BYTE_POSITION/*|MODE_MULTITURN*/
// #endif //FEATURE_AZ_POSITION_A2_ABSOLUTE_ENCODER
// #ifdef FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER
// #define EL_A2_ENCODER_RESOLUTION 32767 //36000
// #define EL_A2_ENCODER_ADDRESS 0x00
// #define EL_QUERY_FREQUENCY_MS 250
// #define EL_A2_ENCODER_MODE /*MODE_TWO_BYTE_POSITION|*/MODE_MULTITURN
// #endif //FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER
// #if defined(FEATURE_AZ_POSITION_A2_ABSOLUTE_ENCODER) || defined(FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER)
// #include "sei_bus.h"
// SEIbus SEIbus1(&Serial1,9600,pin_sei_bus_busy,pin_sei_bus_send_receive);
// // (Serial Port,Baud Rate,Busy Pin,Send/Receive Pin)
// #define SEI_BUS_COMMAND_TIMEOUT_MS 6000
// #endif
// ######## ######## ###### ########
// ## ## ## ## ##
// ## ## ## ##
// ## ###### ###### ##
// ## ## ## ##
// ## ## ## ## ##
// ## ######## ###### ##

View File

@ -150,7 +150,7 @@ You can tweak these, but read the online documentation!
#define BRAKE_ACTIVE_STATE HIGH
#define BRAKE_INACTIVE_STATE LOW
#define EEPROM_MAGIC_NUMBER 107
#define EEPROM_MAGIC_NUMBER 108
#define EEPROM_WRITE_DIRTY_CONFIG_TIME 30 //time in seconds
@ -314,97 +314,6 @@ You can tweak these, but read the online documentation!
#define POLOLU_LSM_303_MAX_ARRAY {+909, +491, +14}
#define AUTOCORRECT_TIME_MS_AZ 1000
#define AUTOCORRECT_TIME_MS_EL 1000
#define AUTOCORRECT_TIME_MS_EL 1000
/* ---------------------------- object declarations ----------------------------------------------
Object declarations are required for several devices, including LCD displays, compass devices, and accelerometers
*/
/*
#if defined(FEATURE_4_BIT_LCD_DISPLAY) || defined(FEATURE_ADAFRUIT_I2C_LCD) || defined(FEATURE_YOURDUINO_I2C_LCD) || defined(FEATURE_YWROBOT_I2C_DISPLAY)
K3NGdisplay k3ngdisplay(LCD_COLUMNS,LCD_ROWS,LCD_UPDATE_TIME);
#endif
#ifdef FEATURE_AZ_POSITION_HMC5883L
HMC5883L compass;
#endif //FEATURE_AZ_POSITION_HMC5883L
#ifdef FEATURE_EL_POSITION_ADXL345_USING_LOVE_ELECTRON_LIB
ADXL345 accel;
#endif //FEATURE_EL_POSITION_ADXL345_USING_LOVE_ELECTRON_LIB
#ifdef FEATURE_EL_POSITION_ADXL345_USING_ADAFRUIT_LIB
Adafruit_ADXL345_Unified accel = Adafruit_ADXL345_Unified(12345);
#endif //FEATURE_EL_POSITION_ADXL345_USING_ADAFRUIT_LIB
#if defined(FEATURE_EL_POSITION_ADAFRUIT_LSM303) || defined(FEATURE_AZ_POSITION_ADAFRUIT_LSM303)
Adafruit_LSM303 lsm;
#endif
#if defined(FEATURE_AZ_POSITION_POLOLU_LSM303) || defined(FEATURE_EL_POSITION_POLOLU_LSM303)
LSM303 compass;
LSM303::vector<int16_t> running_min = {32767, 32767, 32767}, running_max = {-32768, -32768, -32768};
char report[80];
#endif //FEATURE_AZ_POSITION_POLOLU_LSM303
#ifdef FEATURE_AZ_POSITION_HH12_AS5045_SSI
#include "hh12.h"
hh12 azimuth_hh12;
#endif //FEATURE_AZ_POSITION_HH12_AS5045_SSI
#ifdef FEATURE_EL_POSITION_HH12_AS5045_SSI
#include "hh12.h"
hh12 elevation_hh12;
#endif //FEATURE_EL_POSITION_HH12_AS5045_SSI
#ifdef FEATURE_GPS
TinyGPS gps;
#endif //FEATURE_GPS
#ifdef FEATURE_RTC_DS1307
RTC_DS1307 rtc;
#endif //FEATURE_RTC_DS1307
#ifdef FEATURE_RTC_PCF8583
PCF8583 rtc(0xA0);
#endif //FEATURE_RTC_PCF8583
#ifdef HARDWARE_EA4TX_ARS_USB
#undef LCD_COLUMNS
#undef LCD_ROWS
#define LCD_COLUMNS 16
#define LCD_ROWS 2
#endif //HARDWARE_EA4TX_ARS_USB
#ifdef HARDWARE_M0UPU
#undef LCD_ROWS
#define LCD_ROWS 2
#endif //HARDWARE_M0UPU
#ifdef FEATURE_AZ_POSITION_A2_ABSOLUTE_ENCODER
#define AZ_A2_ENCODER_RESOLUTION 32767 //36000
#define AZ_A2_ENCODER_ADDRESS 0x00
#define AZ_QUERY_FREQUENCY_MS 250
#define AZ_A2_ENCODER_MODE MODE_TWO_BYTE_POSITION//|MODE_MULTITURN
#endif //FEATURE_AZ_POSITION_A2_ABSOLUTE_ENCODER
#ifdef FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER
#define EL_A2_ENCODER_RESOLUTION 32767 //36000
#define EL_A2_ENCODER_ADDRESS 0x00
#define EL_QUERY_FREQUENCY_MS 250
#define EL_A2_ENCODER_MODE MODE_MULTITURN//|MODE_TWO_BYTE_POSITION
#endif //FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER
#if defined(FEATURE_AZ_POSITION_A2_ABSOLUTE_ENCODER) || defined(FEATURE_EL_POSITION_A2_ABSOLUTE_ENCODER)
#include "sei_bus.h"
SEIbus SEIbus1(&Serial1,9600,pin_sei_bus_busy,pin_sei_bus_send_receive);
// (Serial Port,Baud Rate,Busy Pin,Send/Receive Pin)
#define SEI_BUS_COMMAND_TIMEOUT_MS 6000
#endif
*/