Skip to content
Browse files

work on camera api

  • Loading branch information...
1 parent 629e8c8 commit c081d99d3e13fbe2a630af9827b80314275e6a07 @bmcdorman bmcdorman committed
Showing with 5 additions and 10 deletions.
  1. +1 −8 Readme.markdown
  2. +0 −1 include/kovan/camera.h
  3. +4 −0 src/camera.cpp
  4. +0 −1 src/channel_p.cpp
View
9 Readme.markdown
@@ -1,21 +1,14 @@
libkovan
========
-libkovan is a user library that can read sensor values, move motors, and draw graphics to the Kovan. libkovan is written in C++, but also exposes both C bindings for simplified use cases.
+libkovan is a user library that can read sensor values, move motors, and draw graphics to the Kovan. libkovan is written in C++, but also exposes C bindings for simplified use cases.
Requirements
============
* CMake 2.6.0 or higher
-* Qt 4.8.0 or higher (drawing library)
* i2c_wrapper
-Runtime Requirements
-====================
-
-* running instance of kovand
-* X11 server or Qt embedded server
-
Authors
=======
View
1 include/kovan/camera.h
@@ -28,7 +28,6 @@
extern "C" {
#endif
-
#ifdef __cplusplus
}
#endif
View
4 src/camera.cpp
@@ -276,6 +276,9 @@ bool Camera::Device::update()
if(!success) return false;
+ // No need to update channels if there are none.
+ if(m_channels.empty()) return true;
+
// Dirty all channel impls
m_channelImplManager->setImage(m_image);
@@ -326,6 +329,7 @@ void Camera::Device::updateConfig()
{
ChannelPtrVector::iterator it = m_channels.begin();
for(; it != m_channels.end(); ++it) delete *it;
+ m_channels.clear();
m_config.clearGroup();
m_config.beginGroup(CAMERA_GROUP);
View
1 src/channel_p.cpp
@@ -73,7 +73,6 @@ BarcodeChannelImpl::BarcodeChannelImpl()
{
m_image.set_format("Y800");
m_scanner.set_config(zbar::ZBAR_NONE, zbar::ZBAR_CFG_ENABLE, 0);
- m_scanner.set_config(zbar::ZBAR_CODE128, zbar::ZBAR_CFG_ENABLE, 1);
m_scanner.set_config(zbar::ZBAR_QRCODE, zbar::ZBAR_CFG_ENABLE, 1);
}

0 comments on commit c081d99

Please sign in to comment.
Something went wrong with that request. Please try again.