MESSAGE("add -DTARGET")
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-proc-geo-emul (0.2.5) unstable; urgency=low
+
+ * modified struct type condition in get_struct_value function
+
+ -- Sungmin Ha <sungmin82.ha@samsung.com> Mon, 9 Apr 2012 17:14:52 +0900
+
+sf-plugin-proc-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-proc-geo-emul (0.2.3-2) unstable; urgency=low
* modified for build only i386
Priority: extra
Maintainer: Sungmin ha <sungmin82.ha@samsung.com>
Build-Depends: libsf-common-dev, libslp-setting-dev
-Standards-Version: 0.2.3-1
+Standards-Version: 0.2.5
Package: sf-plugin-proc-geo-emul
Architecture: i386
enum geo_sim_data_id {
GEOMAGNETIC_BASE_DATA_SET = (0x0002<<16) | 0x0001,
- GEOMAGNETIC_RAW_DATA_SET = (0x0002<<16) | 0x0002,
+ GEOMAGNETIC_RAW_DATA_SET = (0x0002<<16) | 0x0001,
+ GEOMAGNETIC_ATTITUDE_DATA_SET = (0x0002<<16) | 0x0002,
};
enum geo_sim_evet_type_t {
GEOMAGNETIC_EVENT_CALIBRATION_NEEDED = (0x0002<<16) |0x0001,
- GEOMAGNETIC_EVENT_ATTITUDE_DATA_REPORT_ON_TIME = (0x0002<<16) |0x0002,
- GEOMAGNETIC_EVENT_RAW_DATA_REPORT_ON_TIME = (0x0002<<16) |0x0004,
+ GEOMAGNETIC_EVENT_RAW_DATA_REPORT_ON_TIME = (0x0002<<16) |0x0002,
+ GEOMAGNETIC_EVENT_ATTITUDE_DATA_REPORT_ON_TIME = (0x0002<<16) |0x0004,
};
enum geo_sim_sensor_event_t {
--- /dev/null
+#git:/slp/pkgs/e/emulator-plugin-geo-proc
+Name: sf-plugin-proc-geo-emul
+Version: 0.2.2
+Release: 1
+Summary: ambient Processor plugin for sensor framework (using setting)
+Group: System Environment/Libraries
+License: GNUv2
+Source0: %{name}-%{version}.tar.gz
+BuildArch: i386
+ExclusiveArch: %{ix86}
+BuildRequires: cmake
+BuildRequires: pkgconfig(sf_common)
+BuildRequires: pkgconfig(vconf)
+
+%description
+GP2AP002 ambient Processor plugin for sensor framework(unstripped)
+Easy GP2AP002 ambient Processor plugin for SLP(not recommended)
+
+%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
int geo_sim_processor::get_property(unsigned int property_level , void *property_data )
{
- if ( (property_level & 0xFFFF) == 1 ) {
- base_property_struct *return_property;
- return_property = (base_property_struct *)property_data;
- 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;
-
+ if(m_filter)
+ {
+ return m_filter->get_property(property_level, property_data);
+ } else if(m_sensor) {
+ return m_sensor->get_property(property_level, property_data);
} else {
- ERR("Doesnot support property_level : %d\n",property_level);
+ ERR("no m_sensor, cannot get_property from sensor\n");
return -1;
}
cur_time = MICROSECONDS(sv);
#ifdef TARGET
- if ( struct_type == GEOMAGNETIC_BASE_DATA_SET ) {
+ if ( struct_type == GEOMAGNETIC_ATTITUDE_DATA_SET ) {
base_data_struct *return_values;
return_values = (base_data_struct *)struct_values;
return_values->data_accuracy = m_hdst;
return_values->values[0] = m_raw_x;
return_values->values[1] = m_raw_y;
return_values->values[2] = m_raw_z;
+ DBG("raw: %d, %d, %d\n", m_raw_x, m_raw_y, m_raw_z);
return 0;
return_values->values[0] = m_tesla_x;
return_values->values[1] = m_tesla_y;
return_values->values[2] = m_tesla_z;
+ DBG("tesla: %d, %d, %d\n", m_tesla_x, m_tesla_y, m_tesla_z);
return 0;
} else