2020.03.08.01

Change made to ensure slow start completes before slow stop activates
      Add \H command line interface command - clear and redraw the LCD display
This commit is contained in:
Anthony Good 2020-03-08 11:35:33 -04:00
parent 76f24cf832
commit ac0be598e7
2 changed files with 24 additions and 12 deletions

View File

@ -419,16 +419,20 @@
Fixed bug with sun and moon tracking deactivation not stopping rotation (Thanks Steve VE3RX)
Minor addition in the k3ngdisplay code for display updates and redraws
2020.03.08.01
Change made to ensure slow start completes before slow stop activates
Add \H command line interface command - clear and redraw the LCD display
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
Support: https://groups.io/g/radioartisan
*/
#define CODE_VERSION "2020.03.07.01"
#define CODE_VERSION "2020.03.08.01"
#include <avr/pgmspace.h>
#include <EEPROM.h>
@ -8031,7 +8035,8 @@ void service_rotation(){
// normal -------------------------------------------------------------------------------------------------------------------
// if slow down is enabled, see if we're ready to go into slowdown
if (((az_state == NORMAL_CW) || (az_state == SLOW_START_CW) || (az_state == NORMAL_CCW) || (az_state == SLOW_START_CCW)) &&
//if (((az_state == NORMAL_CW) || (az_state == SLOW_START_CW) || (az_state == NORMAL_CCW) || (az_state == SLOW_START_CCW)) &&
if (((az_state == NORMAL_CW) || (az_state == NORMAL_CCW)) &&
(az_request_queue_state == IN_PROGRESS_TO_TARGET) && az_slowdown_active && (abs((target_raw_azimuth - raw_azimuth) / HEADING_MULTIPLIER) <= SLOW_DOWN_BEFORE_TARGET_AZ)) {
byte az_state_was = az_state;
@ -11595,6 +11600,13 @@ byte process_backslash_command(byte input_buffer[], int input_buffer_index, byte
reset_the_unit = 1;
break;
#if defined(FEATURE_LCD_DISPLAY)
case 'H':
k3ngdisplay.clear();
k3ngdisplay.redraw();
break;
#endif
case 'Q': // \Q - Save settings in the EEPROM and restart
write_settings_to_eeprom();
strcpy(return_string, "Settings saved in EEPROM, resetting unit in 5 seconds...");

View File

@ -17,16 +17,16 @@
#define pins_h
#define rotate_cw A3 //6 // goes high to activate rotator R (CW) rotation - pin 1 on Yaesu connector
#define rotate_ccw A2 //7 // goes high to activate rotator L (CCW) rotation - pin 2 on Yaesu connector
#define rotate_cw 33 //A3 //6 // goes high to activate rotator R (CW) rotation - pin 1 on Yaesu connector
#define rotate_ccw 31 //A2 //7 // goes high to activate rotator L (CCW) rotation - pin 2 on Yaesu connector
#define rotate_cw_ccw 0 // goes high for both CW and CCW rotation
#define rotate_cw_pwm 0 // optional - PWM CW output - set to 0 to disable (must be PWM capable pin)
#define rotate_ccw_pwm 0 // optional - PWM CCW output - set to 0 to disable (must be PWM capable pin)
#define rotate_cw_ccw_pwm 0
#define rotate_cw_freq 0
#define rotate_ccw_freq 0
#define button_cw 0 //A1 // normally open button to ground for manual CW rotation
#define button_ccw 0 //A2 // normally open button to ground for manual CCW rotation
#define button_cw 47 //0 //A1 // normally open button to ground for manual CW rotation
#define button_ccw 49 //0 //A2 // normally open button to ground for manual CCW rotation
#define serial_led 13 //0 // LED blinks when command is received on serial port (set to 0 to disable)
#define rotator_analog_az A0 // reads analog azimuth voltage from rotator - pin 4 on Yaesu connector
#define azimuth_speed_voltage 0 // optional - PWM output for speed control voltage feed into rotator (on continually unlike rotate_cw_pwm and rotate_ccw_pwm)
@ -35,7 +35,7 @@
#define az_speed_pot 0 //A4 // connect to wiper of 1K to 10K potentiometer for speed control (set to 0 to disable)
#define az_preset_pot 0 // connect to wiper of 1K to 10K potentiometer for preset control (set to 0 to disable)
#define preset_start_button 0 //10 // connect to momentary switch (ground on button press) for preset start (set to 0 to disable or for preset automatic start)
#define button_stop 0 // connect to momentary switch (ground on button press) for preset stop (set to 0 to disable or for preset automatic start)
#define button_stop 41 //0 // connect to momentary switch (ground on button press) for preset stop (set to 0 to disable or for preset automatic start)
#define rotation_indication_pin 0
#define blink_led 0
#define az_stepper_motor_pulse 0
@ -46,8 +46,8 @@
// elevation pins
#ifdef FEATURE_ELEVATION_CONTROL
#define elevation_speed_voltage 0 // optional - PWM output for speed control voltage feed into rotator (on continually unlike rotate_up_pwm and rotate_down_pwm)
#define rotate_up A5 //9//9 // goes high to activate rotator elevation up
#define rotate_down A4 //8 // goes high to activate rotator elevation down
#define rotate_up 37 //A5 //9//9 // goes high to activate rotator elevation up
#define rotate_down 35 //A4 //8 // goes high to activate rotator elevation down
#define rotate_up_or_down 0
#define rotate_up_pwm 0
#define rotate_down_pwm 0
@ -55,8 +55,8 @@
#define rotate_up_freq 0
#define rotate_down_freq 0
#define rotator_analog_el A1 // reads analog elevation voltage from rotator
#define button_up 0 // normally open button to ground for manual up elevation
#define button_down 0 // normally open button to ground for manual down rotation
#define button_up 43 // normally open button to ground for manual up elevation
#define button_down 45 // normally open button to ground for manual down rotation
#define brake_el 0 // goes high to disengage elevation brake (set to 0 to disable)
#define el_stepper_motor_pulse 0
#define el_stepper_motor_direction 0