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}")
--- /dev/null
+* 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.
+
--- /dev/null
+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*
if (!fill_values(struct_type, count, unit, accuracy)) {
DbgPrint("Fill values returned false");
+ mValueMutex.unlock();
return -3;
}
void* BaseProcessor::started(void *ctx)
{
- //DbgPrint("%p",(void *) ctx);
+ DbgPrint("");
return ((BaseProcessor *) ctx)->started();
}
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;
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("");
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));
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));
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) {