#add_definitions(-D_ESTIMATE_PERFORMANCE)
#add_definitions(-D_DEFAULT_FONT_NAME="Vera")
add_definitions(-Wall -O3 -omit-frame-pointer)
-add_definitions(-Wall -g -D_DEBUG)
+#add_definitions(-Wall -g -D_DEBUG)
add_definitions(-Iinclude)
add_library(${PROJECT_NAME} SHARED
+sf-plugin-geo-emul (0.2.4) unstable; urgency=low
+
+ * modified for support updated libslp-sensor
+
+ -- Sungmin Ha <sungmin82.ha@samsung.com> Thu, 5 Apr 2012 15:06:52 +0900
+
sf-plugin-geo-emul (0.2.3) unstable; urgency=low
* add description in control file for server import
Priority: extra
Maintainer: Sungmin ha <sungmin82.ha@samsung.com>
Build-Depends: libsf-common-dev
-Standards-Version: 0.2.1
+Standards-Version: 0.2.4
Package: sf-plugin-geo-emul
Section: misc
public:
enum geo_sim_data_id {
- GEO_BASE_DATA_SET = (0x0004<<16) | 0x0001,
+ GEOMAGNETIC_BASE_DATA_SET = (0x0004<<16) | 0x0001,
+ GEOMAGNETIC_RAW_DATA_SET = (0x0004<<16) | 0x0001,
+ GEOMAGNETIC_ATITUDE_DATA_SET = (0x0004<<16) | 0x0002,
};
--- /dev/null
+#git:/slp/pkgs/e/emulator-plugin-geo
+Name: sf-plugin-geo-emul
+Version: 0.2.1
+Release: 1
+Summary: ambient Plugin for sensor framework
+Group: System Environment/Libraries
+License: GNUv2
+Source0: %{name}-%{version}.tar.gz
+BuildArch: i386
+ExclusiveArch: %{ix86}
+BuildRequires: cmake
+BuildRequires: pkgconfig(sf_common)
+
+%description
+
+%prep
+%setup -q
+
+%build
+export LDFLAGS+="-Wl,--rpath=%{_prefix}/lib -Wl,--as-needed"
+
+LDFLAGS="$LDFLAGS" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+%clean
+make clean
+rm -rf CMakeCache.txt
+rm -rf CMakeFiles
+rm -rf cmake_install.cmake
+rm -rf Makefile
+rm -rf install_manifes.txt
+rm -rf *.so
+
+%post
+
+%postun
+
+%files
+%defattr(-,root,root,-)
+%{_prefix}/lib/sensor_framework/*.so*
+
+%changelog
#include <cgeo_sim.h>
-
+#define SENSOR_NAME "Emul_ModelId_Magnetic"
+#define SENSOR_VENDOR "Emul_Vendor"
const char *cgeo_sim::m_port[] = {"raw","tesla"};
int cgeo_sim::get_property(unsigned int property_level , void *property_data)
{
- return -1;
+ base_property_struct *return_property;
+ return_property = (base_property_struct *)property_data;
+
+ if ( (property_level & 0xFFFF) == 1 ) {
+ return_property->sensor_unit_idx = IDX_UNIT_MICRO_TESLA;
+ return_property->sensor_min_range = -1200;
+ return_property->sensor_max_range = 1200;
+ return_property->sensor_resolution = 1;
+ snprintf(return_property->sensor_name, sizeof(return_property->sensor_name), SENSOR_NAME );
+ snprintf(return_property->sensor_vendor, sizeof(return_property->sensor_vendor), SENSOR_VENDOR);
+ } else if ( (property_level & 0xFFFF) == 2 ) {
+ return_property->sensor_unit_idx = IDX_UNIT_DEGREE;
+ return_property->sensor_min_range = 0;
+ return_property->sensor_max_range = 359;
+ return_property->sensor_resolution = 1;
+ } else {
+ ERR("Doesnot support property_level : %d\n",property_level);
+ return -1;
+ }
+
+ return 0;
}
int cgeo_sim::get_struct_value(unsigned int struct_type , void *struct_values)