mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Use more of our propper types in the planner
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8e5eb71e0b
commit
9eeeba468a
3 changed files with 12 additions and 11 deletions
|
@ -105,7 +105,7 @@ void DivePlannerPointsModel::setupStartTime()
|
|||
void DivePlannerPointsModel::loadFromDive(dive *d)
|
||||
{
|
||||
CylindersModel::instance()->updateDive();
|
||||
int lasttime = 0;
|
||||
duration_t lasttime = {};
|
||||
// we start with the first gas and see if it was changed
|
||||
struct gasmix gas = d->cylinder[0].gasmix;
|
||||
for (int i = 0; i < d->dc.samples - 1; i++) {
|
||||
|
@ -114,7 +114,7 @@ void DivePlannerPointsModel::loadFromDive(dive *d)
|
|||
continue;
|
||||
get_gas_from_events(&d->dc, lasttime, &gas);
|
||||
plannerModel->addStop(s.depth.mm, s.time.seconds, &gas, 0, true);
|
||||
lasttime = s.time.seconds;
|
||||
lasttime = s.time;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue