// =====================================================================================================================================================================================================
// (c) 2021 Lynn Hansen, KU7Q															                                                                                                               |
// This Source Code Form is subject to the terms of the GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007. A copy of this license can be found here: https://choosealicense.com/licenses/gpl-3.0/
// =====================================================================================================================================================================================================



CTR2 Revision Notes
===================
>>> NOTE: If you get a "Failed to init SD card. Is card formatted FAT32" error when trying to upload to display with SD card, 
    reload Nextion .tft file using USB/TTL adapter - this will clear the error (hopefully) so the SD card works again.
		   
TO-DO 
1. Add code to automatically switch to local hmi display if remote display fails (unplugged) during operation
2. Figure out how to download the log file in BuildSvrReply()
3. Still having issues with rtty rx data missing in rxM.
4. Finish voice announcements  
5. TEST SAVELOGFROMHMI() routine!! check adi log for correct data

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8/11/21
1. Worked on bug locking proc code up if loading a blank radio profile
  a. Was exiting LoadRadio() if a new radio file was created - this didn't allow the hmi to get updated with the default radio data
  b. Was skipping creating new aux files when erasing a radio

8/4/21
1. Intermittantly not loading all radio settings on boot
   a. Match hmiPagePrev to hmiPage after setup completes
   b. blockHMI for 1 second after setup completes to allow HMI to process changes
2. CW settings not sticking
   a. Added global variables for hSideTn, hTxSpeed, and hFarnSp and made these controls local

8/2/21
1. Allow antenna switching only in Rx mode
2. Fixed bug that was causing gMSel to continually update once a memory was selected
3. Intermittant band change when returning from Band page
   a. Delay return from Band page for 1 second when selecting bands so HMI has time to update
4. Fixed bug in UpdateFFT - was looking for wrong state of hmiTransparentMode

7/30/21
1. Speed up changes on Home page by sending TxHome(0) on any control change - encoder lagged behind Home page component state
2. Added gFlexIP to Flex page Dec_StringInfo() to send IP adrs to proc

7/29/21
1. Fixed bug in CW audio setup - found gNFltr = 0 which causes filter to oscillate
  a. Added code in SetFilterFreq() to detect out of range values and set them to default values
2. Combined routines that checked for filter changes into ChkFilterChng()
3. Fixed bug detecting gFreqRadio change - not updating HMI band
4. Changed Levels page to show "=" on all amps when bypassed (0 gain)

7/28/21
1. Revised code that switches between the TxInfo packets on the Home page
2. Added volume control to Audio page

7/27/21
1. Updated code to use .wav files instead of .raw for announcements - still have issues with recording files

7/26/21
1. TeensyDuino 1.54 not playing announcement files - long timeout for each digit
2. Added gRadio=0 and reset antenna switch settings in EraseRadio() 
3. Always update hmiPage from display's TxInfo in Dec_TxInfo
4. .raw files not playing or recording under Teensyduino 1.54 - replace them with .WAV files

7/13/21
1. Upgraded to TeensyDuino 1.54

6/16/21
1. Fixed bug in memory select, was setting gMSelPtr = gMSel in UpdateHMIEachPoll() when freq changed. Only set it if gMSel != 0 otherwise it gets out of sync with gMSelPtr
2. Cleaned up UpdateBeacon() - put rtc4 and rtc5 data into HomePkt1 info
3. Moved Audio adapter setup code to top of Setup() and AudioMemory(50) to bottom of Setup() to see if location of audio memory makes any difference in random noise issue

6/15/21
1. Added CR/LF to terminal output so Putty works

6/12/21
1. Key radio for 25 mS before switching audio paths

6/08/21
1. More theme changes - use dark gray/violet
 
6/07/21
1. Code changes to support Black theme

6/04/21
1. Added graphics to Levels page
2. Added Line In, Mic In, and USB In amps to audio design

6/03/21
1. Updated Help text on both displays to remove WWV mode and add new modes on Config page
2. Added Levels page to Help and adjusted 
3. Fixed bugs with saving gFFTAvrg flag & renamed gVoice to gVocal for voice announcement

6/02/21
1. Fixed FFT ID#'s - they got corrupted when the Home page was updated

6/01/21
1. ----> REMOVED WWV OPTION - not working and even when it did, it took too long to sync
2. Added Settings page and supporting variables - this page allows you to change default amp levels on a per radio basis

5/31/21
1. Added option to enable or disable digital filtering in Digital mode
2. Added force flag to SetEqualizer()
3. Worked on WWV decoder code - not working right again
   a. Decoder is not clocking in data reliably - probably just nee to rip it out and forget it - the 100 Hz decode is too slow for what I'm trying to do

5/26/21
1. Fixed code in ChkRxSq() to override mute if sq ctrl is < 10 - was < 5 and didn't always execute properly
   a. Dropped level mulitiplier from 20k to 10k - seems to give the squelch control more authority
2. Added two disclaimer pages to Help - open them on startup if user hasn't read page 2 of disclosure

5/25/21
1. Removed rounding fix from 5/24 - not working. Without it we get a few messages about integer truncation - not important

5/24/21
1. Streamlined ChkFFT routines to eliminate delay() statements
   a. Reduced fft update time from 430 to 300 mS
