diff --git a/CMakeLists.txt b/CMakeLists.txt index ebbdf68..48041b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,7 @@ message("ARCH: ${ARCH}") if(${ARCH} STREQUAL "amd64") add_definitions(-DBUILD_ON_PC) endif() +message("ARCH: ${ARCH}") file( GLOB_RECURSE diff --git a/appsrc/service/debug_page_test_service.cpp b/appsrc/service/debug_page_test_service.cpp index 4defdf0..e6e8e1a 100644 --- a/appsrc/service/debug_page_test_service.cpp +++ b/appsrc/service/debug_page_test_service.cpp @@ -1,6 +1,8 @@ #include "debug_page_test_service.hpp" using namespace iflytop; void DebugPageTestService::initialize() { + REG_EXTFN(test_int, int(json), param0); + REG_EXTFN(test_int, int(SettingId), param0); REG_EXTFN(test_int, int(int), param0); REG_EXTFN(test_string, void(string), param0); REG_EXTFN(test_float, void(float), param0); @@ -11,9 +13,10 @@ void DebugPageTestService::initialize() { REG_EXTFN(test_vector_double, void(vector), param0); REG_EXTFN(test_vecto_json, void(vector), param0); REG_EXTFN(test_vecto_bool, void(vector), param0); - REG_EXTFN(test_vecto_enum, void(SettingId), param0); + // REG_EXTFN(test_vecto_enum, void(vector), param0); } - +void DebugPageTestService::test_json(shared_ptr cxt, json param0) {} +void DebugPageTestService::test_enum(shared_ptr cxt, SettingId param0) {} void DebugPageTestService::test_int(shared_ptr cxt, int param0) {} void DebugPageTestService::test_string(shared_ptr cxt, string param0) {} void DebugPageTestService::test_float(shared_ptr cxt, float param0) {} @@ -24,4 +27,4 @@ void DebugPageTestService::test_vector_string(shared_ptr cxt, void DebugPageTestService::test_vector_double(shared_ptr cxt, vector param0) {} void DebugPageTestService::test_vecto_json(shared_ptr cxt, vector param0) {} void DebugPageTestService::test_vecto_bool(shared_ptr cxt, vector param0) {} -void DebugPageTestService::test_vecto_enum(shared_ptr cxt, SettingId param0) {} \ No newline at end of file +void DebugPageTestService::test_vecto_enum(shared_ptr cxt, vector param0) {} \ No newline at end of file diff --git a/appsrc/service/debug_page_test_service.hpp b/appsrc/service/debug_page_test_service.hpp index 3fd3982..29715b7 100644 --- a/appsrc/service/debug_page_test_service.hpp +++ b/appsrc/service/debug_page_test_service.hpp @@ -18,6 +18,8 @@ class DebugPageTestService : public enable_shared_from_this cxt, json param0); + void test_enum(shared_ptr cxt, SettingId param0); void test_int(shared_ptr cxt, int param0); void test_string(shared_ptr cxt, string param0); void test_float(shared_ptr cxt, float param0); @@ -28,8 +30,7 @@ class DebugPageTestService : public enable_shared_from_this cxt, vector param0); void test_vecto_json(shared_ptr cxt, vector param0); void test_vecto_bool(shared_ptr cxt, vector param0); - void test_vecto_enum(shared_ptr cxt, SettingId param0); - + void test_vecto_enum(shared_ptr cxt, vector param0); }; } // namespace iflytop diff --git a/html/debug/index.html b/html/debug/index.html index c15ab70..18ee507 100644 --- a/html/debug/index.html +++ b/html/debug/index.html @@ -4,6 +4,7 @@ TMP + @@ -39,7 +40,7 @@
- DoIt + 执行
@@ -51,7 +52,7 @@
- CLEAR + Clear
@@ -164,7 +165,16 @@ let type = item.paramsTypeInfo[i]; let value = item.values[param]; switch (type) { - case 'int32_t': value *= 1; break; + case 'json': + case 'vector': + case 'vector': + case 'vector': + case 'vector': + case 'vector': value = JSON.parse(value); break; + case 'bool': value = '1' === value ? true : false; break; + case 'float': + case 'double': + case 'int': value *= 1; break; case 'string': /* nothing to do here */ break; default: /* throw an exception is required. */ }