diff --git a/libnxwidgets/src/cgraphicsport.cxx b/libnxwidgets/src/cgraphicsport.cxx index b1c2b2f15..9a6dfd9ec 100644 --- a/libnxwidgets/src/cgraphicsport.cxx +++ b/libnxwidgets/src/cgraphicsport.cxx @@ -204,7 +204,7 @@ void CGraphicsPort::drawHorizLine(nxgl_coord_t x, nxgl_coord_t y, if (!m_pNxWnd->fill(&dest, color)) { - gerr("INxWindow::fill failed\n"); + gerr("ERROR: INxWindow::fill failed\n"); } } @@ -234,7 +234,7 @@ void CGraphicsPort::drawVertLine(nxgl_coord_t x, nxgl_coord_t y, if (!m_pNxWnd->fill(&dest, color)) { - gerr("INxWindow::fill failed\n"); + gerr("ERROR: INxWindow::fill failed\n"); } } @@ -263,7 +263,7 @@ void CGraphicsPort::drawLine(nxgl_coord_t x1, nxgl_coord_t y1, if (!m_pNxWnd->drawLine(&vector, 1, color, caps)) { - gerr("INxWindow::drawLine failed\n"); + gerr("ERROR: INxWindow::drawLine failed\n"); } } diff --git a/libnxwidgets/src/cnxserver.cxx b/libnxwidgets/src/cnxserver.cxx index a1fd45e1b..d412988eb 100644 --- a/libnxwidgets/src/cnxserver.cxx +++ b/libnxwidgets/src/cnxserver.cxx @@ -144,7 +144,7 @@ bool CNxServer::connect(void) ret = boardctl(BOARDIOC_GRAPHICS_SETUP, (uintptr_t)&devinfo); if (ret < 0) { - gerr("boardctl failed, devno=%d: %d\n", CONFIG_NXWIDGETS_DEVNO, errno); + gerr("ERROR: boardctl failed, devno=%d: %d\n", CONFIG_NXWIDGETS_DEVNO, errno); return false; } @@ -158,7 +158,7 @@ bool CNxServer::connect(void) ret = board_lcd_initialize(); if (ret < 0) { - gerr("board_lcd_initialize failed: %d\n", -ret); + gerr("ERROR: board_lcd_initialize failed: %d\n", -ret); return false; } @@ -167,7 +167,7 @@ bool CNxServer::connect(void) m_hDevice = board_lcd_getdev(CONFIG_NXWIDGETS_DEVNO); if (!m_hDevice) { - gerr("board_lcd_getdev failed, devno=%d\n", CONFIG_NXWIDGETS_DEVNO); + gerr("ERROR: board_lcd_getdev failed, devno=%d\n", CONFIG_NXWIDGETS_DEVNO); return false; } @@ -184,14 +184,14 @@ bool CNxServer::connect(void) ret = up_fbinitialize(0); if (ret < 0) { - gerr("up_fbinitialize failed: %d\n", -ret); + gerr("ERROR: up_fbinitialize failed: %d\n", -ret); return false; } m_hDevice = up_fbgetvplane(0, CONFIG_NXWIDGETS_VPLANE); if (!m_hDevice) { - gerr("CNxServer::connect: up_fbgetvplane failed, vplane=%d\n", + gerr("ERROR: CNxServer::connect: up_fbgetvplane failed, vplane=%d\n", CONFIG_NXWIDGETS_VPLANE); return false; } @@ -203,7 +203,7 @@ bool CNxServer::connect(void) m_hNxServer = nx_open(m_hDevice); if (!m_hNxServer) { - gerr("CNxServer::connect: nx_open failed: %d\n", errno); + gerr("ERROR: CNxServer::connect: nx_open failed: %d\n", errno); return false; } @@ -213,7 +213,7 @@ bool CNxServer::connect(void) ret = vnc_default_fbinitialize(0, m_hNxServer); if (ret < 0) { - gerr("CNxServer::connect: vnc_default_fbinitialize failed: %d\n", ret); + gerr("ERROR: CNxServer::connect: vnc_default_fbinitialize failed: %d\n", ret); disconnect(); return false; } @@ -240,7 +240,7 @@ bool CNxServer::connect(void) ret = sched_setparam(0, ¶m); if (ret < 0) { - gerr("CNxServer::connect: sched_setparam failed: %d\n" , ret); + gerr("ERROR: CNxServer::connect: sched_setparam failed: %d\n" , ret); return false; } @@ -253,7 +253,7 @@ bool CNxServer::connect(void) (FAR char * const *)0); if (serverId < 0) { - gerr("NxServer::connect: Failed to create nx_servertask task: %d\n", errno); + gerr("ERROR: NxServer::connect: Failed to create nx_servertask task: %d\n", errno); return false; } @@ -276,7 +276,7 @@ bool CNxServer::connect(void) ret = vnc_default_fbinitialize(0, m_hNxServer); if (ret < 0) { - gerr("CNxServer::connect: vnc_default_fbinitialize failed: %d\n", ret); + gerr("ERROR: CNxServer::connect: vnc_default_fbinitialize failed: %d\n", ret); m_running = false; disconnect(); return false; @@ -298,7 +298,7 @@ bool CNxServer::connect(void) ret = pthread_create(&thread, &attr, listener, (FAR void *)this); if (ret != 0) { - gerr("NxServer::connect: pthread_create failed: %d\n", ret); + gerr("ERROR: NxServer::connect: pthread_create failed: %d\n", ret); m_running = false; disconnect(); return false; @@ -329,7 +329,7 @@ bool CNxServer::connect(void) } else { - gerr("NxServer::connect: nx_connect failed: %d\n", errno); + gerr("ERROR: NxServer::connect: nx_connect failed: %d\n", errno); return false; } @@ -412,7 +412,7 @@ int CNxServer::server(int argc, char *argv[]) ret = boardctl(BOARDIOC_GRAPHICS_SETUP, (uintptr_t)&devinfo); if (ret < 0) { - gerr("boardctl failed, devno=%d: %d\n", CONFIG_NXWIDGETS_DEVNO, errno); + gerr("ERROR: boardctl failed, devno=%d: %d\n", CONFIG_NXWIDGETS_DEVNO, errno); return EXIT_FAILURE; } @@ -424,7 +424,7 @@ int CNxServer::server(int argc, char *argv[]) ret = board_lcd_initialize(); if (ret < 0) { - gerr("board_lcd_initialize failed: %d\n", -ret); + gerr("ERROR: board_lcd_initialize failed: %d\n", -ret); return EXIT_FAILURE; } @@ -433,7 +433,7 @@ int CNxServer::server(int argc, char *argv[]) dev = board_lcd_getdev(CONFIG_NXWIDGETS_DEVNO); if (!dev) { - gerr("board_lcd_getdev failed, devno=%d\n", CONFIG_NXWIDGETS_DEVNO); + gerr("ERROR: board_lcd_getdev failed, devno=%d\n", CONFIG_NXWIDGETS_DEVNO); return EXIT_FAILURE; } @@ -447,14 +447,14 @@ int CNxServer::server(int argc, char *argv[]) ret = up_fbinitialize(0); if (ret < 0) { - gerr("nxterm_server: up_fbinitialize failed: %d\n", -ret); + gerr("ERROR: nxterm_server: up_fbinitialize failed: %d\n", -ret); return EXIT_FAILURE; } dev = up_fbgetvplane(0, CONFIG_NXWIDGETS_VPLANE); if (!dev) { - gerr("up_fbgetvplane failed, vplane=%d\n", CONFIG_NXWIDGETS_VPLANE); + gerr("ERROR: up_fbgetvplane failed, vplane=%d\n", CONFIG_NXWIDGETS_VPLANE); return 2; } @@ -497,7 +497,7 @@ FAR void *CNxServer::listener(FAR void *arg) // An error occurred... assume that we have lost connection with // the server. - gerr("Lost server connection: %d\n", errno); + gwarn("WARNING: Lost server connection: %d\n", errno); break; } diff --git a/libnxwidgets/src/cnxtimer.cxx b/libnxwidgets/src/cnxtimer.cxx index b0f907ddf..9f0bc6c66 100644 --- a/libnxwidgets/src/cnxtimer.cxx +++ b/libnxwidgets/src/cnxtimer.cxx @@ -162,7 +162,7 @@ void CNxTimer::start(void) if (ret < 0) { - gerr("work_queue failed: %d\n", ret); + gerr("ERROR: work_queue failed: %d\n", ret); } m_isRunning = true; @@ -181,7 +181,7 @@ void CNxTimer::stop(void) if (ret < 0) { - gerr("work_cancel failed: %d\n", ret); + gerr("ERROR: work_cancel failed: %d\n", ret); } m_isRunning = false; diff --git a/libnxwidgets/src/cscaledbitmap.cxx b/libnxwidgets/src/cscaledbitmap.cxx index 376a47f42..41922a2ed 100644 --- a/libnxwidgets/src/cscaledbitmap.cxx +++ b/libnxwidgets/src/cscaledbitmap.cxx @@ -249,7 +249,7 @@ bool CScaledBitmap::getRun(nxgl_coord_t x, nxgl_coord_t y, struct rgbcolor_s color1; if (!rowColor(m_rowCache[0], column, color1)) { - gerr("ERROR rowColor failed for the first row\n"); + gerr("ERROR: rowColor failed for the first row\n"); return false; } @@ -258,7 +258,7 @@ bool CScaledBitmap::getRun(nxgl_coord_t x, nxgl_coord_t y, struct rgbcolor_s color2; if (!rowColor(m_rowCache[1], column, color2)) { - gerr("ERROR rowColor failed for the second row\n"); + gerr("ERROR: rowColor failed for the second row\n"); return false; } @@ -389,7 +389,7 @@ bool CScaledBitmap::cacheRows(unsigned int row) if (!m_bitmap->getRun(0, row, bitmapWidth, m_rowCache[1])) { - gerr("Failed to read bitmap row %d\n", row); + gerr("ERROR: Failed to read bitmap row %d\n", row); return false; } } @@ -408,7 +408,7 @@ bool CScaledBitmap::cacheRows(unsigned int row) if (!m_bitmap->getRun(0, row, bitmapWidth, m_rowCache[0])) { - gerr("Failed to read bitmap row %d\n", row); + gerr("ERROR: Failed to read bitmap row %d\n", row); return false; } @@ -425,7 +425,7 @@ bool CScaledBitmap::cacheRows(unsigned int row) if (!m_bitmap->getRun(0, row, bitmapWidth, m_rowCache[1])) { - gerr("Failed to read bitmap row %d\n", row); + gerr("ERROR: Failed to read bitmap row %d\n", row); return false; } } diff --git a/nxwm/src/ccalibration.cxx b/nxwm/src/ccalibration.cxx index 4e2a468f9..41189cee6 100644 --- a/nxwm/src/ccalibration.cxx +++ b/nxwm/src/ccalibration.cxx @@ -539,7 +539,7 @@ bool CCalibration::startCalibration(enum ECalThreadState initialState) if (isRunning()) { - gerr("The calibration thread is already running\n"); + gwarn("WARNING: The calibration thread is already running\n"); return false; } @@ -563,7 +563,7 @@ bool CCalibration::startCalibration(enum ECalThreadState initialState) int ret = pthread_create(&m_thread, &attr, calibration, (FAR void *)this); if (ret != 0) { - gerr("pthread_create failed: %d\n", ret); + gerr("ERROR: pthread_create failed: %d\n", ret); return false; } @@ -589,7 +589,7 @@ FAR void *CCalibration::calibration(FAR void *arg) if (!This->createWidgets()) { - gerr("ERROR failed to create widgets\n"); + gerr("ERROR: failed to create widgets\n"); return false; } @@ -1152,7 +1152,7 @@ bool CCalibration::createCalibrationData(struct SCalibrationData &data) struct nxgl_size_s windowSize; if (!window->getSize(&windowSize)) { - gerr("NXWidgets::INxWindow::getSize failed\n"); + gerr("ERROR: NXWidgets::INxWindow::getSize failed\n"); return false; } @@ -1173,7 +1173,7 @@ bool CCalibration::createCalibrationData(struct SCalibrationData &data) data.left.slope = (bottomX - topX) / (bottomY - topY); data.left.offset = topX - topY * data.left.slope; - ierr("Left slope: %6.2f offset: %6.2f\n", data.left.slope, data.left.offset); + iinfo("Left slope: %6.2f offset: %6.2f\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; @@ -1184,7 +1184,7 @@ bool CCalibration::createCalibrationData(struct SCalibrationData &data) data.right.slope = (bottomX - topX) / (bottomY - topY); data.right.offset = topX - topY * data.right.slope; - ierr("Right slope: %6.2f offset: %6.2f\n", data.right.slope, data.right.offset); + iinfo("Right slope: %6.2f offset: %6.2f\n", data.right.slope, data.right.offset); // Y lines: // @@ -1202,7 +1202,7 @@ bool CCalibration::createCalibrationData(struct SCalibrationData &data) data.top.slope = (rightY - leftY) / (rightX - leftX); data.top.offset = leftY - leftX * data.top.slope; - ierr("Top slope: %6.2f offset: %6.2f\n", data.top.slope, data.top.offset); + iinfo("Top slope: %6.2f offset: %6.2f\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; @@ -1213,7 +1213,7 @@ bool CCalibration::createCalibrationData(struct SCalibrationData &data) data.bottom.slope = (rightY - leftY) / (rightX - leftX); data.bottom.offset = leftY - leftX * data.bottom.slope; - ierr("Bottom slope: %6.2f offset: %6.2f\n", data.bottom.slope, data.bottom.offset); + iinfo("Bottom slope: %6.2f offset: %6.2f\n", data.bottom.slope, data.bottom.offset); // Save also the calibration screen positions @@ -1241,7 +1241,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); - ierr("New xSlope: %08x xOffset: %08x\n", data.xSlope, data.xOffset); + iinfo("New xSlope: %08x xOffset: %08x\n", data.xSlope, data.xOffset); // Similarly for Y // @@ -1262,7 +1262,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); - ierr("New ySlope: %08x yOffset: %08x\n", data.ySlope, data.yOffset); + iinfo("New ySlope: %08x yOffset: %08x\n", data.ySlope, data.yOffset); #endif return true; diff --git a/nxwm/src/ckeyboard.cxx b/nxwm/src/ckeyboard.cxx index 23631007c..eef5bb33d 100644 --- a/nxwm/src/ckeyboard.cxx +++ b/nxwm/src/ckeyboard.cxx @@ -130,7 +130,7 @@ bool CKeyboard::start(void) int ret = pthread_create(&m_thread, &attr, listener, (FAR void *)this); if (ret != 0) { - gerr("CKeyboard::start: pthread_create failed: %d\n", ret); + gerr("ERROR: CKeyboard::start: pthread_create failed: %d\n", ret); return false; } @@ -281,7 +281,7 @@ int CKeyboard::session(void) return -errcode; } - ferr("Awakened with EINTR\n"); + fwarn("WARNING: Awakened with EINTR\n"); } // Give the keyboard input to NX diff --git a/nxwm/src/ctouchscreen.cxx b/nxwm/src/ctouchscreen.cxx index 778daa2f8..4d2c6d2ad 100644 --- a/nxwm/src/ctouchscreen.cxx +++ b/nxwm/src/ctouchscreen.cxx @@ -170,7 +170,7 @@ bool CTouchscreen::start(void) int ret = pthread_create(&m_thread, &attr, listener, (FAR void *)this); if (ret != 0) { - gerr("CTouchscreen::start: pthread_create failed: %d\n", ret); + ginfo("CTouchscreen::start: pthread_create failed: %d\n", ret); return false; } @@ -358,7 +358,7 @@ FAR void *CTouchscreen::listener(FAR void *arg) #if defined(CONFIG_DEBUG_GRAPHICS_ERROR) || defined(CONFIG_DEBUG_ASSERTIONS) int errval = errno; - gerr("read %s failed: %d\n", + gerr("ERROR: read %s failed: %d\n", CONFIG_NXWM_TOUCHSCREEN_DEVPATH, errval); DEBUGASSERT(errval == EINTR); #endif diff --git a/nxwm/src/cwindowmessenger.cxx b/nxwm/src/cwindowmessenger.cxx index 7a003d6db..28e85a916 100644 --- a/nxwm/src/cwindowmessenger.cxx +++ b/nxwm/src/cwindowmessenger.cxx @@ -196,7 +196,7 @@ void CWindowMessenger::destroyWorkCallback(FAR void *arg) // Then release the memory. - gerr("Deleting app=%p\n", state->instance); + ginfo("Deleting app=%p\n", state->instance); IApplication *app = (IApplication *)state->instance; delete app; delete state;