2. Streamlined ChkHmiRx() to eliminate delay() statements
3. Don't use unfiltered Tx and Rx auto for Dig mode - allow lp and notch filters on dig rx
4. Added Hotspot to R:A button on HMI to go straight to Ant page
5. Flash R:A button if no antenna selected (gAnt==0)
6. Fixed a couple of warnings (round() and one = instead of == errors

5/23/21
1. Added [Disable] button to Ant page - this temporarily disables all antennas until [Enabled] again or hmi restarts
2. Save default ant tag (-- # --) if new tag is 0 length
3. Switch to Tx audio source before keying radio in ChkTxVOX - was getting noise bursts
4. Don't use unfiltered Tx audio for Dig mode - it causes noise burst on keyup

5/22/21
1. Debugging Tx audio issues
  a. <<< DON'T POLL FOR RADIO FREQ/MODE CHANGES IN TX MODE >>
	 <<< CAT DATA IS CAUSING PULSING NOISE IN TX AUDIO >>
2. Only use Tx VOX in Digital mode - too sensitive for mic use	 

5/20/21
1. Debugging Rx->SD recording
  a. Save TxMem array when starting recording
2. This did not work >>>>> Converted audio files to .WAV format - see https://gist.github.com/JarvusChen/fb641cad18eca4988a9e83a9ce65f42f
  a. playSdWav object locks up when playing converted voice files - went back to .WAV files

5/19/21
1. Fixed bugs in SD playback code
2. Fixed bug in DecEncoderChng() - was setting blockHMI=500, not millis()+500
3. Moved Rx>SD recording indication to tInfo boxes on home page 

5/18/21
1. Fixed bugs in voice equalizer 3.5" HMI code
2. Fixed bug in SetRadioBaud() - not converting baud[] to string in SerialOut call
3. Added code to fail out of ESP8266 initialization if it's not found in Setup()

5/3/21
1. Leave ANT_SW_STROBE high when not in use. It's tied to INHIBIT so this releases the last relay when latching new settings into Ant Sw board 
2. Removed the additional gain from the USB Tx output - too much output - Audio.ino: Output_Source.gain(2, LEV_OUT_SRC2 + 5.0)

4/29/21
1. Working on Ant Switch code
   a. Added reset option to clear all ant selections
   b. Reset all ants then  set new ant

4/28/21
1. Added Edit page to block TxInfo downloads
2. Moved the HMI update code from the Dec_xxx routines to the ChkEncoderChng() routine - don't echo back changes detected from HMI info blocks

4/27/21
1. Added encoder scroll to log pag
2. Moved SaveLog to TxInfo blocks for text updates

4/26/21
1. Made FTdx101 protocol adjustable for length of IF; reply - it seems to change depending on how the radio boots??
2. Worked on Flex connection problems - won't stay connected - grrrr
3. Set radioMsgTimeoutDefault depending on protocol - from 50 to 250 mS - was getting erratic 0's from Yaesu FT817 so use 50 mS for it

4/25/21
1. Added FTdx101 protocol - found the following issues (also documented in the CTR2_Design_Notes.txt file)
	a. The mode command (MDxx;) is not properly mapped in the FTdx101 (and probably other FTdx models)
		i. Instead of being MDxx; it is MCxx;
		ii. Several other CAT commands don't seem to work either
	b. The Info command (IF;) returns back with an extra 0 (0x30) and 12 extra spaces (0x20) before the terminator (;, 0x3b)
		i. Setting the radioRxBytes in GetFreqMode() to 41 for now, it should be 28 according to the CAT spec
		
4/24/21
1. Added gFFTFreq tune by pressing on FFT graph
2. Added encoder scrolling to FreqMem page
3. Found that ESP8266 was causing noise in analog audio if it wasn't initialized - added code to inFitialize it during setup. This fixes most of the noise issues.

4/22/21
1. More work on Mic Tx audio - still getting digital noise when I key up - seems to be coming from output of Line-In - when using mic or line-in input
2. >>> Found main cause of Rx and Tx audio noise - ESP8266 is getting RF into line-in - remote mounting ESP8266 didn't help - need to come up with a solution

4/21/21
1. Fixed issues where Tx path wasn't switching properly when changing gMSel or gBand
2. Redesigned Voice & Dig-Mic input - getting too much noise on right Line-In so use Mic input instead - modification of PCB is requried for this

4/20/21
1. Fix RTTY mode errors
2. Cleaned up SetOutputMode() 
3. Cleaned up SD record & playback
4. Added tStat to Audio page to show record/playback status & got Rx>SD working correctly

4/19/21
1. Changed the V>P and V<M button labels to P>V and M>V so all flow left to right
2. Changed the method used to tx buffers - using gAction now. Just load the buffer from hmiTxMem[] based on the gAction returned and start transmitting
   a. Was getting a burst of noise in the Rx audio when downloading long tx buffers - couldn't find the cause - so changed to the gAction method which follows other processes

4/18/21
1. Changed ISR  to 3 mS - seeing weird delays in keyer output

4/17/21
1. Split single program file into many module files
2. Marked Monzila-2.0 license on all source files

4/15/21
1. Debugged voice announce
2. Debugged changing gTxLev - was calling SetOutputSource() multiple times while proc != hmi - block to only one call
3. Chk for random data in Vox decoder before setting Tx Vox active - otherwise we tx when first calling ChkTxVox()
  a. Set gOModePrev != gOMode when processing Vox so SetOutputSource() updates


4/14/21
1. Redesigned Config page & added Announce option
2. Added gVocal and hmiAnnounce - hmiAnnounce determines which announcements are to be made if gVocal (Announce) is enabled
3. Consolidated all code to check for page change in Chk4PageChnage()


4/13/21
1. Started on Voice announcements - add /VOICE/ folder and 47 voice files

4/12/21
1. Fixed bug so antenna follows tuning
2. Put Ant button back on Radio page
3. More debugging on gMSel - send changes back to HMI when processing gMSel change

4/11/21
1. Dump IP info when on Flex or Config page
2. Updated Help page
3. Debugged WiFi connection to Flex - working now

4/9/21
1. Debug why we're not saving the key type - was saving CW.keyMod.val, not CW.keyrMod.val - duh

4/8/21
1. Fixed bug in band switching

4/7/21
1. Moved TxMem page to block msgs - send buffers if any are edited
  a. Added Dec_StringInfo() to decode string data from pages - no byte length - just encode index of string 

4/6/21
1. Added code in Dec_xxx modules that resets prev flag if hmi value = current value, and only changes current value if current and prev are the same - if current != prev we're waiting for an HMI update to happen
2. Process all changes within the Dec_xxx moudlue
3. Dropped gBand from Home page block - it conflicted with gBand from Band page


4/5/21
1. Played with ISRs - don't call interrupts() until the end of the routine

3/31/21
1. Save bandMemAnt[] value as last three digits in the t#.txt fields on the Band page. Use these to derive gAnt to sent to Ant page if editing Ant
2. Use [Set Ant] on the Band page to select antennas. 
3. Removed [Antenna] from the Radio page & updated Help

3/30/21
1. Fixed bugs in band ant switching and added [Antenna] button to Band page to allow direct antenna switching from there

3/29/21
1. Added band sensitive antenna switching 

3/28/21
1. Added gWDog to display. Set it to 1 when proc has booted and is ready to receive block messages - display broadcasts display size until this byte set
  a. Once set, increment it every Home update. If display doesn't see this change on Home page, set comm fail message

3/23/21
1. Set common gTxLev, gLPFltr, and gNFltr - let HMI set applicable mode params

3/22/21
1. Added blockHMI and removed it from hmi code
2. More debugging

3/21/21
1. Continued debugging block transfers - have most everything working now

3/20/21
1. Removed gStatx variables from HMI
2. Split Home page txInfo into multiple transmissions - was losing some of it occasionally
3. Much more debugging required

3/19/21
1. Started massive conversion to eliminate the gStatx variables and just handle everything using native variables - much debugging to do

3/18/21
1. Send something (even nulls) to every page when we're off the Home page to make sure we don't get trapped in transparent mode 
2. Worked on fft noise issues - still no resolution  

3/17/21
1. Added block decoding for Input and Flex
2. Tweaked Flex code - added que so we can tune during ISR
3. Clear FFT marker plots if not used

3/16/21
1. Continue working on updating block tx
 a. Got PCR control working again along with other smaller pages

3/15/21
1. Made significant progress on block updates using the txInfo structure
 a. Home, Band, CW, Voice, RTTY, Dig, TxMem, and Config pages converted
 b. Still need to cleanup depreciated code for these pages
 
3/14/21
1. Still working on fft crash issues
2. Removing code that polled for individual status bytes
3. Get SendInfo updates every poll

3/13/21
1. Started coding SendInfo code to send status bytes in blocks when txInfo is set by proc - so we don't need to download them individually
2. Worked on fft trying to stop random data crashes - still have major probems with fft

3/12/21
1. Added code to save ant tags
2. Added ant switch control code
3. Changed Gen band color from violet to green
4. Get gUnit every poll so we can follow HMI closer - still need to do some work on object selection delay for encoder
5. Added gHMIFreq to HMI and encoded it with 0xA0000000 so when we read it we know it's valid

3/11/21
 1. Added TxQue - if Tx2HMI() is busy or we're in an ISR, save cmd to que and try again

3/10/21
 1. Work on getting status from Ant page
 2. Added radio picture (KMW) to Ant page

03/09/21
 1. Debugging Flex connect
 2. Added Ant page to HMI
 3. Converted global controls on TxMem page to locals and added gBuff to save mem - 5" display running low

03/01/21
 1. Revised terminal menu
   a. Added List Log option
 2. Resolved bugs in WiFi connection - added additional connect messages and a disconnect message

02/27/21
 1. More work on audio lockup problem - still no resolution - just adding or taking out a SerialOut statement causes or cures it ???
   a. Added a SerialOut() command at the start of Setup that doesn't do anything - add it or delete if if audio hangs
 2. Debugging rx record/playback
 3. Added gFFTAvg option
 4. Fixed issues with Memory Scan and FFT touch


02/26/21
 1. Added ctrlAllRJ45Ports to disable logic that allows reusing unpopulated RJ45 and ant switch ports
 2. Added Mixer_Rec and change Amp_Mic to Amp_Rec so we can choose which output of Line-In to record
 3. Added keyerDitFarnsDur to hold dit timing for farnsworth spacing
 4. Added a separate ChkRecord_ISR to service SD recording every .2 mSec

02/25/21
 1. Added Rx>SD option to HMI
 2. Use hmiTxMem buffers 30-39 for rx record tags for Rx>SD
 3. Use /TXMEM/VMSG{selected radio}-11 to 20 to save rx audio files

02/17/21
 1. Add HMI_gAction (44800 or 0xaf00) to gAction in HMI so hmiRx[3] = 175. hmiRx[2] = gAction code
 2. Added Memory Scan to HMI Scan page - each memory channel takes 5 seconds

02/16/21
 1. Continue working on RTTY decode - still locking up
 2. Increased chr2HMI FIFO from 5 to 31
 3. Changed decoderUpdateTmr.begin(ChkDecoder_ISR, 1000) to ecoderUpdateTmr.begin(ChkDecoder_ISR, 2000) for IRQ every 2 mSec. Seems to help audio lockups ??
 4. Moved gAction to direct poll - every scan, to speed up response
 5. Debugged memeory buttons - had to add gMSelPtr to keep track of selected memory pointer since gMSel is reset after it's changed in FreqMem
 6. Debugged RTTY Tx - was sending chrs MSB first - must send the LSB first - duh!

02/15/21
 1. Debugging DemodRTTY
 2. Use fixed fonts in bRx, bTx, and rxMn on HMI
 3. Fixed keyboard font in Input page
 4. Split fft marker updates out of UpdateFFT

02/14/21
 1. ******** Removed averaging on FFT - not responding fast enough to CW
 2. Rx Equalizer settings unstable - found receiving sporatic 0 value for gStat9 then back to normal
    a. Set all sliders in HMI to MIN = 1 so they can never go to 0
	b. This forces gStat8 and gStat9 to always be >0 - if 0 is received, reject it
 3. RTTY decoder was locking up audio - found I was trying to read the tone decoders before checking to see if they were available
    a. Need to debug decoder - it's not working

02/13/21
 1. HMI stays on splash screen until we initialize here
 2. Added F<P button to return to previous freq/mode - buffer is 10 deep

01/29/21
 1. Removed debounce code in ChkEncoder - no need for it - we're looking for the first transision of a or b to determine direction
 2. Refresh radio & ant select relays in UpdateHomePage() if gRadioSel==gRadioSelPrev
 3. Force gShareDB true if radioLabel[gRadioSel] starts with '*' when loading radio - was getting intermittent shared indication on radio # on home page
 4. Removed verification popup on HMI when toggling gShareDB - only verify Erase function now

01/19/21
 1. If radio freq changes, poll it again - trying to resolve QCX error

01/18/21
 1. Fixed fft ID for both 3.5 and 5" displays
 2. Added gAction=10 to update gFreq from HMI
 3. Slow response to FFT and HMI freq changes - put code back in to change radio in UpdateHMIEveryPoll() that was causing freq change in QCX malfunction - needs another look tomorrow

01/17/21
 1. Fine-tuning terminal mode

01/16/21
 1. When locked, force radio to stay on locked freq
 2. Added code to emulate USB keyboard using terminal connected to USB comm port

01/13/21
 1. Debugging debounce in ChkEncoder

01/11/21
 1. Seeing some freq drift on non-detented encoder - Added 5 mS debouncing to rotary encoder to stop it - jury's still out
 2. Audio lockup came back after adding debounce code - got it to work again by removin call to SerialOut in SetEncoderCtrl() - seems to be sensitive to debugging output??

01/10/21
 1. More problems with locking up audio
   a. Found in Chk_FlexRX I was returning with "" - bad plan - must have something in the reply - settiing it to return txt (which = " ") seems to have fixed intermittant lockups

01/09/21
 1. Worked on web page - added buttons

01/07/21
 1. Working on audio lockup issues - problem seems to originate in ChkChr2HMI() - recoded the front end process to extract data from the chr2HMI array - seems to have helped
 2. Flush buffer after every write to HMI or HMIR
 3. Use .clear() to clear rx buffer before txing to HMI
 4. Fixed scaling on fft roof and notch filter cursurs

01/05/21
 1. Working on client wifi code
 2. Fixed bug in SaveTxtLog (not using /LOG/ directory for .TXT log)
 3. Output ADI format to web server
 
01/03/21
 1. Don't send new gFreqRadio back to radio if change was from the radio - only if from HMI
   -- QCX-mini occasionally swaps some of the bytes in the IF; reply causing the HMI to change the radio's frequency in error
 2. SetRadioBaud() after loading new radio so radio baud change follows what was set for that radio

12/30/20
 1. Added tx buffer btns to home page - changed pause and stop buttons to be keyboard and menu when not playing
 2. Made variables changed in SetEncoderCtrl() VOLATILE so they carry through the ISR
 3. Load 'b' buffers on TxMem page when changing modes - tx buffer btns just load the selected TxMem buffer so they have to be current

12/29/20
 1. Iambic-B mode is working now
 2. Experiencing intermittent audio lockups during keying - not exactly sure why
 3. Fixed keying timing in tx buffer code - it is now timing properly

12/28/20
 1. Work on Iambic-B mode

12/27/20
 1. Added Flex ANF (Auto-Notch-Filter) - it is used on USB, LSB, and AM modes. APF (Auto-Peak-Filter) is only used on CW mode
 2. Show only Flex DSP filters that are available for the mode
 3. Added code to support encoder on Flex page
 4. <<< NOTE >>> ONLY ADJUST TX POWER AND TUNE POWER LEVELS WITH ENCODER OR KEYPAD DURING TX

12/26/20
 1. Expanded Flex parsing
 2. Fixed Flex ant tuner code
 3. Added Flex DSP filter levels and control

12/22/20
 1. Automaticlaly connect Flex if Connect WiFi is pressed in the Flex display

12/21/20
 1. Working on Flex options - added LineOut and Ant tuner options - reworked Flex page
 2. Refined Flex code here
 3. Started CTR2_Design_Notes to capture oddities as they come up

12/20/20
 1. Added WiFi and Flex icon to HMI
 2. Added btn to close slice A
 3. Added Tx Power and Tune Power settings to Flex page
 4. Cleaned up code again

12/19/20
 1. More Flex work
  a. got create slice working properly 
  b. Found that the ESP8266 is sensitive to near by RF fields (such as from the Teensy??) - this causes rx to noise up and it fails off when connected to the Flex
     - Extended ESP8266 on 6" leads an that solved the connectivity problems
 2. Removed calls to ChkHMIRx() in UpdateFFT when drawing filter cursors - causing audio dropouts??

12/18/20
 1. Working on Flex - radio is disconnecting after 30 or 40 polls????

12/16/20
 1. Working on Flex integration
    a. Depreciated gFlexSlc to select slice - always use slice A
	b. Reuse gFlexSlc as gFlexAnt and use it to select the antenna when creating a new slice (when SmartSDR is offline)

12/15/20
 1. Started working on Flex connection using WiFiEspAT library

12/14/20
 1. Speed up reaction to baud change - put it in UpdateHMIEveryPoll if it changes
 2. Added Left Key Function to CW page. Selecting Left Key Function = Straight allows left paddle input (normally DIT) to be used as a straight key - this allows a straight key to be plugged into Rmt PTT and switch between paddle and straight key.

12/13/20
 1. Tx audio noising up when encoder turned - don't set the level inside the SetEncoderCtrl() routine - it's inside the ISR and will generate noise in tx audio
 2. Read Vox_Det in setup() to clear initial random value otherwise enabling Tx will key radio if vox is enabled
 3. Set 3-minute timer on paddle input too - not just ptt
 4. Display keyer type on btTxMode in CW mode

12/09/20
 1. Working on Flex again

12/07/20
 1. Fixed bugs in memory search

12/06/20
 1. Added baud rate per radio selection - baud lists are saved for each radio port so radios can be customized individually - baud list is reloaded on start up

12/03/20
 1. Added blockSerialOut to automatically turn off SerialOut() when a message is received in ChkPCCmd()
    a. This is done because there's only one USB serial port and SerialOut messages cause some external apps like WSJT-X to fail

12/01/20
 1. Renamed filenames FRQLST to FRQMEM and TXLIST to TXMEM, and TXLIST folder to TXMEM to be consistent with variable names
 2. Remove hFFTFreq control from Home page. Replaced it with hFreqX10. It will inc/dec the freq 10 times the step digit for faster tuning
 3. Tested remote display - works great!
 4. Debugged UpdateFFT routine - works better now without intermittant noise on RTTY
 5. Using encoder w/o detent - works great but you can't use them if you parallel the local encoder and the remote encoder because they can stop on a pole

11/30/20
 1. Added gTxLev, gLPFltr, and gNFltr to freqList[] arrays
 2. Fixed several issues with pulling data from freqList and bandList - everything seems to be working now
 3. Fixed serial port assignments
 4. Added initial code to auto select the remote HMI display or the local one - remote has precidence - if it's plugged on start up, use it


11/27/20
 1. Increase RTTY/Dig output from 1 to 10
 2. Added #define values for all audio settings - adjust these instead of the gain values in the code
 3. Debugged the FFT display - getting random bursts of noise
 4. Added three point averaging to FFT data so display is stickier
 5. Auto adjust notch filter freq if it's on so it stays centered on noise it's filtering

11/26/20
 1. Work on TxMem save
 2. Move files into folders for better oganization
 3. Work on audio file naming convention
 4. Moved ESP to Serial8 (not 7) as designed for v2.x board
 5. Added additional chrs to bRx and rxMx lines on the 5" board
 6. Split out keyboard select code in to modules and debugged keyboard select in btShift in Input page

11/25/20
 1. Fix bug in setting LP and N filter in dig mode
 2. Allow PTT to be used to start and stop recording and playback in Audio page
 3. Started working on saving TxMem files using gAction==5 - not complete yet - the Nextion display just froze (grrr)

11/24/20
 1. Add Tx Compressor option - still need to tweak compressor settings
 2. Debugged controls on voice, rtty, and dig page not responding to encoder (set S. globals to local values, not the other way around)
 3. Inc/Dec individual values (lev, lp and n filters) with encoder, not global values

11/23/20
 1. Detect display size at startup
 2. Updated UpdateFFT routine to size for 3.5" or 5" display
 3. For digital modes, use center of fft as reference for touch tuning events
 4. Display radio name when loading new radio

11/18/20
 1. Finished converting 5" display code
 2. Set dim=100 on both displays - the PWM dim signal causes noise in the audio - the 5" display is the worse

11/17/20
 1. Added code for 5" display support
 2. Worked on switcher code
 3. Added definitions to use "HMI" for Serial3, "RADIO" for Serial4, and "ESP" for ESP
 4. Added 'SD.begin(BUILTIN_SDCARD)' to use built-in SD card on the Teensy 4.1 - remove for the 4.0 - mic not working at all on v4.1 board
 5. Mute rx audio while changing radios

11/15/20
 1. Worked on Voice recording

11/14/20
 1. Reduced Tx gain for RTTY & Dig to 1 from 10 to give us more range on USB
 2. Added Rx Equalizer

11/12/20
 1. Save level, filters, & equalizer settings for each band
 2. Added enabSerialOut to enable Serial.print/println so we can turn off Serial.print output so serial port can be used for external programs like WSJT-X
 3. Removed code that allowed btTxMode to be used as PTT in voice mode - too confusing and need a way to disable keying in voice mode like the other mode
 4. Fixed code for tx equalizer so it works now - moved to SetEqualizer()
 5. Q values from http://www.sengpielaudio.com/calculator-cutoffFrequencies.htm

11/10/20
 1. Ignore lf/cr in ChkPCCmd in case pc program is using it - also cleaned up this code so it works with WSJT-X (was failing and not setting tx freq)
 2. Added gAction - use to detect actions like F->M and Save buttons that we miss on Sendme values
 3. Debugged mouse code - use left click+drag to change freq in addition to roller wheel

11/9/20
 1. Automatically switch to encoder 1 if turning encoder during tx or lock
 2. Moved the majority of the global values to the Programs page in Nextion - this simplifies calling them since no page or .val is required.
    NOTE: You can't put global txt variables in the Programs page - not supported

11/8/20
 1. Added split mode save/load to freqList and freqMem edit

11/7/20
 1. Added web server code and removed old esp methods
 2. Updated Config page on HMI
 3. NOTE: ESP01 is failing during tx - suspect its due to low output of LM2937 3v3 reg (500 mA) - updated design to use AP2114HA - it's rated at 1 amp

11/5/20
 1. Changed gAPChan from string to val

10/30/20
 1. Refined Chk4PCCmd() to use Serial.write and throw away duplicate requests - seems to work better now with WSJT-X
 2. Refined PCR1000 cmd/replies 
   a. removed need to use auto mode (G301)
   b. cleaned up TxFreq during _ISR, not locking up now

10/29/20
 1. Added RJ45 switch code
 2. Detected RJ45 switch boards are highlighted on the Radio page using gBoards.val

10/28/20
 1. Add code to support gSplit for vfo - if gSplit = 2 use vfoA for Rx, vfoB for Tx
 2. Lock radio while in split mode so freqs don't change

10/27/20
 1. More work on PCR1000 - sliders are a little sticky in manual mode but ok on the encoder
 2. Added Split VFO mode - need to code this feature into this code - flag is in gStat2 [5 bit 5]

10/26/20
 1. Working on PCR1000 code - mostly working now
 2. Only allow ctr2 filters if PCR bandwidth is set to 3k

10/25/20
 1. Got PCR1000 running, need to fine tune options and add Rx mode

10/24/20
 1. Fixed delay in setting gTxLev with encoder, send gTxLev encoder change directly to SetOutputSource
 2. Worked on PCR1000 code - need to build code to send data to radio

10/23/20
 1. Change icons for fftGain & volume and added sqGain controls on hmi
 2. Added rx squelch control
 3. Added Lock button to lock freq & mode operations

10/20/20
 1. Worked on encoder issues - totally redesigned ChkEncoder code - works better now 

10/16/20
 1. Added pins for RJ45 Switch control - requires Teensy 4.1 but can be accessed from bottom of Teensy 4.0

10-11-20
 1. Added Copy option to Radio page - saves the current radio to another port

10-10-20
 1. Debugged error setting radio name - was resetting gRadioSelNum.val before it was set

10/8/20
 1. Added additional states to gTxMode for tx, 2=ptt from paddle, 3=ptt from vox, 4=ptt from btTxMode - this solves odd behavior of keying up after releasing the paddle
 2. Updated the encoder to select the new controls on the Dig page

10/7/20
 1. Finished btTxMode/paddle keying code
 2. Added gDigTxActiv option to select PTT on Vox action

10/6/20
 1. Added Vox Threshold level
 2. Moved Vox_Det to output of Mixer_Tx so it sees all tx audio
 3. Worked on PTT keying
 4. Found excessive noise from 5v supply on mic circuit - need to add 1k resistor & 10 uF cap to mic power supply

10/3/20
 1. Not returning to rx mode if not keying PTT in digital vox mode - fixed
 2. Working on WiFi code

9/30/20
 1. Reworked scan feature
 2. Took color off >0 and WiFi Off buttons
 3. Reworked WiFi buttons

9/29/20
 1. Changed gMonTx to gMon since it affects tx and rx monitoring
 2. Fixed bug in audio routing for radio rx - wasn't routing rx audio to fft if USB audio selected
 3. Removed digital lp filter & notch filter variables - using flat bandpass for dig mode
 4. Having problems with high tone level when we first key up the radio

9/28/20
 1. Removed USB and RTTY from Mixer_In - not needed now FFT has been moved to Output_Source
 2. Added Monitor button to Dig page - redundant to Monitor button on Config page

9/27/20
 1. Working on voice mode
 2. Rerouted FFT_Amp to get input from Output_Source so you can see anything received or transmitted
 3. Moved Monitor Tx button back to config and removed Monitor USB Rx button - selecting Monitor Tx will send both USB streams to headset

9/26/20
 1. Only change output_source if the direction changes or the mode changes because it's called so much it was locking up the proc
 2. Get aux files immediately after loading radio file

9/24/20
 1. Use Tx button as PTT in voice mode - click on/click off
 2. Add PTT 3-minute watchdog timer

9/23/20
 1. Increased digital vox sensitivity from .008 to .003
9/22/20
 1. Added Delete button to radio page and other minor bug fixes

9/21/20
 1. Corrected modes on USB for TS2000 radio
 2. Add option to monitor Rx when USB Rx is selected - useful for FLDIGI amd CW Slimmer
 3. Moved monitor buttons from config page to dig page

9/13/20
 1. Added gRadPTT to allow radio vox or radio ptt control in digital mode
 2. Fine tuned Output_Source() and SetTxPath()

9/12/20
 1. Removed Dig TxMem (elements 30-39) - Tx buffer not used in digital mode
 2. Force USB when selecting Digital mode
 3. Added Audio path options for digital mode - put them in gStat7

9/11/20
 1. Worked on refining gTxMode states
 2. Use 1000mS timer to turn off TX indicator in CW mode so it doesn't flash

9/10/20
 1. Added USB_In and USB_Out for digital modes
 2. Added ChkTxVox() to provide VOX when tone > -37 dBm appears on USB Rx audio - do PTT and switch audio paths to tx tone
 3. Made btTxMode tri-state - Tx Off, Enab Tx, and Tx

9/9/20
 1. Installed code for USB control using Kenwood protocol - works with WSJT
 2. Updated Teensy 4.0 for audio

9/8/20
 1. Tried to add USB_In and USB_Out to route audio from Line_In/Line_Out to USB port for digital modes
   a. Didn't work. Need to find out why
 2. Moved Sidetone from port 0 of Mixer_Rx to port 3 - this leave both port 0 on Mixer_Rx and Mixer_Tx open for future
 3. Add code to USB serial port to reply to queries from USB serial interfaces - use Kenwood protocol for now

8/30/20
 1. >>>> Rolled HMI display 180 deg so display mounts upside down in acrylic wedge case and SD card slot is on top <<<<
 2. Display message in bRx during radio file save & load so user knows why we're locked up

8/29/20
 1. Removed Morse input options for Input and Keypad pages - more trouble than it was worth
 2. Redesigned Audio System to remove FFT_Source mixer and moved mixer ports to make them align logically

8/28/20
 1. Made HMI sleep button 2-state - Renamed to btSleep
 2. Added gEnWWV to Config - allows wwv decode to be disabled (normal state)
 3. Added paddle input for Input and Keypad pages - use error (<) to erase and BT (=) to click OK

8/27/20
 1. Chk hmiWait4Reply flag when getting values from hmi - if it's 0, there was either a no reply or the value changed, try cmd again
 2. Fixed bug in inital load of gRadioSel in {setup}

8/25/20
 1. Use RTTY.amplitude() 0-.7 to set Line-Out level. 
 2. Adjust FFT level using Mixer_1.gain(3,xx)
 3. Enabled Display Sleep timeout in HMI
 4. Moved sleep timeout to adrs 24-27 and contest counter to adrs 28-31 in HMI eeprom

8/24/20
 1. Added 225 Hz cxr shift for commercial rtty weather stations - see http://weather.mailasail.com/Franks-Weather/Radio-Teletype-Weather-Broadcasts
 2. Worked on RTTY output - redesigned audio interface and added Output_Source to switch between input and output sources to send to headphone/lineout
 

8/23/20
 1. Added RTTY keyboard to HMI
   a. Special key codes: ' ~ '=bell, ' _ '=letter shift, ' ^ '=figure shift, ' | '=CR, ' < '=LF
 2. Added RTTY Tx code

8/22/20
 1. Started on RTTY - added Tone2 decoder for second tone detection
 2. Added tuning markers and tweaked filters for each mode - put them in SetFilterFreq()

8/20/20
 1. Updated to dark theme 
 2. Changed radial band and mode buttons to two state buttons
 3. Changed "PSK" page to "Dig" & updated all variables 
    a. Dig mode will support audio interface between computer and radio
 4. Debugged ChkEncoder() so it's more responsive and doesn't lock up

8/17/20
 1. Prevent recurssion on all ISR routines
 2. gShareDB set by label on label load
 3. Block ISR if myFile is active
 4. Added saveRadioCntr to add 30 second delay before saving radio file if any property changes
 5. Trimmed tone decoder to 8 cycles for CW decode - this gives 11 mS detect time instead of 14 mS for 10 cycles at 700 hz
 6. Worked on WWV code - set to 99.5 mS per sample

8/16/20
 1. Still working on audio lockup problem when saving/loading
 2. Moved gShareDBgSvRadio flag out of gStat1.val - monitor it separately from global variables

8/9/20
 1. Disable codex before loading or saving files - hopefully this will cure the intermittent lockups

8/8/20
 1. Added double button b16 to radio for Shared DB - it follows gShareDB

8/6/20
 1. Moved shared DB flag from Config page to Radio page - toggle with Share DB button for current radio
 2. Encode shared flag into radio name. Add a backspace chr (ascii 8) to the start of the name if shared flag is turned on
 3. Turn radio name red if shared DB flag is true
 4. Added GetFromHMI() got to replace inline code that tried twice to get a valid reply to a get command
 5. Fixed bug in LoadRadio - must update gStat1 after modifying hmiRx[2] and [3] for the new radio

8/4/20
 1. Removed keyerSideToneEnable and replaced it with cSideTn
 2. Fixed bug (I hope) in hmiCtrlChng code

8/3/20
 1. Added indexed radio support files for band, freq, and tx buffer

8/2/20
 1. Use separate freq dbases for radios
 2. Added a option to use a common database
 3. Debugged problem with band switch - ended up being new gSvRadio switch I added

7/29/20
 1. Finished code to update radio label when changed
 2. Added option for 9600 on Kenwood - mine runs this speed - its strappable
 3. Update help to explain Radio page options

7/28/20
 1. Fixed timing issue when changing radios
 2. Add Radio page and radio tags

7/22/20
 1. Added gBlock to HMI to block updating gInit values when proc is updating them
 2. Expanded # of radios from 4 to 16

7/20/20
 1. Working on radio select code - store each radio as a separate file on SD card to minimize writes
 2. Added SaveRadio() and LoadRadio() to save radio settings to SD card
   a. Having issues with setting syncing up properly

7/19/20
 1. Adding A, B, C, D radio select - gRadioSel - save settings for each radio - selected on Band Page
   a. gRadioSel is encoded in the 4MSB of gStat1, hmiRx[2] (first byte)

 7/18/20
  1. Working on RTTY mode
  2. Fixed bugs on startup & band selection - not sending new freq when changing bands
  3. Moved TxFreq2Radio out of ISR - put it in UpdateHMIEveryPoll routine - serial data causes noise if sent during ISR
  4. Rearranged controls on HMI mode pages

 7/17/20
  1. Giving up on Iambic-B for now. Iambic-A is working great
  2. Ultimatic code working now. Start with one element then sqeeze other paddle to switch to that element while paddle is squeezed - don't like it as much as I thought I would.
  3. Started putting RTTY mode together

 7/16/20
  1. Working on Iambic-B mode code - not working right yet
 
 7/7/20
  1. Gave up on Flex control until wifi is working better - ESP01 is a POS
  2. Need to finish troubleshooting ChkESPRx - why is it not returning properly from loop call?

 7/3/20
  1. Working on Flex control

 6/27/20
  1. Added encoder control for Voice options
  2. Highlight just the .pco portion of sliders
  3. Added TxLev to RTTY and PSK pages

6/26/20
 1. Added gTxLev - this is the global value that is set by the current mode from the mode page
 2. Rearranged gStat10 order - put gTxLev at 0xff and encoder at <<24

6/25/20
 1. Added record/playback function to voice keyer

6/24/20
 1. Added record/playback options to audio board
 2. Mute headphones if Ptt=true, mute LineOut if PTT=false
 3. Added equalizer to Voice settings
 
6/22/20
 1. Had to enable AP and Sta modes to get Sta mode working reliably
 2. In combined mode you can't get the IP address of the Station - user will have to check router for address :<

6/21/20
 1. Cleaned up HMI code for AP/Sta connections

6/18/20
 1. Compacted Config display

6/17/20
 1. Took out HTML code and added Telnet code

6/14/20
 1. Worked on ESP01 code

6/8/20
 1. Started on Flex Wifi api code - problems with their implimentation of the protocol - see notes in DecodeHMICmd code

6/5/20
 1. Fixed bug in Kenwood protocol - sending IF8 not IF; to get status update :<
 2. Worked on bugs in Flexradio USB CAT implimentation - they don't let you change the frequency - double :((

6/3/20
 1. Added Passthrough keyer mode - passes tip to key and ring to PTT toward radio so you can use the radio's keyer

6/2/20
 1. Added Scan page to set scan parameters

6/1/20
 1. Added code for log page & Delete button for logs

5/31/20
 1. Noticed sharp decrease in freq response below 500 hz with new transformer coupling
  a. Added bandpass filter centered at dspFFTFreq to bring levels up - still isn't quite right but better
  b. No 100 hz getting through to WWV decode. Swap bandpass filter out for highShelf filter in increase low end responce during wwv decode
2. Removed duplicate reply checks for gFreq & gUnit. They were slowing down the response too much 
  a. Left them in for statX replies
3. Added dspFFTFreqPrevWWV to make sure we return to pre-wwv mode fft freq

5/30/20
 1. Refining keyboard keyer & bugs
 2. Added Contest Mode to SaveLog

5/29/20
 1. Use keyboard cursor keys to control encoder functions
	General:
	a. Up arrow = inc selected control
	b. Down arrow = dec selected control
	c. Home = reset gEncoder
	d. Left arrow = inc gUnit selected digit
	e. Right arrow = dec gUnit selected digit
	f. Pg Up = Dec gEncoder
	g. Pg Down = Inc gEncoder

 2. Keyboard keyer keys
	General:
	 a. F1 = Help page
	 b. Esc = return to Home page

	 Home Page
	 a. F2 = turn off Tx Mode (key relay)
	 b. F3 = turn on Tx Mode (enable key relay)
	 c. F4 = Open keyboard Input panel
	 d. F5 = Open AutoLog page
	 e. F6 = Open call station input page
	 f. F7 = Open RSTs input page
	 g. F8 = Open RSTr input page
	 h. F9 = Open Pwr input page
	 i. F10= Open Notes input page
	 j. F11= Save Log page
	 k. F12= Open RxMsg page

	 Input Page
	 a. F2 & F3 = same as Home page
	 b. F5 = enter called station call sign (from log callsign input page)
	 c. F6 = ' de [your call] '
	 d. Backspace = delete one chr
	 e. Delete = delete all chrs
	 f. Insert = pause tx for manual input
	 g. End = erase all tx buffer data
	 h. Enter = send tData to tx buffer

	 RxMsg Page
	 a. F2, F3, F4 = same as Home page
	 b. Delete = delete the current Rx msg buffer

	 Help Page
	 a. Left and Up cursor = dec page #
	 b. Right and Down cursor = inc page #

	 SaveLog Page
	 a. Enter = save log
	 b. Delete = clear log data




5/28/20
 1. Added mouse interface
 	if mouse active, perform the following actions:
	a. No buttons - do nothing
	b. Left button 0x01 - inc gEncoder
	c. Right button 0x02 - dec gEncoder
	d. Center button 0x04 - reset gEncoder
	e. Side option button 0x08 - dec gUnit
	f. Side option button 0x10 - inc gUnit

 2. Added keyboard code
   a. F1 brings up help page - cursor control keys page through pages
   b. F5 brings up keyboardkeyer input page - enter text, press enter to tx, esc to cancel, f1 for help
   c. F8 in keyboard keyer brings in called station call
   d. F9 in keyboard keyer brings up " de [my call] "

5/27/20
 1. Refined Auto Log code - working now
 2. Added USB Host library for keyboard/mouse
   a. Have demo code running that reads the keyboard and mouse inputs

5/26/20
 1. Started working on Auto Log mode

5/24/20
 1. Added filter and notch to other modes
   a. Use gFilter & gNotch to pass settings to processor - each mode feeds those values when selected
 2. Don't load memSel from hmi memory on startup so we don't load last memory channel on startup

5/23/20
 1. Submitted v1.1 PCB for build
 2. Fixed encoder bugs in CW page 
 3. Added Notch filter & made it adjustable in home page

5/22/20
 1. Added morse speed to rotary encoder on home page 
 2. Encoder selection times out after 10 seconds
 3. Added Voice page to hmi
 4. Added encoder control over CW page options

5/21/20
 1. Fixed bug on fft click
 2. Major overhaul of freq control logic - everything seems to be tracking properly now, now bounce back when tuning encoder

5/20/20
 1. More work trying to stabilizing rotary freq control - it was jumping around after you stop turning   
 2. Stabilzed morse speed and farnsworth timing on the encoder too

5/19/20
 1. Intermittent read freq fails on Yaesu 817 -
   a. Added lastAction timer to rotary encoder code - only accept actions every 50 mS.
   b. This seems to keep the encoder from overwriting the radio
 2. Added radio selection to rotary and put baud rate on display

5/18/20
 1. Investigate intermittant audio on right channel when tuning rotary encoder
   a. Found that encoder tuning affects the right channel audio
   b. Encoder tuning happens during ISR so reading the input pins must be crashing the audio
   c. Strapped headphone output to left-only for now - right output feeds line-out xfmr
   d. Need to try to direct read the encoder input pins to see if that helps
 2. Use rotary encode switch to toggle through gEncoder options on Home page
 3. Added code to prevent recursive calls to TxFreq2Radio so encoder doesn't overwrite comm in process
 4. Ignore rx freq if it's below 100k. Yaesu not reliably sending all data bytes back
 5. Turn tInfo2.txt red when changing FFTFreq with encoder

5/17/20
 1. Yaesu FT817 protocol running - having intermittant dropped data when fast tuning
 2. Added encoder control to hFFTFreq, MemSel, FFT gain and Out gain. 

5/14/2020
 1. Rolled paddle input too - they were reversed on PCB v1.0

5/13/2020
 1. Added Tx from keyboard
 2. Built up v1.0 hardware and got it working
   a. Missed a wire from ULN2803 inverter 3 to tip of radio jack - fix in v1.1
   b. Opened the Line-Out jumper - it was feeding back into the Line-In circut because of the stereo jack - add options to v1.1
   c. Rolled Tx/Rx data to Nextion - fix on v1.1
   d. Rolled inputs for rotary encoder - change v1.1 doc to show current wiring

5/12/2020
 1. Resolved problems with mode switching in band stack registers - must synce gStat1 after setting freq & modes to keep display synced
 2. Don't reload last memory location when starting up, just set last band
 3. Coded keyboard/buffer tx for Morse - its working including the pause chr - added a play btn to the display
 4. Started building help pages

5/11/2020
 1. Added band stacking registers and debugged code to get it working
    - Save band freq in BANDFREQ.CSV on SD card
	- Update file any time we switch bands - not freq within bands
 2. Added all options to CW page and got them working correctly (I hope)
 3. Reduced pulse rejection in WWV decode from 30 to 10 mS. This seems to help the timing issues
 4. Display WWV pulse length while waiting for sync to start
 5. Automatically throttle gUnit back to 10 hz when tuning using the FFT display
 6. Allow rotary encoder to control CW speed and Farnsworth spacing on CW page
    - Normal turn changes speed
	- Press sw and turn change farnsworth spacing

5/10/2020
 1. HMI EEProm memory mapping and downloading completed - rearranged variables
 2. Adjusting CW speed in CW page now changes speed dynamically
 3. Lock Farnsworth spacing to cTxSpeed - it can always be lower but never higher 
 4. Had to pad morseWPM slightly to get it to display a little closer to actual speed
 5. Added 5 mS debounce to dit and dah paddles - this seems to have settled down contact bouncing
    - still need to work out Iambic B mode issue

5/9/2020
 1. Worked on Iambic_B mode

5/8/2020
 1. Added paddle keyer code
    -- need to fix Iambic_B mode - not adding the last element

5/7/20
 1. Reworked encoder - push and hold to adjust step up and down
 2. Started on keyer code - needs lots of work

5/6/20
 1. Assigned pins for i/o
 2. Rotary encoder functional - use switch to inc/dec freq step - uses last direction to move cursor

4/27/20
 1. Worked on freq/mode cycling bug when selecing me

4/26/20
 1. Renamed Splash page to "S"
 2. Added gStat variables to S page - these are data concentrators for the various selected options so we can read 4 or more variables with one get

4/25/20
 1. Fine tuned scanning options
 2. Started on beacom mode
 3. Fixed bugs in log save code
 4. Tried bringing HMI clock into proc to time stamp files on SD card - SD does not use RTC to timestamp -always 1/1/2000

4/24/2020
 1. Added scan mode - step and direction determined by clicking on a freq digit - top=inc, bottom=dec
 2. Reworked HMI Rx routine - seeing a lot of errors

4/23/20
 1. Changed left/right fft buttons to scroll through freqMem[]
 2. Removed freq digit inverse - just set pco color

4/22/20
 1. Added log save routines

4/21/20
 1. More fine tuning
 2. Got FREQMEM.CSV working - still having some problems with dropping commands between disp and proc


4/20/20
 1. Worked on getting SD card running

4/19/20
 1. Added FreqMem page to allow selection & editing of freq/mode memory

4/18/20
 1. Added Memory support for freq/rMode/oMode - save on proce - need to push it to a file on SD card

4/17/20
 1. Got WWV decoding, display, and HMI RTC sync working properly

4/16/20
 1. Moved graph touch freq change to HMI instead of proc
 2. Added WWV decoding option - gOMode= MODE_WWV - turns on automatically when WWV freq selected, turns off when tuned off

4/15/20
 1. Added ChkRadioRx() and DecRadioRx() routines
4/14/20
 1. Added fft freq control to graph touch
4/13/20
 1. Worked out bugs with display updating 
   a. Had to use char array to get multiple chrs from decoder - word space is sent right after the last chr in a word - it would overwrite the last chr in the word
   b. Had to use mulitple txt boxes in RxMsg page - can't write 500 chrs to a single box
 2. Added touch tuning to fft graph
 3. -->> Need to remove fftThesh buttons and change fft tuning buttons to allow toggle between touch tuning radio freq or fft detect freq
4/12/20
 1. Use TIMER0 irq to trigger ChkDecoder - do it every mSec after the millis() isr runs - this significantly helps timing
 2. Added ToneFreq to detect individual frequencies 

4/11/20
 1. More headbanging on the morse decoder - timing is not accurate
4/10/20
 1. More fine tuning on DecMorse
   a. Added calls in Tx2HMI and ChkHMIRx
   b. Called every time UpdateFFT update the FFT array
   c. Moved code that sends chr to HMI out of DecMorse so it doesn't crash fft update
4/9/20
 1. Got morse decoder working - needs fine tuning
 2. Update HMI display to work with morse decoder
4/8/20
 1. More work on morse decoding algorithm
4/7/20
 1. Added smoothing to waveform pixels by sending three pixes for each freq bin. First is original data, followed by data 1/3 between this and next pixel, followed by data 2/3 between this and next pixel
 2. Added fft controls to HMI
 3. Started on morse decoder
4/6/20
 1. Started coding project - stripped code from HL-HMI
 2. Fought problems with waveform - added blockHMIFFT flag to block data if we're not on page 1