From e1417717774cc2718ea6d513a5b7e9e1f537bb3c Mon Sep 17 00:00:00 2001 From: g7uhn Date: Sat, 17 Oct 2020 22:47:53 +0100 Subject: [PATCH] added some page1 functions, tidied user function calls --- Arduino/src/main.cpp | 81 ++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 52 deletions(-) diff --git a/Arduino/src/main.cpp b/Arduino/src/main.cpp index 76ed370..bfe3420 100644 --- a/Arduino/src/main.cpp +++ b/Arduino/src/main.cpp @@ -78,35 +78,42 @@ void toggleNar(); void toggleIpo(); void toggleBreakIn(); void toggleKeyer(); +void toggleRfSql(); + + +// SETUP SOFT-KEY PAGES +// Single functions from the ft817 library can be called straight from the pageXSoftKeyFunctionY function above +// or, if the desired function is a combination of actions, define a function in the USER FUNCTIONS section below +// to be called by the sketch. Don't forget to forward declare your user function above. // Page0 items -// -String page0SoftkeyLabel1 = "TUNon "; + +String page0SoftkeyLabel1 = "TUNon "; // 6 characters void page0SoftkeyFunction1() {tuneSignalOn();} -String page0SoftkeyLabel2 = "IPO"; -void page0SoftkeyFunction2() {toggleIpo();} -String page0SoftkeyLabel3 = "KYR"; -void page0SoftkeyFunction3() {toggleKeyer();} -String page0SoftkeyLabel4 = "TUNoff"; +String page0SoftkeyLabel2 = "IPO"; // 3 characters +void page0SoftkeyFunction2() {radio.toggleIPO();} +String page0SoftkeyLabel3 = "KYR"; // 3 characters +void page0SoftkeyFunction3() {radio.toggleKeyer();} +String page0SoftkeyLabel4 = "TUNoff"; // 6 characters void page0SoftkeyFunction4() {tuneSignalOff();} -String page0SoftkeyLabel5 = " BK"; -void page0SoftkeyFunction5() {toggleBreakIn();} -String page0SoftkeyLabel6 = "NAR"; -void page0SoftkeyFunction6() {toggleNar();} +String page0SoftkeyLabel5 = " BK"; // 3 characters +void page0SoftkeyFunction5() {radio.toggleBreakIn();} +String page0SoftkeyLabel6 = "NAR"; // 3 characters +void page0SoftkeyFunction6() {radio.toggleNar();} // Page1 items -// -String page1SoftkeyLabel1 = "NAR "; -void page1SoftkeyFunction1() {toggleNar();} -String page1SoftkeyLabel2 = "NAR"; -void page1SoftkeyFunction2() {toggleNar();} -String page1SoftkeyLabel3 = "NAR"; + +String page1SoftkeyLabel1 = "RF/SQL"; // 6 characters +void page1SoftkeyFunction1() {radio.toggleRfSql();} +String page1SoftkeyLabel2 = "A/B"; // 3 characters +void page1SoftkeyFunction2() {radio.toggleVFO();} +String page1SoftkeyLabel3 = "NAR"; // 3 characters void page1SoftkeyFunction3() {toggleNar();} -String page1SoftkeyLabel4 = " NAR"; +String page1SoftkeyLabel4 = " NAR"; // 6 characters void page1SoftkeyFunction4() {toggleNar();} -String page1SoftkeyLabel5 = "NAR"; +String page1SoftkeyLabel5 = "NAR"; // 3 characters void page1SoftkeyFunction5() {toggleNar();} -String page1SoftkeyLabel6 = "NAR"; +String page1SoftkeyLabel6 = "NAR"; // 3 characters void page1SoftkeyFunction6() {toggleNar();} @@ -359,6 +366,8 @@ void backlight() // USER FUNCTIONS +// Single functions from the ft817 library can be called straight from the pageXSoftKeyFunctionY function above +// or, if the desired function is a combination of actions, define a function below to be called by the sketch. void tuneSignalOn() @@ -387,38 +396,6 @@ void tuneSignalOff() } -void toggleVfo() -{ - radio.toggleVFO(); -} - - - -void toggleNar() -{ - radio.toggleNar(); -} - - - -void toggleIpo() -{ - radio.toggleIPO(); -} - - - -void toggleBreakIn() -{ - radio.toggleBreakIn(); -} - - -void toggleKeyer() -{ - radio.toggleKeyer(); -} - void displayABCkeys()