add test AHT30

This commit is contained in:
pvvx 2024-01-16 19:00:58 +03:00
parent 1091013c1f
commit 1a15f7b3a0
6 changed files with 149 additions and 67 deletions

View file

@ -75,12 +75,12 @@ void test_config(void) {
void load_eep_config(void) {
if(!flash_supported_eep_ver(0, APP_VERSION)) {
osal_memcpy(&cfg, &def_cfg, sizeof(cfg));
osal_memcpy(&thsensor_cfg.coef, &def_thcoef, sizeof(thsensor_cfg.coef));
} else {
if (flash_read_cfg(&cfg, EEP_ID_CFG, sizeof(cfg)) != sizeof(cfg))
osal_memcpy(&cfg, &def_cfg, sizeof(cfg));
if (flash_read_cfg(&thsensor_cfg.coef, EEP_ID_CFS, sizeof(thsensor_cfg.coef)) != sizeof(thsensor_cfg.coef))
osal_memcpy(&thsensor_cfg.coef, &def_thcoef, sizeof(thsensor_cfg.coef));
if(flash_read_cfg(&thsensor_cfg.coef, EEP_ID_CFS, sizeof(thsensor_cfg.coef)) != sizeof(thsensor_cfg.coef)) {
osal_memset(&thsensor_cfg.coef, 0, sizeof(thsensor_cfg.coef));
}
}
test_config();
}