From c6533b640251ba0d0ba00442e6310e83cf46f6cb Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 17 Oct 2013 15:19:26 -0600 Subject: [PATCH] Minor tweaks to debug output; started renaming some icons to include size in the name; SAMA5 NxWM config needs libm --- Kconfig | 6 ++-- nxwm/Makefile | 2 +- .../{calculator.png => calculator24x25.png} | Bin .../{calibration.png => calibration24x21.png} | Bin nxwm/images/{cmd.png => cmd25x22.png} | Bin .../{minimize.png => minimize21x21.png} | Bin nxwm/images/{nxlogo.png => nxlogo25x25.png} | Bin nxwm/images/{play.png => play24x24.png} | Bin nxwm/images/play48x48.png | Bin 0 -> 374 bytes nxwm/images/{start.png => start25x25.png} | Bin nxwm/images/{stop.png => stop21x21.png} | Bin nxwm/include/nxwmconfig.hxx | 2 +- nxwm/include/nxwmglyphs.hxx | 2 +- nxwm/src/ccalibration.cxx | 33 ++++++++++++------ nxwm/src/ctouchscreen.cxx | 2 +- .../{glyph_play.cxx => glyph_play24x24.cxx} | 6 ++-- 16 files changed, 32 insertions(+), 21 deletions(-) rename nxwm/images/{calculator.png => calculator24x25.png} (100%) rename nxwm/images/{calibration.png => calibration24x21.png} (100%) rename nxwm/images/{cmd.png => cmd25x22.png} (100%) rename nxwm/images/{minimize.png => minimize21x21.png} (100%) rename nxwm/images/{nxlogo.png => nxlogo25x25.png} (100%) rename nxwm/images/{play.png => play24x24.png} (100%) create mode 100644 nxwm/images/play48x48.png rename nxwm/images/{start.png => start25x25.png} (100%) rename nxwm/images/{stop.png => stop21x21.png} (100%) rename nxwm/src/{glyph_play.cxx => glyph_play24x24.cxx} (98%) diff --git a/Kconfig b/Kconfig index 7c7b0b8d4..ef512a5e5 100644 --- a/Kconfig +++ b/Kconfig @@ -567,15 +567,15 @@ config NXWM_CUSTOM_STARTWINDOW_ICON bool "Custom Start Window Icon" default n ---help--- - Select to override the default Start Window Icon: NxWM::g_playBitmap + Select to override the default Start Window Icon: NxWM::g_playBitmap24x24 if NXWM_CUSTOM_STARTWINDOW_ICON config NXWM_STARTWINDOW_ICON string "StartWindow Icon" - default "NxWM::g_playBitmap" + default "NxWM::g_playBitmap24x24" ---help--- - The glyph to use as the start window icon. Default: NxWM::g_playBitmap + The glyph to use as the start window icon. Default: NxWM::g_playBitmap24x24 endif # NXWM_CUSTOM_STARTWINDOW_ICON diff --git a/nxwm/Makefile b/nxwm/Makefile index f4d148316..6efb464cf 100644 --- a/nxwm/Makefile +++ b/nxwm/Makefile @@ -72,7 +72,7 @@ endif # Images CXXSRCS += glyph_calculator.cxx glyph_calibration.cxx glyph_cmd.cxx -CXXSRCS += glyph_minimize.cxx glyph_nsh.cxx glyph_play.cxx glyph_start.cxx +CXXSRCS += glyph_minimize.cxx glyph_nsh.cxx glyph_play24x24.cxx glyph_start.cxx CXXSRCS += glyph_stop.cxx ifeq ($(CONFIG_NXWM_MEDIAPLAYER),y) diff --git a/nxwm/images/calculator.png b/nxwm/images/calculator24x25.png similarity index 100% rename from nxwm/images/calculator.png rename to nxwm/images/calculator24x25.png diff --git a/nxwm/images/calibration.png b/nxwm/images/calibration24x21.png similarity index 100% rename from nxwm/images/calibration.png rename to nxwm/images/calibration24x21.png diff --git a/nxwm/images/cmd.png b/nxwm/images/cmd25x22.png similarity index 100% rename from nxwm/images/cmd.png rename to nxwm/images/cmd25x22.png diff --git a/nxwm/images/minimize.png b/nxwm/images/minimize21x21.png similarity index 100% rename from nxwm/images/minimize.png rename to nxwm/images/minimize21x21.png diff --git a/nxwm/images/nxlogo.png b/nxwm/images/nxlogo25x25.png similarity index 100% rename from nxwm/images/nxlogo.png rename to nxwm/images/nxlogo25x25.png diff --git a/nxwm/images/play.png b/nxwm/images/play24x24.png similarity index 100% rename from nxwm/images/play.png rename to nxwm/images/play24x24.png diff --git a/nxwm/images/play48x48.png b/nxwm/images/play48x48.png new file mode 100644 index 0000000000000000000000000000000000000000..24dddd781f67a9b2deb713999befb48bd31de992 GIT binary patch literal 374 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1SD@HQL70(Y)*K0-AbW|YuPggqExYQ z$&%}^1CPVS{27N;ru)BCO4Sn#`lT}Y7~|}UH<4Rb3a+TCG5Odg?Vu){peDy~XYqzQ zg+&{_EnrxqJVARkPf=2ANXuaQ{5tNoFax$2M;mt$lCwTM}2g%YpSIwf|YRZ5IP zYmL}~R$Sr^T78KxXx$|yqm@DIMr(>#jn)UTS%z9N?F_rw%oK9-oH%Rw5=SHUq8Y#t OVDNPHb6Mw<&;$SjvV{=< literal 0 HcmV?d00001 diff --git a/nxwm/images/start.png b/nxwm/images/start25x25.png similarity index 100% rename from nxwm/images/start.png rename to nxwm/images/start25x25.png diff --git a/nxwm/images/stop.png b/nxwm/images/stop21x21.png similarity index 100% rename from nxwm/images/stop.png rename to nxwm/images/stop21x21.png diff --git a/nxwm/include/nxwmconfig.hxx b/nxwm/include/nxwmconfig.hxx index a10491d39..5b42e3a70 100644 --- a/nxwm/include/nxwmconfig.hxx +++ b/nxwm/include/nxwmconfig.hxx @@ -312,7 +312,7 @@ */ #ifndef CONFIG_NXWM_STARTWINDOW_ICON -# define CONFIG_NXWM_STARTWINDOW_ICON NxWM::g_playBitmap +# define CONFIG_NXWM_STARTWINDOW_ICON NxWM::g_playBitmap24x24 #endif /** diff --git a/nxwm/include/nxwmglyphs.hxx b/nxwm/include/nxwmglyphs.hxx index 5bcd4fb83..799ca61b6 100644 --- a/nxwm/include/nxwmglyphs.hxx +++ b/nxwm/include/nxwmglyphs.hxx @@ -70,7 +70,7 @@ namespace NxWM #endif extern const struct NXWidgets::SRlePaletteBitmap g_minimizeBitmap; extern const struct NXWidgets::SRlePaletteBitmap g_nshBitmap; - extern const struct NXWidgets::SRlePaletteBitmap g_playBitmap; + extern const struct NXWidgets::SRlePaletteBitmap g_playBitmap24x24; extern const struct NXWidgets::SRlePaletteBitmap g_startBitmap; extern const struct NXWidgets::SRlePaletteBitmap g_stopBitmap; } diff --git a/nxwm/src/ccalibration.cxx b/nxwm/src/ccalibration.cxx index 01bdf3b44..51b536db0 100644 --- a/nxwm/src/ccalibration.cxx +++ b/nxwm/src/ccalibration.cxx @@ -73,6 +73,17 @@ #define CALIBRATION_CIRCLE_RADIUS 16 #define CALIBRATION_LINE_THICKNESS 2 +/* We want debug output from some logic in this file if either input/touchscreen + * or graphics debug is enabled. + */ + +#ifndef CONFIG_DEBUG_INPUT +# undef idbg +# define idbg gdbg +# undef ivdbg +# define ivdbg gvdbg +#endif + /**************************************************************************** * Private Data ****************************************************************************/ @@ -341,7 +352,7 @@ void CCalibration::touchscreenInput(struct touch_sample_s &sample) m_touchPos.x = sample.point[0].x; m_touchPos.y = sample.point[0].y; - gvdbg("Touch id: %d flags: %02x x: %d y: %d h: %d w: %d pressure: %d\n", + ivdbg("Touch id: %d flags: %02x x: %d y: %d h: %d w: %d pressure: %d\n", sample.point[0].id, sample.point[0].flags, sample.point[0].x, sample.point[0].y, sample.point[0].h, sample.point[0].w, sample.point[0].pressure); @@ -379,7 +390,7 @@ void CCalibration::touchscreenInput(struct touch_sample_s &sample) { // Yes.. invoke the state machine. - gvdbg("State: %d Screen x: %d y: %d Touch x: %d y: %d\n", + ivdbg("State: %d Screen x: %d y: %d Touch x: %d y: %d\n", m_calphase, m_screenInfo.pos.x, m_screenInfo.pos.y, m_touchPos.x, m_touchPos.y); @@ -682,7 +693,7 @@ bool CCalibration::averageSamples(struct nxgl_point_s &average) // Save the sample data - gvdbg("Sample %d: Touch x: %d y: %d\n", m_nsamples+1, m_touchPos.x, m_touchPos.y); + ivdbg("Sample %d: Touch x: %d y: %d\n", m_nsamples+1, m_touchPos.x, m_touchPos.y); m_sampleData[m_nsamples].x = m_touchPos.x; m_sampleData[m_nsamples].y = m_touchPos.y; @@ -771,7 +782,7 @@ bool CCalibration::averageSamples(struct nxgl_point_s &average) average.y = m_sampleData[0].y; #endif - gvdbg("Average: Touch x: %d y: %d\n", average.x, average.y); + ivdbg("Average: Touch x: %d y: %d\n", average.x, average.y); m_nsamples = 0; return true; } @@ -1016,7 +1027,7 @@ void CCalibration::stateMachine(void) break; } - gvdbg("New m_calphase=%d Screen x: %d y: %d\n", + ivdbg("New m_calphase=%d Screen x: %d y: %d\n", m_calphase, m_screenInfo.pos.x, m_screenInfo.pos.y); } @@ -1145,7 +1156,7 @@ bool CCalibration::createCalibrationData(struct SCalibrationData &data) data.left.slope = (bottomX - topX) / (bottomY - topY); data.left.offset = topX - topY * data.left.slope; - gdbg("Left slope: %f offset: %f\n", data.left.slope, data.left.offset); + idbg("Left slope: %f offset: %f\n", data.left.slope, data.left.offset); topX = (float)m_calibData[CALIB_UPPER_RIGHT_INDEX].x; bottomX = (float)m_calibData[CALIB_LOWER_RIGHT_INDEX].x; @@ -1156,7 +1167,7 @@ bool CCalibration::createCalibrationData(struct SCalibrationData &data) data.right.slope = (bottomX - topX) / (bottomY - topY); data.right.offset = topX - topY * data.right.slope; - gdbg("Right slope: %f offset: %f\n", data.right.slope, data.right.offset); + idbg("Right slope: %f offset: %f\n", data.right.slope, data.right.offset); // Y lines: // @@ -1174,7 +1185,7 @@ bool CCalibration::createCalibrationData(struct SCalibrationData &data) data.top.slope = (rightY - leftY) / (rightX - leftX); data.top.offset = leftY - leftX * data.top.slope; - gdbg("Top slope: %f offset: %f\n", data.top.slope, data.top.offset); + idbg("Top slope: %f offset: %f\n", data.top.slope, data.top.offset); leftX = (float)m_calibData[CALIB_LOWER_LEFT_INDEX].x; rightX = (float)m_calibData[CALIB_LOWER_RIGHT_INDEX].x; @@ -1185,7 +1196,7 @@ bool CCalibration::createCalibrationData(struct SCalibrationData &data) data.bottom.slope = (rightY - leftY) / (rightX - leftX); data.bottom.offset = leftY - leftX * data.bottom.slope; - gdbg("Bottom slope: %f offset: %f\n", data.bottom.slope, data.bottom.offset); + idbg("Bottom slope: %f offset: %f\n", data.bottom.slope, data.bottom.offset); // Save also the calibration screen positions @@ -1213,7 +1224,7 @@ bool CCalibration::createCalibrationData(struct SCalibrationData &data) data.xSlope = b16divb16(itob16(CALIBRATION_RIGHTX - CALIBRATION_LEFTX), (rightX - leftX)); data.xOffset = itob16(CALIBRATION_LEFTX) - b16mulb16(leftX, data.xSlope); - gdbg("New xSlope: %08x xOffset: %08x\n", data.xSlope, data.xOffset); + idbg("New xSlope: %08x xOffset: %08x\n", data.xSlope, data.xOffset); // Similarly for Y // @@ -1234,7 +1245,7 @@ bool CCalibration::createCalibrationData(struct SCalibrationData &data) data.ySlope = b16divb16(itob16(CALIBRATION_BOTTOMY - CALIBRATION_TOPY), (bottomY - topY)); data.yOffset = itob16(CALIBRATION_TOPY) - b16mulb16(topY, data.ySlope); - gdbg("New ySlope: %08x yOffset: %08x\n", data.ySlope, data.yOffset); + idbg("New ySlope: %08x yOffset: %08x\n", data.ySlope, data.yOffset); #endif return true; diff --git a/nxwm/src/ctouchscreen.cxx b/nxwm/src/ctouchscreen.cxx index 1b9c53e4d..105908859 100644 --- a/nxwm/src/ctouchscreen.cxx +++ b/nxwm/src/ctouchscreen.cxx @@ -579,7 +579,7 @@ void CTouchscreen::handleMouseInput(struct touch_sample_s *sample) #endif - gvdbg("raw: (%d, %d) scaled: (%d, %d)\n", rawX, rawY, x, y); + vdbg("raw: (%d, %d) scaled: (%d, %d)\n", rawX, rawY, x, y); } // Get the server handle and "inject the mouse data diff --git a/nxwm/src/glyph_play.cxx b/nxwm/src/glyph_play24x24.cxx similarity index 98% rename from nxwm/src/glyph_play.cxx rename to nxwm/src/glyph_play24x24.cxx index 8c16addae..7ccce5e89 100644 --- a/nxwm/src/glyph_play.cxx +++ b/nxwm/src/glyph_play24x24.cxx @@ -1,7 +1,7 @@ /******************************************************************************************** - * NxWidgets/nxwm/src/glyph_play.cxx + * NxWidgets/nxwm/src/glyph_play24x24.cxx * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -243,7 +243,7 @@ static const struct NXWidgets::SRlePaletteBitmapEntry g_playRleEntries[] = * Public Bitmap Structure Defintions ********************************************************************************************/ -const struct NXWidgets::SRlePaletteBitmap NxWM::g_playBitmap = +const struct NXWidgets::SRlePaletteBitmap NxWM::g_playBitmap24x24 = { CONFIG_NXWIDGETS_BPP, // bpp - Bits per pixel CONFIG_NXWIDGETS_FMT, // fmt - Color format