Mercurial > public > ostc4
comparison Discovery/Src/simulation.c @ 307:b6436edfb2c0 cleanup-4
cleanup: factor out unused stopwatch code
Visually, this looks a bit of a dangerous cleanup, but its not :-)
To explain this cleanup: stopwatch_seconds is never used, so assign
to it is useless, and the variable can be removed. Now,
stopwatch_start_at_this_dive_time_seconds is not used any more, so
remove it as well. Now, look at the boolResetStopwatch code. It
is used but only to reset itself. This makes the whole stopwatch
block in data_exchange_main.c a useless thing. All the other
cleanup is trivial.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author | Jan Mulder <jlmulder@xs4all.nl> |
---|---|
date | Wed, 22 May 2019 22:22:15 +0200 |
parents | 43b44f8d4fb0 |
children | 1203255481e4 |
comparison
equal
deleted
inserted
replaced
306:2f43419102c8 | 307:b6436edfb2c0 |
---|---|
199 if(pDiveState->lifeData.counterSecondsShallowDepth) | 199 if(pDiveState->lifeData.counterSecondsShallowDepth) |
200 { | 200 { |
201 pDiveState->lifeData.dive_time_seconds = 0; | 201 pDiveState->lifeData.dive_time_seconds = 0; |
202 pDiveState->lifeData.max_depth_meter = 0; | 202 pDiveState->lifeData.max_depth_meter = 0; |
203 pDiveState->lifeData.boolResetAverageDepth = 1; | 203 pDiveState->lifeData.boolResetAverageDepth = 1; |
204 pDiveState->lifeData.boolResetStopwatch = 1; | |
205 } | 204 } |
206 } | 205 } |
207 | 206 |
208 /* average depth | 207 /* average depth |
209 */ | 208 */ |