mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Cleanup: durations are now signed
Somehow a whitespace fix snuck in here. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									648fec7a3d
								
							
						
					
					
						commit
						6b80b41c7c
					
				
					 4 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
					@ -389,7 +389,7 @@ void populate_pressure_information(struct dive *dive, struct divecomputer *dc, s
 | 
				
			||||||
	for (int i = first; i <= last; i++) {
 | 
						for (int i = first; i <= last; i++) {
 | 
				
			||||||
		struct plot_data *entry = pi->entry + i;
 | 
							struct plot_data *entry = pi->entry + i;
 | 
				
			||||||
		unsigned pressure = SENSOR_PRESSURE(entry, sensor);
 | 
							unsigned pressure = SENSOR_PRESSURE(entry, sensor);
 | 
				
			||||||
		unsigned int time = entry->sec;
 | 
							int time = entry->sec;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		while (ev && ev->time.seconds <= time) {
 | 
							while (ev && ev->time.seconds <= time) {
 | 
				
			||||||
			cyl = get_cylinder_index(dive, ev);
 | 
								cyl = get_cylinder_index(dive, ev);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -160,7 +160,7 @@ extern int dm4_dive(void *param, int columns, char **data, char **column)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	(void) columns;
 | 
						(void) columns;
 | 
				
			||||||
	(void) column;
 | 
						(void) column;
 | 
				
			||||||
	unsigned int i;
 | 
						int i;
 | 
				
			||||||
	int interval, retval = 0;
 | 
						int interval, retval = 0;
 | 
				
			||||||
	sqlite3 *handle = (sqlite3 *)param;
 | 
						sqlite3 *handle = (sqlite3 *)param;
 | 
				
			||||||
	float *profileBlob;
 | 
						float *profileBlob;
 | 
				
			||||||
| 
						 | 
					@ -363,7 +363,7 @@ extern int dm5_dive(void *param, int columns, char **data, char **column)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	(void) columns;
 | 
						(void) columns;
 | 
				
			||||||
	(void) column;
 | 
						(void) column;
 | 
				
			||||||
	unsigned int i;
 | 
						int i;
 | 
				
			||||||
	int interval, retval = 0, block_size;
 | 
						int interval, retval = 0, block_size;
 | 
				
			||||||
	sqlite3 *handle = (sqlite3 *)param;
 | 
						sqlite3 *handle = (sqlite3 *)param;
 | 
				
			||||||
	unsigned const char *sampleBlob;
 | 
						unsigned const char *sampleBlob;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -116,7 +116,7 @@ int get_gasidx(struct dive *dive, struct gasmix *mix)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void interpolate_transition(struct deco_state *ds, struct dive *dive, duration_t t0, duration_t t1, depth_t d0, depth_t d1, const struct gasmix *gasmix, o2pressure_t po2)
 | 
					void interpolate_transition(struct deco_state *ds, struct dive *dive, duration_t t0, duration_t t1, depth_t d0, depth_t d1, const struct gasmix *gasmix, o2pressure_t po2)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	uint32_t j;
 | 
						int32_t j;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (j = t0.seconds; j < t1.seconds; j++) {
 | 
						for (j = t0.seconds; j < t1.seconds; j++) {
 | 
				
			||||||
		int depth = interpolate(d0.mm, d1.mm, j - t0.seconds, t1.seconds - t0.seconds);
 | 
							int depth = interpolate(d0.mm, d1.mm, j - t0.seconds, t1.seconds - t0.seconds);
 | 
				
			||||||
| 
						 | 
					@ -287,7 +287,7 @@ static void create_dive_from_plan(struct diveplan *diveplan, struct dive *dive,
 | 
				
			||||||
		free(ev);
 | 
							free(ev);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	dp = diveplan->dp;
 | 
						dp = diveplan->dp;
 | 
				
			||||||
	/* Create first sample at time = 0, not based on dp because 
 | 
						/* Create first sample at time = 0, not based on dp because
 | 
				
			||||||
	 * there is no real dp for time = 0, set first cylinder to 0
 | 
						 * there is no real dp for time = 0, set first cylinder to 0
 | 
				
			||||||
	 * O2 setpoint for this sample will be filled later from next dp */
 | 
						 * O2 setpoint for this sample will be filled later from next dp */
 | 
				
			||||||
	cyl = &dive->cylinder[0];
 | 
						cyl = &dive->cylinder[0];
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -48,7 +48,7 @@ static void process_temperatures(struct dive *dp, stats_t *stats)
 | 
				
			||||||
static void process_dive(struct dive *dp, stats_t *stats)
 | 
					static void process_dive(struct dive *dp, stats_t *stats)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int old_tadt, sac_time = 0;
 | 
						int old_tadt, sac_time = 0;
 | 
				
			||||||
	uint32_t duration = dp->duration.seconds;
 | 
						int32_t duration = dp->duration.seconds;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	old_tadt = stats->total_average_depth_time.seconds;
 | 
						old_tadt = stats->total_average_depth_time.seconds;
 | 
				
			||||||
	stats->total_time.seconds += duration;
 | 
						stats->total_time.seconds += duration;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue