From 224fb496cd7e713415c1bb477534e3569f9dd0cc Mon Sep 17 00:00:00 2001 From: Reed Nightingale Date: Wed, 1 Jan 2020 20:27:29 -0800 Subject: [PATCH] Add some button printout debugging, and center the button grid --- ubitx_ui.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ubitx_ui.cpp b/ubitx_ui.cpp index 06ce38c..87775b3 100644 --- a/ubitx_ui.cpp +++ b/ubitx_ui.cpp @@ -32,7 +32,7 @@ static const unsigned int LAYOUT_MODE_TEXT_Y = LAYOUT_VFO_LABEL_Y + LAYOUT_VFO_L static const unsigned int LAYOUT_MODE_TEXT_WIDTH = 320; static const unsigned int LAYOUT_MODE_TEXT_HEIGHT = 36; -static const unsigned int LAYOUT_BUTTON_X = 0; +static const unsigned int LAYOUT_BUTTON_X = 2; static const unsigned int LAYOUT_BUTTON_Y = LAYOUT_MODE_TEXT_Y + LAYOUT_MODE_TEXT_HEIGHT + 1; static const unsigned int LAYOUT_BUTTON_WIDTH = 60; static const unsigned int LAYOUT_BUTTON_HEIGHT = 36; @@ -463,6 +463,8 @@ void enterFreq(){ if(button.x < ts_point.x && ts_point.x < x2 && button.y < ts_point.y && ts_point.y < y2){ + Serial.print(F("Entered key: ")); + Serial.println(button.text); switch(button.id){ case KEYS_OK: { @@ -825,6 +827,13 @@ void setCwTone(){ } void doCommand(Button* button){ + Serial.print(F("Doing command: ")); + Serial.print(button->text); + Serial.print(F(", Hitbox: ")); + Serial.print(button->x);Serial.print(F(",")); + Serial.print(button->y);Serial.print(F(";")); + Serial.print(button->x + button->w);Serial.print(F(",")); + Serial.println(button->y + button->h); switch(button->id){ case BUTTON_RIT: {