Skip to content

Commit

Permalink
Merge branch 'integration' of github.com:PX4/NuttX
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzMeier committed Jun 17, 2013
2 parents dfd6477 + 5a74e9a commit a10350a
Show file tree
Hide file tree
Showing 315 changed files with 26,717 additions and 6,385 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.depend
Make.dep
.DS_Store
*.o
*.a
*.d
Expand Down
52 changes: 31 additions & 21 deletions NxWidgets/ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -347,25 +347,35 @@

1.8 2013-xx-xx Gregory Nutt <[email protected]>

* NxWM::CMediaPlayer: shell application for an MP3 Media Player with
Kconfig settings to enable it. I plan to write this app to help
develop and test the MP3 codec chip driver. It really doesn't do
anything yet except display a text box saying "Coming soon", and I
need to minimize the icon size a bit. From Ken Pettit (2013-5-11).
* NxWidgets/nxwm/src/glyph_mediaplayer.cxx: Smaller version of the
media player glyph. From Ken Pettit (2013-5-12).
* NxWidgets/nxwm/include/ccalibration.hxx and src/ccalibration.cxx:
Fix a race condition that would cause the calibration screen
to fail to come up when its icon was touched (From Ken Pettit,
2013-5-12).
* Kconfig: Default priorities for NxWidget and NxWM threads
should be 100, not 50, to be consistent with other default priorities.
* NxWidgets::CGlyphSliderHorizontal and NxWidgets::CGlyphSliderHorizontalGrip:
New widgets added by Ken Pettit (2013-5-15).
* NxWidgets/UnitTests/CGlyphSliderHorizontal: Addes a unit test for the
NxWidgets::CGlyphSliderHorizontal class. From Ken Pettit (2013-5-17) .
* NxWidgets::CGlyphSliderHorizontal: Fix a drawing error. From Ken
Pettit (2013-5-17).
* UnitTests/*/Makefile and .gitignore: Update the way that NSH
the Unit Tests are registered as built-in NSH applications (2013-5-30).
* NxWM::CMediaPlayer: shell application for an MP3 Media Player with
Kconfig settings to enable it. I plan to write this app to help
develop and test the MP3 codec chip driver. It really doesn't do
anything yet except display a text box saying "Coming soon", and I
need to minimize the icon size a bit. From Ken Pettit (2013-5-11).
* NxWidgets/nxwm/src/glyph_mediaplayer.cxx: Smaller version of the
media player glyph. From Ken Pettit (2013-5-12).
* NxWidgets/nxwm/include/ccalibration.hxx and src/ccalibration.cxx:
Fix a race condition that would cause the calibration screen
to fail to come up when its icon was touched (From Ken Pettit,
2013-5-12).
* Kconfig: Default priorities for NxWidget and NxWM threads
should be 100, not 50, to be consistent with other default priorities.
* NxWidgets::CGlyphSliderHorizontal and NxWidgets::CGlyphSliderHorizontalGrip:
New widgets added by Ken Pettit (2013-5-15).
* NxWidgets/UnitTests/CGlyphSliderHorizontal: Addes a unit test for the
NxWidgets::CGlyphSliderHorizontal class. From Ken Pettit (2013-5-17) .
* NxWidgets::CGlyphSliderHorizontal: Fix a drawing error. From Ken
Pettit (2013-5-17).
* UnitTests/*/Makefile and .gitignore: Update the way that NSH
the Unit Tests are registered as built-in NSH applications (2013-5-30).
* NxWidgets::CImage: Allow a NULL pointer for a bitmap. Add protection
to prevent dereferencing the NULL pointer. From Petteri Aimonen
(2013-6-4).
* NxWidgets::CNumericEdit: Delay before auto-incrementing now varies:
A longer delay is required to start auto-incrementing and speed increases
while pressed. From Petteri Aimonen (2013-6-4).
* NxWM::CTaskbar: Add a method to redraw the taskbar and the current
application. This should only be necessary if the display loses
state due to e.g. powerdown or other manual intervention. From
Petteri Aimonen (2013-6-4).

