From 0375b13c67cd67b2e794e5a81f8a5c17cc7844a4 Mon Sep 17 00:00:00 2001 From: "XI.CHEN" <2311041011@qq.com> Date: Wed, 26 Mar 2025 09:19:22 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E7=94=B5=E6=BA=90=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 1bfe1957..ef8b09fd 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -5008,6 +5008,7 @@ bool CPhoneDevice::CloseSensors(int sensortype, uint32_t delayedCloseTime) // GpioControl::TurnOff(CMD_SET_3V3_PWR_ENABLE); #ifndef USING_PTZ #else + GpioControl::TurnOff(CMD_SET_5V_PWR_ENABLE, delayedCloseTime); GpioControl::TurnOff(CMD_SET_PTZ_PWR_ENABLE, delayedCloseTime); #endif #endif From b381fa562fa400c1064284ee50eabc7f00ed4bf9 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 26 Mar 2025 12:47:05 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A9=AC=E8=BE=BE?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=9A=84=E6=8E=A7=E5=88=B6=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/GPIOControl.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/cpp/GPIOControl.h b/app/src/main/cpp/GPIOControl.h index 841281a8..e66304d2 100644 --- a/app/src/main/cpp/GPIOControl.h +++ b/app/src/main/cpp/GPIOControl.h @@ -102,6 +102,13 @@ #define CMD_SET_100M_RESET 526 #define CMD_GET_CAMERA_STATUS 310 + +#define CMD_SET_MADA_MOVE_STATUS 311 +#define CMD_SET_MADA_INIT_STATUS 312 +#define CMD_SET_MADA_CLOSE_STATUS 313 +#define CMD_SET_MADA_REG 314 +#define CMD_GET_MADA_REG 315 + #define CMD_SET_INIT_STATUS 401 #endif // USING_PTZ From 41208a587ce5173a69b18925498e1074f3039468 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 26 Mar 2025 12:48:14 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A9=AC=E8=BE=BE?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=9A=84=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/GPIOControl.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/cpp/GPIOControl.h b/app/src/main/cpp/GPIOControl.h index e66304d2..bb489cec 100644 --- a/app/src/main/cpp/GPIOControl.h +++ b/app/src/main/cpp/GPIOControl.h @@ -52,6 +52,11 @@ #endif #define CMD_GET_CAMERA_STATUS 310 +#define CMD_SET_MADA_INIT_STATUS 312 +#define CMD_SET_MADA_CLOSE_STATUS 313 +#define CMD_SET_MADA_REG 314 +#define CMD_GET_MADA_REG 315 + #define CMD_SET_INIT_STATUS 401 #else // defined(USING_PTZ) From 3a9b85c868a7630a630f7e39c819d47e01dc1c6d Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 26 Mar 2025 12:54:36 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A9=AC=E8=BE=BE?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=9A=84=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/GPIOControl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/cpp/GPIOControl.h b/app/src/main/cpp/GPIOControl.h index bb489cec..53ba319f 100644 --- a/app/src/main/cpp/GPIOControl.h +++ b/app/src/main/cpp/GPIOControl.h @@ -150,6 +150,8 @@ #define CMD_GET_CHARGING_BUS_VOLTAGE_STATE 112 #define CMD_GET_BAT_BUS_VOLTAGE_STATE 117 +#define CMD_SET_INIT_STATUS 0 // 401 + #endif // USING_N938 From 496a6fbdcefb5b22bf117f759d113282c7b9b332 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 26 Mar 2025 12:55:42 +0800 Subject: [PATCH 5/8] =?UTF-8?q?APP=E5=90=AF=E5=8A=A8=E6=97=B6=E9=87=8D?= =?UTF-8?q?=E7=BD=AE=E6=89=80=E6=9C=89=E7=94=B5=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index ef8b09fd..51827e47 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -507,6 +507,9 @@ CPhoneDevice::CPhoneDevice(JavaVM* vm, jobject service, const std::string& appPa m_collecting = false; localDelayTime = GetMicroTimeStamp(); + // Reset all powers + GpioControl::setInt(CMD_SET_INIT_STATUS, 1); + RegisterHandlerForSignal(SIGUSR2); LoadNetworkInfo(); From d8defe3b63b44582091154d61745f4e65f0334f2 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 26 Mar 2025 13:20:51 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E7=A7=BB=E9=99=A45V=E7=9A=84=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=EF=BC=88=E5=9B=BA=E4=BB=B6=E5=B1=82=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/GPIOControl.h | 4 ++-- app/src/main/cpp/PhoneDevice.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/cpp/GPIOControl.h b/app/src/main/cpp/GPIOControl.h index 53ba319f..615dfe2c 100644 --- a/app/src/main/cpp/GPIOControl.h +++ b/app/src/main/cpp/GPIOControl.h @@ -79,7 +79,7 @@ #define CMD_SET_485_ENABLE 512 #define CMD_SET_3V3_PWR_EN 516 -#define CMD_SET_5V_PWR_ENABLE 517 +// #define CMD_SET_5V_PWR_ENABLE 517 #define CMD_SET_SENSOR_ENABLE 504 #define CMD_SET_SENSOR_PWR_ENABLE 505 #define CMD_SET_SENSOR2_ENABLE 506 @@ -129,7 +129,7 @@ #define CMD_SET_485_EN3 304 #define CMD_SET_485_EN2 303 #define CMD_SET_SPI_POWER 129 -#define CMD_SET_5V_EN 363 +// #define CMD_SET_5V_EN 363 #define CMD_SDCARD_DETECT_EN 364 #define CMD_SET_PIC1_POWER 494 #define CMD_SET_OTHER_POWER 493 diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 51827e47..0d9cf9ce 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -4922,7 +4922,7 @@ bool CPhoneDevice::OpenSensors(int sensortype) #ifndef USING_N938 #ifndef USING_PTZ #else - GpioControl::TurnOn(CMD_SET_5V_PWR_ENABLE); + // GpioControl::TurnOn(CMD_SET_5V_PWR_ENABLE); GpioControl::TurnOn(CMD_SET_PTZ_PWR_ENABLE); #endif #else @@ -4995,7 +4995,7 @@ bool CPhoneDevice::CloseSensors(int sensortype, uint32_t delayedCloseTime) // GpioControl::TurnOff(CMD_SET_3V3_PWR_ENABLE); #ifndef USING_PTZ #else - GpioControl::TurnOffImmediately(CMD_SET_5V_PWR_ENABLE); + // GpioControl::TurnOffImmediately(CMD_SET_5V_PWR_ENABLE); GpioControl::TurnOffImmediately(CMD_SET_PTZ_PWR_ENABLE); #endif #endif @@ -5011,7 +5011,7 @@ bool CPhoneDevice::CloseSensors(int sensortype, uint32_t delayedCloseTime) // GpioControl::TurnOff(CMD_SET_3V3_PWR_ENABLE); #ifndef USING_PTZ #else - GpioControl::TurnOff(CMD_SET_5V_PWR_ENABLE, delayedCloseTime); + // GpioControl::TurnOff(CMD_SET_5V_PWR_ENABLE, delayedCloseTime); GpioControl::TurnOff(CMD_SET_PTZ_PWR_ENABLE, delayedCloseTime); #endif #endif From 89443efa26865bf6ebafe9f013cbe57e50cc12f9 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 26 Mar 2025 15:41:23 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 0d9cf9ce..23384de4 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -1248,27 +1248,27 @@ float CPhoneDevice::QueryBattaryVoltage(int timesForAvg, bool* isCharging) int totalVals = 0; float chargingBusVoltage = 0.0f; int idx = 0; - XYLOG(XYLOG_SEVERITY_INFO,"WorkStatus BusVoltage"); + XYLOG(XYLOG_SEVERITY_DEBUG, "WorkStatus BusVoltage"); for (idx = 0; idx < timesForAvg; idx++) { auto now = std::chrono::system_clock::now(); val = GpioControl::getChargingBusVoltage(); auto now2 = std::chrono::system_clock::now(); auto duration = std::chrono::duration_cast(now2 - now).count(); - XYLOG(XYLOG_SEVERITY_INFO,"WorkStatus BusVoltage val=%d, time=%lld", val, static_cast(duration)); + XYLOG(XYLOG_SEVERITY_DEBUG, "WorkStatus BusVoltage val=%d, time=%lld", val, static_cast(duration)); if (val > 1000) { chargingBusVoltage = (float)val / 1000.0; break; } } - XYLOG(XYLOG_SEVERITY_INFO,"WorkStatus BusVoltage end"); + XYLOG(XYLOG_SEVERITY_DEBUG, "WorkStatus BusVoltage end"); if (isCharging != NULL) { *isCharging = chargingBusVoltage > DEFAULT_WARNING_CHARGING_BUS_VOL; } - XYLOG(XYLOG_SEVERITY_INFO,"WorkStatus BatteryVoltage"); + XYLOG(XYLOG_SEVERITY_DEBUG, "WorkStatus BatteryVoltage"); int matched = 0; for (int idx = 0; idx < timesForAvg; idx++) { @@ -1276,14 +1276,14 @@ float CPhoneDevice::QueryBattaryVoltage(int timesForAvg, bool* isCharging) val = GpioControl::getBatteryVoltage(); // // BatVol auto now4 = std::chrono::system_clock::now(); auto duration = std::chrono::duration_cast(now4 - now3).count(); - XYLOG(XYLOG_SEVERITY_INFO,"WorkStatus BatteryVoltage val=%d, time=%lld", val, static_cast(duration)); + XYLOG(XYLOG_SEVERITY_DEBUG, "WorkStatus BatteryVoltage val=%d, time=%lld", val, static_cast(duration)); if (val > 0) { totalVals += val > BATTARY_VOLTAGE_MAX ? BATTARY_VOLTAGE_MAX : val; matched++; } } - XYLOG(XYLOG_SEVERITY_INFO,"WorkStatus BatteryVoltage end"); + XYLOG(XYLOG_SEVERITY_DEBUG, "WorkStatus BatteryVoltage end"); return (matched > 0) ? ((float)totalVals / 1000.0 / matched) : 0; } From b1071b52c55aeb71dd741c68eb87490c65b4fa8f Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 26 Mar 2025 16:08:40 +0800 Subject: [PATCH 8/8] Update version to 1.3.97 Based Core Version to 1.4.54 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index acb038bb..3db911d4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,7 +5,7 @@ plugins { // 10,00,000 major-minor-build def AppMajorVersion = 1 def AppMinorVersion = 3 -def AppBuildNumber = 96 +def AppBuildNumber = 97 def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber