Tegra detector fixed;

Some aditional logs added;
AndroidManifest version incremented.
This commit is contained in:
Alexander Smorkalov 2012-07-12 13:12:16 +00:00
parent 69296c3333
commit 76fdbeee8a
4 changed files with 11 additions and 8 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.opencv.engine" package="org.opencv.engine"
android:versionCode="11" android:versionCode="12"
android:versionName="1.1" > android:versionName="1.2" >
<uses-sdk android:minSdkVersion="8" /> <uses-sdk android:minSdkVersion="8" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/> <uses-feature android:name="android.hardware.touchscreen" android:required="false"/>

View File

@ -156,7 +156,6 @@ int GetProcessorCount()
int DetectKnownPlatforms() int DetectKnownPlatforms()
{ {
#ifdef __SUPPORT_TEGRA3
int tegra_status = DetectTegra(); int tegra_status = DetectTegra();
if (3 == tegra_status) if (3 == tegra_status)
@ -167,9 +166,6 @@ int DetectKnownPlatforms()
{ {
return PLATFORM_UNKNOWN; return PLATFORM_UNKNOWN;
} }
#else
return PLATFORM_UNKNOWN;
#endif
// NOTE: Uncomment when all Tegras will be supported // NOTE: Uncomment when all Tegras will be supported
/*if (tegra_status > 0) /*if (tegra_status > 0)

View File

@ -91,10 +91,11 @@ string CommonPackageManager::GetPackagePathByVersion(const std::string& version,
group = CommonPackageManager::IntelRating; group = CommonPackageManager::IntelRating;
int HardwareRating = GetHardwareRating(platform, cpu_id, group); int HardwareRating = GetHardwareRating(platform, cpu_id, group);
LOGD("Current hardware platform %d, %d", platform, cpu_id);
if (-1 == HardwareRating) if (-1 == HardwareRating)
{ {
LOGE("Cannot calculate rating for current hardware platfrom!"); LOGE("Cannot calculate rating for current hardware platform!");
} }
else else
{ {
@ -115,6 +116,10 @@ string CommonPackageManager::GetPackagePathByVersion(const std::string& version,
{ {
result = found->GetInstalationPath(); result = found->GetInstalationPath();
} }
else
{
LOGI("Found package is incompatible with current hardware platform");
}
} }
} }
} }
@ -162,8 +167,10 @@ std::vector<std::pair<int, int> > CommonPackageManager::InitArmRating()
result.push_back(std::pair<int, int>(PLATFORM_UNKNOWN, ARCH_ARMv6)); result.push_back(std::pair<int, int>(PLATFORM_UNKNOWN, ARCH_ARMv6));
result.push_back(std::pair<int, int>(PLATFORM_UNKNOWN, ARCH_ARMv6 | FEATURES_HAS_VFPv3d16)); result.push_back(std::pair<int, int>(PLATFORM_UNKNOWN, ARCH_ARMv6 | FEATURES_HAS_VFPv3d16));
result.push_back(std::pair<int, int>(PLATFORM_UNKNOWN, ARCH_ARMv6 | FEATURES_HAS_VFPv3)); result.push_back(std::pair<int, int>(PLATFORM_UNKNOWN, ARCH_ARMv6 | FEATURES_HAS_VFPv3));
result.push_back(std::pair<int, int>(PLATFORM_UNKNOWN, ARCH_ARMv6 | FEATURES_HAS_VFPv3 | FEATURES_HAS_VFPv3d16));
result.push_back(std::pair<int, int>(PLATFORM_UNKNOWN, ARCH_ARMv7)); result.push_back(std::pair<int, int>(PLATFORM_UNKNOWN, ARCH_ARMv7));
result.push_back(std::pair<int, int>(PLATFORM_UNKNOWN, ARCH_ARMv7 | FEATURES_HAS_VFPv3)); result.push_back(std::pair<int, int>(PLATFORM_UNKNOWN, ARCH_ARMv7 | FEATURES_HAS_VFPv3));
result.push_back(std::pair<int, int>(PLATFORM_UNKNOWN, ARCH_ARMv7 | FEATURES_HAS_NEON));
result.push_back(std::pair<int, int>(PLATFORM_UNKNOWN, ARCH_ARMv7 | FEATURES_HAS_VFPv3 | FEATURES_HAS_NEON)); result.push_back(std::pair<int, int>(PLATFORM_UNKNOWN, ARCH_ARMv7 | FEATURES_HAS_VFPv3 | FEATURES_HAS_NEON));
result.push_back(std::pair<int, int>(PLATFORM_TEGRA2, ARCH_ARMv7 | FEATURES_HAS_VFPv3)); result.push_back(std::pair<int, int>(PLATFORM_TEGRA2, ARCH_ARMv7 | FEATURES_HAS_VFPv3));
result.push_back(std::pair<int, int>(PLATFORM_TEGRA3, ARCH_ARMv7 | FEATURES_HAS_VFPv3 | FEATURES_HAS_NEON)); result.push_back(std::pair<int, int>(PLATFORM_TEGRA3, ARCH_ARMv7 | FEATURES_HAS_VFPv3 | FEATURES_HAS_NEON));

View File

@ -3,7 +3,7 @@
// Global tag for Logcat output // Global tag for Logcat output
#undef LOG_TAG #undef LOG_TAG
#define LOG_TAG "OpenCVEngine" #define LOG_TAG "OpenCVEngine"
#ifndef OPEN_CV_ENGINE_VERSION #ifndef OPEN_CV_ENGINE_VERSION
#define OPEN_CV_ENGINE_VERSION 1 #define OPEN_CV_ENGINE_VERSION 1