34 changes: 22 additions & 12 deletions NxWidgets/libnxwidgets/src/cimage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,29 @@ CImage::CImage(CWidgetControl *pWidgetControl, nxgl_coord_t x, nxgl_coord_t y,

void CImage::getPreferredDimensions(CRect &rect) const
{
nxgl_coord_t width = m_bitmap->getWidth();
nxgl_coord_t height = m_bitmap->getHeight();

if (!m_flags.borderless)
if (!m_bitmap)
{
width += (m_borderSize.left + m_borderSize.right);
height += (m_borderSize.top + m_borderSize.bottom);
rect.setX(m_rect.getX());
rect.setY(m_rect.getY());
rect.setWidth(0);
rect.setHeight(0);
}
else
{
nxgl_coord_t width = m_bitmap->getWidth();
nxgl_coord_t height = m_bitmap->getHeight();

rect.setX(m_rect.getX());
rect.setY(m_rect.getY());
rect.setWidth(width);
rect.setHeight(height);
if (!m_flags.borderless)
{
width += (m_borderSize.left + m_borderSize.right);
height += (m_borderSize.top + m_borderSize.bottom);
}

rect.setX(m_rect.getX());
rect.setY(m_rect.getY());
rect.setWidth(width);
rect.setHeight(height);
}
}

/**
Expand Down Expand Up @@ -440,7 +450,7 @@ void CImage::onReleaseOutside(nxgl_coord_t x, nxgl_coord_t y)

void CImage::setImageLeft(nxgl_coord_t column)
{
if (column > 0 && column <= m_bitmap->getWidth())
if (m_bitmap && column > 0 && column <= m_bitmap->getWidth())
{
m_origin.x = column;
}
Expand All @@ -455,7 +465,7 @@ void CImage::setImageLeft(nxgl_coord_t column)

void CImage::setImageTop(nxgl_coord_t row)
{
if (row > 0 && row <= m_bitmap->getHeight())
if (m_bitmap && row > 0 && row <= m_bitmap->getHeight())
{
m_origin.x = row;
}
Expand Down
14 changes: 11 additions & 3 deletions NxWidgets/libnxwidgets/src/cnumericedit.cxx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/****************************************************************************
* NxWidgets/libnxwidgets/include/cnumericedit.cxx
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <[email protected]>
* Petteri Aimonen <[email protected]>
*
Expand Down Expand Up @@ -216,15 +216,23 @@ void CNumericEdit::handleActionEvent(const CWidgetEventArgs &e)
{
m_timercount++;

int increment = m_increment;
// Increment the value at increasing speed.
// Ignore the first 3 timer ticks so that single clicks
// only increment by one.

int increment = 0;
if (m_timercount > 50)
{
increment = m_increment * 100;
}
else if (m_timercount > 10)
else if (m_timercount > 20)
{
increment = m_increment * 10;
}
else if (m_timercount > 3)
{
increment = m_increment;
}

if (m_button_minus->isClicked())
{
Expand Down
24 changes: 16 additions & 8 deletions NxWidgets/nxwm/include/ctaskbar.hxx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/****************************************************************************
* NxWidgets/nxwm/include/cnxtaskbar.hxx
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <[email protected]>
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -89,7 +89,7 @@ namespace NxWM
/**
* This structure represents an application and its associated icon image
*/

struct STaskbarSlot
{
IApplication *app; /**< A reference to the icon */
Expand All @@ -108,7 +108,7 @@ namespace NxWM
bool m_started; /**< True if window manager has been started */

/**
* Create a raw window.
* Create a raw window.
*
* 1) Create a dumb NXWidgets::CWidgetControl instance (See not).
* 2) Pass the dumb NXWidgets::CWindowMessenger instance to the window constructor
Expand All @@ -134,7 +134,7 @@ namespace NxWM
*
* @return A partially initialized application window instance.
*/

NXWidgets::CNxTkWindow *openFramedWindow(void);

/**
Expand All @@ -155,15 +155,15 @@ namespace NxWM
virtual bool createTaskbarWindow(void);

/**
* Create the background window.
* Create the background window.
*
* @return true on success
*/

virtual bool createBackgroundWindow(void);

/**
* Create the background image.
* Create the background image.
*
* @return true on success
*/
Expand Down Expand Up @@ -247,7 +247,7 @@ namespace NxWM
/**
* Connect to the server
*/

bool connect(void);

/**
Expand Down Expand Up @@ -409,7 +409,15 @@ namespace NxWM
*/

void getDisplaySize(FAR struct nxgl_size_s &size);


/**
* Force a redraw of the taskbar and current application.
* This should only be necessary if the display loses state due to e.g. powerdown
* or other manual intervention.
*/

inline void redraw() { redrawTopApplication(); }

/**
* Simulate a mouse click or release on the icon at index. This method
* is only available during automated testing of NxWM.
Expand Down
4 changes: 4 additions & 0 deletions apps/ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -574,3 +574,7 @@
nRF24L01 driver. From Laurent Latil (2013-6-1).
* apps/nshlib/Kconfig: Add some missing NSH configuration values.
From Lorenz Meier (2013-6-2).
* Standardize on CONFIG_NSH_BUILTIN_APPS. Remove all other variants
of the build-as-an-NSH-application configuration settings
(2013-6-12).

38 changes: 4 additions & 34 deletions apps/examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,45 +49,15 @@ SUBDIRS += wget wgetjson xmlrpc
# Sub-directories that might need context setup. Directories may need
# context setup for a variety of reasons, but the most common is because
# the example may be built as an NSH built-in function.
#
# Directories that may be built as NSH built-in functions may have their
# own configuration setting (like CONFIG_EXAMPLES_HELLOXX_BUILTIN), but
# many only depend on the generic CONFIG_NSH_BUILTIN_APPS setting. And
# there a few which an ONLY be built as NSH built-in applications; these
# are included in the list unconditionally.

CNTXTDIRS = pwm

ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
CNTXTDIRS += adc can cdcacm composite cxxtest dhcpd discover flash_test ftpd
CNTXTDIRS += hello helloxx json keypadtestmodbus mtdpart nettest nxhello
CNTXTDIRS += nxlines nrf24l01_term relays qencoder slcd smart_test tcpecho
CNTXTDIRS += telnetd touchscreen watchdog wgetjson
endif

ifeq ($(CONFIG_EXAMPLES_LCDRW_BUILTIN),y)
CNTXTDIRS += lcdrw
endif
ifeq ($(CONFIG_EXAMPLES_NX_BUILTIN),y)
CNTXTDIRS += nx
endif
ifeq ($(CONFIG_EXAMPLES_NXIMAGE_BUILTIN),y)
CNTXTDIRS += nximage
endif
ifeq ($(CONFIG_EXAMPLES_NXTEXT_BUILTIN),y)
CNTXTDIRS += nxtext
endif
ifeq ($(CONFIG_EXAMPLES_OSTEST_BUILTIN),y)
CNTXTDIRS += ostest
endif
ifeq ($(CONFIG_EXAMPLES_TIFF_BUILTIN),y)
CNTXTDIRS += tiff
endif
ifeq ($(CONFIG_EXAMPLES_USBMSC_BUILTIN),y)
CNTXTDIRS += usbstorage
endif
ifeq ($(CONFIG_EXAMPLES_USBTERM_BUILTIN),y)
CNTXTDIRS += usbterm
CNTXTDIRS += hello helloxx json keypadtestmodbus lcdrw mtdpart nettest nx
CNTXTDIRS += nxhello nximage nxlines nxtext nrf24l01_term ostest relays
CNTXTDIRS += qencoder slcd smart_test tcpecho telnetd tiff touchscreen
CNTXTDIRS += usbstorage usbterm watchdog wgetjson
endif

all: nothing
Expand Down
Loading

0 comments on commit a10350a

Please sign in to comment.