diff --git a/Projects/la_mojo/build b/Projects/la_mojo/build index 8c1e4e77..2eb8ed96 100755 --- a/Projects/la_mojo/build +++ b/Projects/la_mojo/build @@ -4,11 +4,11 @@ #make clean -e "CFG=Debug" #make -e "CFG=Debug" -j$(nproc) -#make clean -e "CFG=LRF_Proxy_ONLY" -#make -e "CFG=LRF_Proxy_ONLY" -j$(nproc) +make clean -e "CFG=LRF_Proxy_ONLY" +make -e "CFG=LRF_Proxy_ONLY" -j$(nproc) -make clean -e "CFG=Debug86" -make -e "CFG=Debug86" -j$(nproc) +#make clean -e "CFG=Debug86" +#make -e "CFG=Debug86" -j$(nproc) #cd Debug86 #strip ./mojo_d #cd .. diff --git a/lib/App/common/kernelModuleBosch.cpp b/lib/App/common/kernelModuleBosch.cpp index eb040812..69d47a1c 100644 --- a/lib/App/common/kernelModuleBosch.cpp +++ b/lib/App/common/kernelModuleBosch.cpp @@ -14,6 +14,10 @@ #define LOG_ERROR(X) kernelModule::m_pLog->Log("MOD_BVMS", this, _LOG_ERROR, X); #endif + +const CSTR bmvs_zones[] = { "C2", "C3", "D1", "D2", "E1", "E2", "E3", "F1", "F2", "G1", "G2", "G3", "H1", "H2", "C1", "B2", "B1", "A3", "A2", "A1", "" }; +const uint8_t bmvs_zones_count = 20; + kernelModuleBosch::kernelModuleBosch(uint32_t ModuleID) : kernelModule(ModuleID, KERNEL_MODULE_BOSCH_REST){ m_pCURL = NULL; @@ -181,13 +185,17 @@ bool kernelModuleBosch::buildTargetEventMsg( CSTR Buffer, float az, float range, tm gmtt; tm * gmt_time = &gmtt; if( gmtime_r( &LocalTime, &gmtt ) == NULL) return false; - - sprintf( tTS, "%04d-%02d-%02d %02d:%02d:%02d", 1900 + gmt_time->tm_year, 1 + gmt_time->tm_mon, gmt_time->tm_mday, gmt_time->tm_hour, gmt_time->tm_min, gmt_time->tm_sec ); - sprintf( Buffer, "{\"externalAlarmId\":%d,\"data\":[%0.2f,%0.1f,%0.12f,%0.12f,%0.3f,10,\"%s\",\"\",\"%s\",\"Detection Event\"]}", + CSTR pp = strstr( src_Name, "_" ); + uint8_t zid = bmvs_zones_count; + if( pp!= NULL ) zid = atoi( pp+1 )-1; + if ( zid > bmvs_zones_count ) zid = bmvs_zones_count; + sprintf(tTS, "%04d-%02d-%02d %02d:%02d:%02d", 1900 + gmt_time->tm_year, 1 + gmt_time->tm_mon, gmt_time->tm_mday, gmt_time->tm_hour, gmt_time->tm_min, gmt_time->tm_sec); + sprintf( Buffer, "{\"externalAlarmId\":%d,\"data\":[%0.2f,%0.1f,%0.12f,%0.12f,%0.3f,10,\"%s\",\"%s\",\"%s\",\"Detection Event\"]}", m_sRestSettings.detection_src, az, range, lat, lon, alt, src_Name, + bmvs_zones[zid], tTS ); return true;