From 06bbab8cc6d450c15d1c075cbaa866ecd582d3c8 Mon Sep 17 00:00:00 2001 From: HyungKyu Song Date: Thu, 14 Feb 2013 22:08:21 +0900 Subject: [PATCH] Tizen 2.0 Release --- AUTHORS | 13 +++++- CMakeLists.txt | 2 +- debian/changelog | 80 ++++++++++------------------------- debian/control | 4 +- debian/copyright | 20 --------- include/cgeo_sim.h | 8 +++- packaging/sf-plugin-geo-emul.manifest | 5 +++ packaging/sf-plugin-geo-emul.spec | 46 ++++++++++++++++++++ src/cgeo_sim.cpp | 30 +++++++++++-- 9 files changed, 119 insertions(+), 89 deletions(-) create mode 100644 packaging/sf-plugin-geo-emul.manifest create mode 100644 packaging/sf-plugin-geo-emul.spec diff --git a/AUTHORS b/AUTHORS index 8acdf13..1722483 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,3 +1,12 @@ -DongKyun Yun -Sungmin Ha +YeongKyoon Lee +DaiYoung Kim +SeokYeon Hwang +SangJin Kim +KiTae Kim +JinHyung Jo +SungMin Ha +MunKyu Im +JiHye Kim +GiWoong Kim +SooYoung Ha HyunGoo Kang diff --git a/CMakeLists.txt b/CMakeLists.txt index 56a273d..612e46a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ MESSAGE("add -DTARGET") #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 diff --git a/debian/changelog b/debian/changelog index a78ac19..748c1bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,73 +1,37 @@ -sf-plugin-geo-emul (0.2.3) unstable; urgency=low - - * add description in control file for server import - - -- Sungmin Ha Sat, 18 Feb 2012 13:06:52 +0900 - -sf-plugin-geo-emul (0.2.2) unstable; urgency=low - - * modified for build only i386 - - -- Sungmin Ha Sat, 18 Feb 2012 13:06:52 +0900 - -sf-plugin-geo-emul (0.2.1) unstable; urgency=low - - -- Sungmin Ha Fri, 10 Feb 2012 14:00:00 +0900 - -sf-plugin-geo-sim (0.1.2-2) unstable; urgency=low - - * some prevent-checking-bug fix (CID 14032 , 14031) - * Git:165.213.180.234:/git/slp/pkgs/sf-plugin-geo-sim - * Tag:sf-plugin-geo-sim_0.1.2-2 +sf-plugin-geo-emul (0.2.5) unstable; urgency=low - -- Yong-sul Oh Wed, 15 Sep 2010 18:35:26 +0900 + * modified for prevent from unexpectedly stop + * Git: slp/pkgs/e/emulator-plugin-geo + * Tag: sf-plugin-geo-emul_0.2.5 -sf-plugin-geo-sim (0.1.2-1) unstable; urgency=low + -- Sungmin Ha Thu, 12 Jul 2012 15:22:00 +0900 - * change get_struct_value() & get_property() - * Git:165.213.180.234:/git/slp2.0/slp2.0-pkgs/sf-plugin-geo-sim-0 - * Tag:sf-plugin-geo-sim_0.1.2-1 +sf-plugin-geo-emul (0.2.4) unstable; urgency=low - -- Yong-sul Oh Tue, 15 Jun 2010 09:58:48 +0900 + * modified for OSP support + * Git: slp/pkgs/e/emulator-plugin-geo + * Tag: sf-plugin-geo-emul_0.2.4 -sf-plugin-geo-sim (0.1.1-1) unstable; urgency=low + -- Sungmin Ha Fri, 15 Jun 2012 18:48:00 +0900 - * change for new libslp-sensor APIs - * Git:165.213.180.234:/git/slp2.0/slp2.0-pkgs/sf-plugin-geo-sim-0 - * Tag:sf-plugin-geo-sim_0.1.1-1 - - -- Yong-sul Oh Mon, 31 May 2010 01:17:56 +0900 - -sf-plugin-geo-sim (0.0.4-2) unstable; urgency=low - - * DAC rule changed - * Git:165.213.180.234:/git/slp2.0/slp2.0-pkgs/sf-plugin-geo-sim-0 - * Tag:sf-plugin-geo-sim_0.0.4-2 - - -- Yong-sul Oh Mon, 10 May 2010 21:01:46 +0900 - -sf-plugin-geo-sim (0.0.4-1) unstable; urgency=low - - * add {pkg_name}.postinst.in for permission control & add free() codes when it's class constructor returned with error - * Git:165.213.180.234:/git/slp2.0/slp2.0-pkgs/sf-plugin-geo-sim-0 - * Tag:sf-plugin-geo-sim_0.0.4-1 - - -- Yong-sul Oh Tue, 20 Apr 2010 13:10:18 +0900 - -sf-plugin-geo-sim (0.0.3-1) unstable; urgency=low +sf-plugin-geo-emul (0.2.3) unstable; urgency=low - * add real-device checking routine ( return NULL when a real-device does not exist ) + * modified for support updated libslp-sensor + * Git: slp/pkgs/e/emulator-plugin-geo + * Tag: sf-plugin-geo-emul_0.2.3 - -- Yong-sul Oh Thu, 01 Apr 2010 10:34:58 +0900 + -- Jihye kim Fri, 6 Apr 2012 20:00:00 +0900 -sf-plugin-geo-sim (0.0.2-1) unstable; urgency=low +sf-plugin-geo-emul (0.2.2) unstable; urgency=low - * double-execute updating bug-fix & toolchain upgrade + * Update changelog version. + * Git: slp/pkgs/e/emulator-plugin-geo + * Tag: sf-plugin-geo-emul_0.2.2 - -- Yong-sul Oh Fri, 19 Mar 2010 14:29:05 +0900 + -- Kitae kim Thu, 27 Mar 2012 20:00:00 +0900 -sf-plugin-geo-sim (0.0.1-1) unstable; urgency=low +sf-plugin-geo-emul (0.2.1) unstable; urgency=low * Initial Release. - -- Yong-sul Oh Thu, 18 Feb 2010 12:31:00 +0900 + -- Sungmin Ha Thu, 15 Mar 2012 17:00:00 +0900 diff --git a/debian/control b/debian/control index b88a897..128834f 100644 --- a/debian/control +++ b/debian/control @@ -1,9 +1,9 @@ Source: sf-plugin-geo-emul Section: misc Priority: extra -Maintainer: Sungmin ha +Maintainer: Sungmin ha ,Jihye Kim ,Yeongkyoon Lee Build-Depends: libsf-common-dev -Standards-Version: 0.2.1 +Standards-Version: 0.2.5 Package: sf-plugin-geo-emul Section: misc diff --git a/debian/copyright b/debian/copyright index 9ca867f..8b13789 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,21 +1 @@ -This is sf-plugin-gp2ap002ambi, written and maintained by Yongsul Oh -on Mon, 30 Nov 2009 16:09:50 +0900. -The original source can always be found at: - ftp://slp.samsung.net/dists/unstable/main/source/ - -Copyright Holder: $NAME - -License: - samsung - -/* - * Copyright (c) 2008 Samsung Electronics, Inc. - * All rights reserved. - * - * This software is a confidential and proprietary information - * of Samsung Electronics, Inc. ("Confidential Information"). You - * shall not disclose such Confidential Information and shall use - * it only in accordance with the terms of the license agreement - * you entered into with Samsung Electronics. - */ diff --git a/include/cgeo_sim.h b/include/cgeo_sim.h index 7ee3247..76cf2cf 100644 --- a/include/cgeo_sim.h +++ b/include/cgeo_sim.h @@ -3,7 +3,9 @@ * * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. * - * Contact: Sungmin Ha + * Contact: + * SooYoung Ha + * Sungmin Ha * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the @@ -26,7 +28,9 @@ class cgeo_sim : public csensor_module 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, }; diff --git a/packaging/sf-plugin-geo-emul.manifest b/packaging/sf-plugin-geo-emul.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/sf-plugin-geo-emul.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/sf-plugin-geo-emul.spec b/packaging/sf-plugin-geo-emul.spec new file mode 100644 index 0000000..2e505da --- /dev/null +++ b/packaging/sf-plugin-geo-emul.spec @@ -0,0 +1,46 @@ +#git:/slp/pkgs/e/emulator-plugin-geo +Name: sf-plugin-geo-emul +Version: 0.2.6 +Release: 1 +Summary: ambient Plugin for sensor framework +Group: System Environment/Libraries +License: GNUv2 +Source0: %{name}-%{version}.tar.gz +Source1001: packaging/sf-plugin-geo-emul.manifest +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 diff --git a/src/cgeo_sim.cpp b/src/cgeo_sim.cpp index fef04b4..3bed3b7 100644 --- a/src/cgeo_sim.cpp +++ b/src/cgeo_sim.cpp @@ -4,6 +4,7 @@ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: + * SooYoung Ha * Sungmin Ha * DongKyun Yun * @@ -52,7 +53,8 @@ #include - +#define SENSOR_NAME "Emul_ModelId_Magnetic" +#define SENSOR_VENDOR "Emul_Vendor" const char *cgeo_sim::m_port[] = {"raw","tesla"}; @@ -135,7 +137,7 @@ bool cgeo_sim::update_value(void) if (fscanf(fp, "%d %d %d %d", &raw_x, &raw_y, &raw_z, &hdst) != 4) { fclose(fp); - return false; + return true; } fclose(fp); @@ -147,7 +149,7 @@ bool cgeo_sim::update_value(void) if (fscanf(fp2, "%d %d %d", &tesla_x, &tesla_y, &tesla_z) != 3) { fclose(fp2); - return false; + return true; } fclose(fp2); @@ -466,7 +468,27 @@ long cgeo_sim::set_cmd(int type , int property , long input_value) 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 = -2000; + return_property->sensor_max_range = 2000; + 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) -- 2.7.4