Mercurial > public > ostc4
comparison Small_CPU/Src/baseCPU2.c @ 339:37f45300bc2e PressureMeasure_Improvment
Apply averaging to pressure measurement: In pre versions calculated pressure value jittered +/-10hPa. Since we measure the pressure several time a second but only use one value a second, calc average including not used values
Activated pressure / temperature offsets: The functionality to store offsets was already present in the firmware but values have not been apllied in the RTE => added functionality to include offsets in calculation
Set Max possible surface pressure to 1070hPa (Black sea level)
author | ideenmodellierer |
---|---|
date | Sat, 17 Aug 2019 19:03:47 +0200 |
parents | 143fe85f82a2 |
children | 591c03a1e68d |
comparison
equal
deleted
inserted
replaced
338:b6a59e93cc91 | 339:37f45300bc2e |
---|---|
332 global.dataSendToMaster.sensorErrors = | 332 global.dataSendToMaster.sensorErrors = |
333 global.sensorError[SENSOR_PRESSURE_ID]; | 333 global.sensorError[SENSOR_PRESSURE_ID]; |
334 | 334 |
335 if(is_init_pressure_done()) | 335 if(is_init_pressure_done()) |
336 { | 336 { |
337 init_surface_ring(); | 337 init_surface_ring(0); |
338 } | 338 } |
339 init_battery_gas_gauge(); | 339 init_battery_gas_gauge(); |
340 HAL_Delay(10); | 340 HAL_Delay(10); |
341 battery_gas_gauge_get_data(); | 341 battery_gas_gauge_get_data(); |
342 // battery_gas_gauge_set(0); | 342 // battery_gas_gauge_set(0); |
361 ADCx_Init(); | 361 ADCx_Init(); |
362 GPIO_Power_MainCPU_Init(); | 362 GPIO_Power_MainCPU_Init(); |
363 global.mode = MODE_POWERUP; | 363 global.mode = MODE_POWERUP; |
364 #else | 364 #else |
365 init_pressure(); | 365 init_pressure(); |
366 init_surface_ring(); | 366 init_surface_ring(0); |
367 | 367 |
368 ADCx_Init(); | 368 ADCx_Init(); |
369 GPIO_Power_MainCPU_Init(); | 369 GPIO_Power_MainCPU_Init(); |
370 global.mode = MODE_TEST; | 370 global.mode = MODE_TEST; |
371 #endif | 371 #endif |