2018-08-03 22:23:20 -04:00
|
|
|
/*
|
|
|
|
Configuration file for Nextion LCD and Control MCU
|
|
|
|
The parameter can be set according to the CPU used.
|
|
|
|
|
|
|
|
KD8CEC, Ian Lee
|
|
|
|
-----------------------------------------------------------------------
|
|
|
|
|
|
|
|
**********************************************************************/
|
|
|
|
|
2021-01-21 10:44:06 -05:00
|
|
|
#include <Arduino.h>
|
2021-01-30 01:02:57 -05:00
|
|
|
#include "Debug.h"
|
|
|
|
#include "DSP.h"
|
2021-01-26 23:22:02 -05:00
|
|
|
#include "Nextion.h"
|
|
|
|
#include "Sensors.h"
|
2021-01-30 01:02:57 -05:00
|
|
|
#include "TR.h"
|
2018-08-03 22:23:20 -04:00
|
|
|
|
|
|
|
//================================================================
|
|
|
|
//COMMUNICATION SECTION
|
|
|
|
//================================================================
|
|
|
|
|
|
|
|
//================================================================
|
2021-01-21 12:37:27 -05:00
|
|
|
// FFT and Decode Morse
|
2018-08-03 22:23:20 -04:00
|
|
|
//================================================================
|
2021-01-21 12:37:27 -05:00
|
|
|
|
2018-08-03 22:23:20 -04:00
|
|
|
#define FFTSIZE 64
|
2021-01-21 12:37:27 -05:00
|
|
|
#define SAMPLE_FREQUENCY 6000
|
2018-08-03 22:23:20 -04:00
|
|
|
#define SAMPLESIZE (FFTSIZE * 2)
|
|
|
|
#define DECODE_MORSE_SAMPLESIZE 48
|
|
|
|
|
|
|
|
extern uint8_t cwDecodeHz;
|
|
|
|
extern int magnitudelimit_low;
|
|
|
|
|
|
|
|
//================================================================
|
2021-01-21 12:37:27 -05:00
|
|
|
// EEPROM Section
|
2018-08-03 22:23:20 -04:00
|
|
|
//================================================================
|
2021-01-21 12:37:27 -05:00
|
|
|
|
2018-08-03 22:23:20 -04:00
|
|
|
#define MAX_FORWARD_BUFF_LENGTH 128
|
|
|
|
#define EEPROM_DSPTYPE 100
|
|
|
|
#define EEPROM_SMETER_UART 111
|
|
|
|
#define EEPROM_SMETER_TIME 112
|
|
|
|
|
|
|
|
#define EEPROM_CW_FREQ 120
|
|
|
|
//#define EEPROM_CW_MAG_LIMIT 121
|
|
|
|
#define EEPROM_CW_MAG_LOW 122
|
|
|
|
#define EEPROM_CW_NBTIME 126
|
|
|
|
#define EEPROM_RTTYDECODEHZ 130
|
|
|
|
|
|
|
|
//================================================================
|
2021-01-21 12:37:27 -05:00
|
|
|
// DEFINE for I2C Command
|
2018-08-03 22:23:20 -04:00
|
|
|
//================================================================
|
2021-01-21 12:37:27 -05:00
|
|
|
|
2018-08-03 22:23:20 -04:00
|
|
|
//S-Meter Address
|
|
|
|
#define I2CMETER_ADDR 0x58 //changed from 0x6A
|
|
|
|
//VALUE TYPE============================================
|
|
|
|
//Signal
|
|
|
|
#define I2CMETER_CALCS 0x59 //Calculated Signal Meter
|
|
|
|
#define I2CMETER_UNCALCS 0x58 //Uncalculated Signal Meter
|
|
|
|
|
|
|
|
//Power
|
|
|
|
#define I2CMETER_CALCP 0x57 //Calculated Power Meter
|
|
|
|
#define I2CMETER_UNCALCP 0x56 //UnCalculated Power Meter
|
|
|
|
|
|
|
|
//SWR
|
|
|
|
#define I2CMETER_CALCR 0x55 //Calculated SWR Meter
|
|
|
|
#define I2CMETER_UNCALCR 0x54 //Uncalculated SWR Meter
|