Skip to content

(5) Settings (FaraRotation_Settings.h)

Massimo 'Max' Mucci edited this page Jun 27, 2023 · 1 revision

Your default Callsign and Grid.
They can be modified from the Config page and saved in EEPROM.
Make sure not to exceed the maximum length otherwise strange things can happen:
#define CALLSIGN " N5NHJ " // ATTENTION!: Max 9 characters
#define GRID "EM13pc" // ATTENTION: Max 6 characters


#define UTCDIFF 0 // Time Difference between Real Time Clock and GMT


Serial/Control port definition if you need to look at debug messages:
#define CONTROL_PORT_MAPPED_TO &Serial
#define CONTROL_PORT_BAUD_RATE 115200


Nextion Serial Port Settings. For the Mega 2560 follow this reference table:

Serial pins
0  0 (RX) and 1 (TX)
1 19 (RX) and 18 (TX)
2 17 (RX) and 16 (TX)
3 15 (RX) and 14 (TX)

#define NEXTION_PORT_MAPPED_TO &Serial3
#define NEXTION_PORT_BAUD_RATE 115200


Enabling and Disabling PROGRAM FEATURES: (You want to activate only one of the following two definitions)
#define DIGITAL_OUTPUT  Uncomment this if you want to use ON/OFF like motor drivers (Relays..).
#define PWM_OUTPUT  Uncomment this if you want to use PWM-capable motor drivers.

#define SLOW_START_STOP  Uncomment this if you want to activate the slow start/stop feature over PWM-capable pins. Only works if PWM_OUTPUT is enabled.
#define PTT_AUTOMATION  Uncomment this if you want to activate the PTT automation feature.
#define EXTERNAL_REFERENCE  Uncomment this if you need a more accurate and stable reading of the potentiometers. Provide the 5V reference to the VREF pin.
#define ONE_ANTENNA  (NOT FULLY IMPLEMENTED YET) Uncomment this to have only the RX (or single) antenna/array controls on the Nextion GUI.


PWM AND SLOW START/STOP CONFIGURATION
#define PWM_SPEED 255  Max speed for a PWM controlled drive (0 to 255)
#define SLOW_START_STOP_MIN 50  Min speed for the slow start/stop feature
#define SLOW_START_STOP_DELAY 200  Duration of the ramp-up, slow-down loop to control the slow start/stop feature
#define SLOW_START_STOP_STEPS 50  Increments or decrements of the speed for each loop
#define SLOW_START_STOP_PROXIMITY 3  Distance from the target for starting the slow start/stop loop (Degrees)


TIMING CONFIGURATION FOR MAJOR ACTIONS AND LOOPS
#define POTS_READING_RATE 100 // Potentiometer reading loop timing (millisecs) Nextion timer refresh is set to 100ms
#define INFO_SENDING_RATE 1000 // Info broadcasting timing (millisecs)
#define STATUS_SENDING_RATE 250 // Info broadcasting timing (millisecs)
#define RTC_READING_RATE 1000 // RTC reading timing (millisecs)
#define PTT_CHECKING_RATE 200 // RTC reading timing (millisecs)
#define ACTION_LOOP_RATE 50 // Reaction loop timing (millisecs)
#define CONTROL_PORT_READ_RATE 500 // NOT IN USE
#define NEXTION_PORT_READ_RATE 250 // Command loop timing (millisecs)

Clone this wiki locally