 	mag.getHeading(&sensors.mx, &sensors.my, &sensors.mz);
 }
 
-void get_temperature_pressure(int8_t step) 
-{
-	switch (step){
+void get_temperature_pressure() 
+{
+	switch (sensors.update_temperature_pressure_step){
 		case SENSOR_REQ_TEMP:
 			barometer.setControl(BMP085_MODE_TEMPERATURE);
 			os_timer_disarm(&timer_update_temperature_pressure_steps);
-			os_timer_setfn(&timer_update_temperature_pressure_steps, (os_timer_func_t *)update_temperature_pressure_cb, (void *)0);
+			os_timer_setfn(&timer_update_temperature_pressure_steps, (os_timer_func_t *)update_temperature_pressure_step_cb, (void *)0);
 			os_timer_arm(&timer_update_temperature_pressure_steps, barometer.getMeasureDelayMilliseconds(), false);
 			break;
 

		get_mag();
		sensors.changed_accel_gyro_mag = true;
	}
	if (sensors.do_update_temperature_pressure) {
		sensors.do_update_temperature_pressure = false;
		sensors.update_temperature_pressure_step = 1;
		get_temperature_pressure(sensors.update_temperature_pressure_step);
	} else if (sensors.do_update_temperature_pressure_step) {
		sensors.do_update_temperature_pressure_step = false;
		sensors.update_temperature_pressure_step++;
		get_temperature_pressure(sensors.update_temperature_pressure_step);
	}
	if (sensors.update_temperature_pressure_step == SENSOR_DONE){
		sensors.update_temperature_pressure_step = SENSOR_TEMP_PAUSED;
		sensors.changed_temperatur_pressure = true;
	}
}

	initialize_barometer();
	initialize_rotary_encoder();

	sensors.update_temperature_pressure_step = SENSOR_PAUSED;
	sensors.do_update_temperature_pressure_step = false;
	setup_update_temperature_pressure_timer();
	setup_update_accel_gyro_mag_timer();
	setup_update_display_timer();
}

void loop() {
