The unified diff between revisions [bfc9e27f..] and [dc88787e..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'mpl3115a2.c'
# # old_revision [bfc9e27f5c40da31ae4269394aaf0545e5856a70] # new_revision [dc88787ecd1d574feba045763baed2a7651ff33d] # # patch "mpl3115a2.c" # from [90f8abeb4b24de7e944a17b3fe9ab3fecc9a5881] # to [fa80680fbf46ec97186e824189f9bb0f6e4c12d7] # ============================================================ --- mpl3115a2.c 90f8abeb4b24de7e944a17b3fe9ab3fecc9a5881 +++ mpl3115a2.c fa80680fbf46ec97186e824189f9bb0f6e4c12d7 @@ -55,23 +55,12 @@ bool mpl3115a2_init(void) mpl3115a2_state = 0; return TRUE; - -#if 0 - if (!i2c_start_transaction(&mpl3115a2_init_transaction)) - return FALSE; - while (i2c_busy()) ; - - - return (mpl3115a2_result == I2C_SUCCESS); -#endif } bool mpl3115a2_start_sample(void) { mpl3115a2_state = !mpl3115a2_state; - putstr("X"); - if (mpl3115a2_state) return i2c_start_transaction(&mpl3115a2_start_transaction); else @@ -80,16 +69,6 @@ void mpl3115a2_event_handler(void) void mpl3115a2_event_handler(void) { -#if 0 - signed short int xi, yi, zi; - signed short int tempi; - signed short int rolli, pitchi, yawi; - - float x, y, z; - float temp; - float roll, pitch, yaw; -#endif - if (mpl3115a2_result != I2C_SUCCESS) return; @@ -101,32 +80,7 @@ void mpl3115a2_event_handler(void) if (mpl3115a2_state) return; -#if 0 - xi = (mpl3115a2_sample_data[0] << 8) + mpl3115a2_sample_data[1]; - yi = (mpl3115a2_sample_data[2] << 8) + mpl3115a2_sample_data[3]; - zi = (mpl3115a2_sample_data[4] << 8) + mpl3115a2_sample_data[5]; - - tempi = (mpl3115a2_sample_data[6] << 8) + mpl3115a2_sample_data[7]; - - rolli = (mpl3115a2_sample_data[ 8] << 8)+mpl3115a2_sample_data[ 9]; - pitchi = (mpl3115a2_sample_data[10] << 8)+mpl3115a2_sample_data[11]; - yawi = (mpl3115a2_sample_data[12] << 8)+mpl3115a2_sample_data[13]; - - sensors_write_gyro_data(roll, pitch, yaw); - sensors_write_accel_data(x, y, z); - sensors_write_temp_data(temp); - -#endif - log_put_uint(LOG_SIGNATURE_ALTIMETER); log_put_array((char *)mpl3115a2_sample_data, 5); - putstr("Y"); - -#if 0 - puthex(mpl3115a2_sample_data[0]); - puthex(mpl3115a2_sample_data[1]); - puthex(mpl3115a2_sample_data[2]); - putstr("\n"); -#endif }