Tizen 2.1 base
authorJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 16:36:54 +0000 (01:36 +0900)
committerJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 16:36:54 +0000 (01:36 +0900)
CMakeLists.txt
packaging/sensor-plugins-mfld-blackbay.changes [new file with mode: 0644]
packaging/sensor-plugins-mfld-blackbay.spec [new file with mode: 0644]
src/baseprocessor.cpp
src/lightprocessor.cpp
src/proxiprocessor.cpp

index 31a8780..eede785 100644 (file)
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 2.6)
-project(sensors_bb CXX)
+project(sensor-plugins-mfld-blackbay CXX)
 
 # to install pkgconfig setup file.
 SET(EXEC_PREFIX "\${prefix}")
diff --git a/packaging/sensor-plugins-mfld-blackbay.changes b/packaging/sensor-plugins-mfld-blackbay.changes
new file mode 100644 (file)
index 0000000..17f381a
--- /dev/null
@@ -0,0 +1,32 @@
+* Wed Jan 30 2013 Telle-Tiia Pitkänen <telle-tiia.pitkanen@ixonos.com> submit/tizen_2.0/20130128.082005@ddba03f
+- Rename package to sensor-plugins-mfld-blackbay
+
+* Thu Jan 24 2013 Timo Toikkanen <timo.toikkanen@ixonos.com> accepted/tizen_2.0/20130111.182103@acd54f7
+- Fix for TZSP-4919
+- Updating changelog
+
+* Fri Jan 10 2013 Telle-Tiia Pitkänen <telle-tiia.pitkanen@ixonos.com> submit/trunk/20121023.061641@daf1aa1
+- Adding LGPLv2.1 license information
+
+* Mon Oct 22 2012 Telle-Tiia Pitkänen <telle-tiia.pitkanen@ixonos.com> submit/trunk/20121018.113436@82ffeba
+- Changing x-axis to negative for platform changes.
+
+* Thu Oct 18 2012 Telle-Tiia Pitkänen <telle-tiia.pitkanen@ixonos.com> submit/2.0_beta/20121005.062450@49bb12d
+- Revert axes change due changes in platform.
+- Merge "Changing sign in 'z' and 'y' axes to negative. TZSP-3064" into 2.0_beta
+- Changing sign in 'z' and 'y' axes to negative. TZSP-3064
+
+* Fri Oct 05 2012 Przemyslaw Marek <przemyslaw.marek@ixonos.com> submit/2.0_beta/20120905.095619@5bf021a
+- Changing sign in 'z' and 'y' axes to negative. TZSP-3064
+
+* Wed Sep 05 2012 Yan Yin <yan.yin@intel.com> submit/2.0_beta/20120831.083244@8b25b4a
+- change PRESSURE_SENSOR to BAROMETER_SENSOR for 2.0.
+
+* Mon Aug 06 2012 Miika Jarvinen <miika.jarvinen@ixonos.com> 9ede2fa
+[ Miika Jarvinen ]
+- Fix inverted landscape rotation
+
+* Tue Jul 10 2012 miika.jarvinen@ixonos.com <miika.jarvinen@ixonos.com> 3317897
+[ Miika Jarvinen ]
+-     Sensor framework plugins for blackbay device.
+
diff --git a/packaging/sensor-plugins-mfld-blackbay.spec b/packaging/sensor-plugins-mfld-blackbay.spec
new file mode 100644 (file)
index 0000000..d730ba4
--- /dev/null
@@ -0,0 +1,35 @@
+Name:       sensor-plugins-mfld-blackbay
+Summary:    Plugins for sensor framework on blackbay device
+Version:    0.1.0
+Release:    1
+Group:      System/Sensor Framework
+License:    LGPLv2.1
+Source0:    %{name}-%{version}.tar.gz
+Requires:   libsf-common
+Requires:   sensor
+Requires:   udev
+BuildRequires:  pkgconfig(sf_common)
+BuildRequires:  pkgconfig(sensor)
+BuildRequires:  pkgconfig(libudev)
+BuildRequires:  pkgconfig(vconf)
+BuildRequires:  cmake
+
+
+%description
+Plugins for sensor framework on blackbay device.
+
+%prep
+%setup -q -n %{name}-%{version}
+
+%build
+cmake . -DCMAKE_INSTALL_PREFIX="/usr"
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/sensor_framework/*.so*
index 8b905a8..faf8c51 100644 (file)
@@ -209,6 +209,7 @@ int BaseProcessor::get_struct_value(unsigned int struct_type , void *struct_valu
 
      if (!fill_values(struct_type, count, unit, accuracy)) {
           DbgPrint("Fill values returned false");
+          mValueMutex.unlock();
           return -3;
      }
 
@@ -231,7 +232,7 @@ int BaseProcessor::get_struct_value(unsigned int struct_type , void *struct_valu
 
 void* BaseProcessor::started(void *ctx)
 {
-     //DbgPrint("%p",(void *) ctx);
+     DbgPrint("");
      return ((BaseProcessor *) ctx)->started();
 }
 
@@ -272,7 +273,7 @@ void BaseProcessor::process_input_events(const std::vector<input_event*> &events
           case EV_REL:
           case EV_ABS:
                DbgPrint("%s sensor got input code %d value %d\n",mName.c_str(), event.code, event.value);
-               if (event.code >= 0 && event.code < sizeof(mValues)/sizeof(float))
+               if (event.code < sizeof(mValues)/sizeof(float))
                     mValues[event.code] = event.value;
                break;
 
@@ -390,7 +391,7 @@ const char *BaseProcessor::find_device_from_udev(const char *driver)
      udev_enumerate *enumerator = NULL;
      bool result = false;
      struct udev_list_entry *devices = NULL, *dev_list_entry = NULL;
-     const char *devicePath = NULL;
+     const char *devicePath = "";
 
      DbgPrint("");
 
@@ -467,8 +468,10 @@ bool BaseProcessor::writeToSysfs(const char *filename, const char *buffer, int c
                DbgPrint("Sysfs file entry opened");
                int writeCount = write(fd,buffer,count);
                if (writeCount == count) {
+                    close(fd);
                     return true;
                }
+               close(fd);
           }
      }
      DbgPrint("There was error opening sysfs file %s",strerror(errno));
index 58b09b8..2cec8d7 100644 (file)
@@ -132,9 +132,7 @@ void* LightProcessor::started()
      pollfd pollInfo;
      pollInfo.fd = mFd;
      pollInfo.events = POLLIN;
-     poll(&pollInfo,1,2000);
-
-     if (pollInfo.revents & POLLIN) {
+     if(poll(&pollInfo,1,2000)){
           DbgPrint("HAVE POLLIN");
           int value;
           int readCount = read(mFd,&value,sizeof(int));
index cb2f8b2..42b8a97 100644 (file)
@@ -99,10 +99,8 @@ void* ProxiProcessor::started()
      pollfd pollInfo;
      pollInfo.fd = mFd;
      pollInfo.events = POLLIN;
-     poll(&pollInfo,1,-1);
-     DbgPrint("Poll completed");
-
-     if (pollInfo.revents & POLLIN) {
+     if (poll(&pollInfo,1,-1)){
+          DbgPrint("Poll completed");
           int value;
           int result = read(mFd,&value,sizeof(int));
           if (result > 0) {