diff --git a/emBODY/eBcode/arch-arm/board/ems004/appl/v2/cfg/eoemsappl/EOMtheEMSapplCfg_cfg.h b/emBODY/eBcode/arch-arm/board/ems004/appl/v2/cfg/eoemsappl/EOMtheEMSapplCfg_cfg.h index 5ab881d0c..6465019c0 100644 --- a/emBODY/eBcode/arch-arm/board/ems004/appl/v2/cfg/eoemsappl/EOMtheEMSapplCfg_cfg.h +++ b/emBODY/eBcode/arch-arm/board/ems004/appl/v2/cfg/eoemsappl/EOMtheEMSapplCfg_cfg.h @@ -81,7 +81,7 @@ extern "C" { #define EOMTHEEMSAPPLCFG_VERSION_MAJOR (VERSION_MAJOR_OFFSET+3) // minor <0-255> // minor <0-255> -#define EOMTHEEMSAPPLCFG_VERSION_MINOR 83 +#define EOMTHEEMSAPPLCFG_VERSION_MINOR 97 // version diff --git a/emBODY/eBcode/arch-arm/board/ems004/appl/v2/src/eoappservices/embot_app_eth_theBATservice.cpp b/emBODY/eBcode/arch-arm/board/ems004/appl/v2/src/eoappservices/embot_app_eth_theBATservice.cpp index ef6fd13f3..b2772d535 100644 --- a/emBODY/eBcode/arch-arm/board/ems004/appl/v2/src/eoappservices/embot_app_eth_theBATservice.cpp +++ b/emBODY/eBcode/arch-arm/board/ems004/appl/v2/src/eoappservices/embot_app_eth_theBATservice.cpp @@ -90,7 +90,7 @@ struct embot::app::eth::theBATservice::Impl { CANmonitor canmonitor{}; static constexpr CANmonitor::Config defaultcanmonitorconfig{ {}, // the map is left empty - 300 * embot::core::time1millisec, + 200 * embot::core::time1millisec, CANmonitor::Report::ALL, 10 * embot::core::time1second, s_eobj_ownname, @@ -474,8 +474,11 @@ eOresult_t embot::app::eth::theBATservice::Impl::Start() { CANmonitor::Config cfg = defaultcanmonitorconfig; // use ... cfg.target.clear(); - //cfg.periodofcheck = embot::core::time1millisec * service.servconfig.data.as.battery.canmonitorconfig.periodofcheck; - cfg.periodofcheck = embot::core::time1millisec * (uint8_t)300; + // check if we are not using custom value > 100 for service.servconfig.data.as.battery.canmonitorconfig.periodofcheck + // if not we are setting it to 250 in order to not having error when canmonitor checks for BAT frames + if(service.servconfig.data.as.battery.canmonitorconfig.periodofcheck == 0) + service.servconfig.data.as.battery.canmonitorconfig.periodofcheck = 250; + cfg.periodofcheck = embot::core::time1millisec * service.servconfig.data.as.battery.canmonitorconfig.periodofcheck; cfg.periodofreport = embot::core::time1millisec * service.servconfig.data.as.battery.canmonitorconfig.periodofreport; cfg.reportmode = static_cast(service.servconfig.data.as.battery.canmonitorconfig.reportmode); canmonitor.configure(cfg);