upload tizen1.0 source
authorKim Kibum <kb0929.kim@samsung.com>
Sun, 29 Apr 2012 08:00:26 +0000 (17:00 +0900)
committerKim Kibum <kb0929.kim@samsung.com>
Sun, 29 Apr 2012 08:00:26 +0000 (17:00 +0900)
CMakeLists.txt
debian/changelog
debian/control
include/geo_sim_processor.h
packaging/sf-plugin-proc-geo-emul.spec [new file with mode: 0644]
src/geo_sim_processor.cpp

index f9ab3f6..a8c9aab 100644 (file)
@@ -20,7 +20,7 @@ ADD_DEFINITIONS("-DTARGET")
 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
index 494cfbf..12b3897 100644 (file)
@@ -1,3 +1,15 @@
+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
index e964577..c7fc4df 100644 (file)
@@ -3,7 +3,7 @@ Section: misc
 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
index 1d1bce0..c49dbf3 100644 (file)
@@ -28,13 +28,14 @@ public:
 
        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 {
diff --git a/packaging/sf-plugin-proc-geo-emul.spec b/packaging/sf-plugin-proc-geo-emul.spec
new file mode 100644 (file)
index 0000000..e4e2923
--- /dev/null
@@ -0,0 +1,50 @@
+#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
index a7d39e5..3b73e72 100644 (file)
@@ -607,16 +607,13 @@ bool geo_sim_processor::check_callback_event(cmd_reg_t *param)
 
 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;
        }
 
@@ -632,7 +629,7 @@ int geo_sim_processor::get_struct_value(unsigned int struct_type , void *struct_
        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;
@@ -642,6 +639,7 @@ int geo_sim_processor::get_struct_value(unsigned int struct_type , void *struct_
                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;
 
@@ -655,6 +653,7 @@ int geo_sim_processor::get_struct_value(unsigned int struct_type , void *struct_
                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