mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
Add limits to cylinder maximum pressures on DM5 import
DM5 seems to have occasionally bogus data for cylinder start and end pressures. Need to validate that. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
56f6df4cd8
commit
5632c0b357
1 changed files with 2 additions and 2 deletions
|
@ -2220,11 +2220,11 @@ extern int dm5_dive(void *param, int columns, char **data, char **column)
|
|||
* TODO: handle multiple cylinders
|
||||
*/
|
||||
cylinder_start();
|
||||
if (data[22] && atoi(data[22]) > 0)
|
||||
if (data[22] && atoi(data[22]) > 0 && atoi(data[22]) < 350000)
|
||||
cur_dive->cylinder[cur_cylinder_index].start.mbar = atoi(data[22]);
|
||||
else if (data[10] && atoi(data[10]) > 0)
|
||||
cur_dive->cylinder[cur_cylinder_index].start.mbar = atoi(data[10]);
|
||||
if (data[23] && atoi(data[23]) > 0)
|
||||
if (data[23] && atoi(data[23]) > 0 && atoi(data[23]) < 350000)
|
||||
cur_dive->cylinder[cur_cylinder_index].end.mbar = (atoi(data[23]));
|
||||
if (data[11] && atoi(data[11]) > 0)
|
||||
cur_dive->cylinder[cur_cylinder_index].end.mbar = (atoi(data[11]));
|
||||
|
|
Loading…
Reference in a new issue