Labels

25/08/2011

Gumstix touch screen problem


I re-installed file system (2Gb SD card) for my Overo gumstix. After i booted from SD, I found the touch screen did not work. So, I had a look in /dev/input directory. I can only see 'mice' in this folder, no 'touchscreen0'.

Then I tried different way to solve the problem. I tried:
$ nand erase 240000 20000
$ reset

When I booted gumstix, the back light of screen turned on, but nothing displays on the screen.  I can see 'touchscreen0' in /dev/input.  I tried '/usr/bin/ts_test'. This command can detect the position when i touched screen, but just no display.

I thought my screen was faulty.

After that, I took a look the u-boot environment:

# printenv
dvimode=1024x768MR-16@60
defaultdisplay=dvi

DVI? The touch screen I am using is LCD!

Ok, changed it to:
# setenv defaultdisplay lcd43
# saveenv
# boot

Haha, screen is working.

08/08/2011

Install AnalogWidget in Ubuntu / Gumstix

Install in Ubuntu:

System spec:

Ubuntu 10.04 (lucid)
2.30.2 (Ubuntu 2010-06-25)
2.6.32-33-generic (#70-Ubuntu SMP Thu Jul 7 21:13:52 UTC 2011)
4.4.3 (x86_64-linux-gnu)
AnalogWidgets_234.zip

Download from here:
http://qt-apps.org/content/show.php?content=87780&forumpage=0

unzip it.

$ cd /home/czhang/Downloads/AnalogWidgets
$ qmake AnalogWidgets.pro
$ make
$ sudo make install
$ cp  /home/czhang/Downloads/AnalogWidgets/analogwidgets/libanalogwidgets_plugin.so /home/czhang/QtSDK/QtCreator/lib/qtcreator/plugins/designer/libanalogwidgets_plugin.so

In .pro file, added:
LIBS += /home/czhang/Downloads/AnalogWidgets/analogwidgets/libanalogwidgets_plugin.so
INCLUDEPATH += /home/czhang/Downloads/AnalogWidgets/analogwidgets/analogwidgets


Install in Gumstix:

unzip Analogwidget.zip under:
/build/czhang/qt-everywhere-opensource-src-4.7.0/projects

$ qmake AnalogWidgets.pro
$ make

got some error messages according to file:
/build/czhang/AnalogWidgets/analogwidgets/code/chart/channel.cpp
/build/czhang/AnalogWidgets/analogwidgets/code/scriptwidget.cpp

I edited these two files:
in channel.cpp
void Channel::setType(unsigned int i)
{
//if (i!=Line && i!=Dots)
// throw "Bledny typ";

m_type = i;

}

in scriptwidget.cpp:
void ScriptWidget::setScript(const QString & s)
{
m_script = s;
qDebug("ScriptWidget::setScript() %s",qPrintable(m_script));
try
{
QFile file(m_script);
if (file.open( QIODevice::ReadOnly ))
{
QString src = QString(file.readAll());
QScriptValue widget = m_engine->newQObject(this);
m_engine->globalObject().setProperty(objectName(),widget);
m_engine->evaluate(src);
QScriptValue v = m_engine->uncaughtException();

if (v.isValid())
qDebug("Error %s",qPrintable(v.toString()));
}
}
//catch (std::exception & e)
//{
// qDebug("Wyjatek %s",e.what());
//}
}// setScript


$ scp /build/czhang/qt-everywhere-opensource-src-4.7.0/projects/AnalogWidgets/analogwidgets/libanalogwidgets_plugin.so root@10.0.0.146://usr/lib