void ins_event_task( void ) { if (spi_message_received) { spi_message_received = FALSE; parse_ins_msg(); //uint8_t s = 4+VN100_REG_QMR_SIZE; //DOWNLINK_SEND_DEBUG(DefaultChannel,s,spi_buffer_input); } }
void vn100_event_task(void) { if (vn100_trans.status == SPITransSuccess) { parse_ins_msg(); #ifndef INS_VN100_READ_ONLY // Update estimator // FIXME Use a proper rotation matrix here struct FloatEulers att = { ins_eulers.phi - ins_roll_neutral, ins_eulers.theta - ins_pitch_neutral, ins_eulers.psi }; stateSetNedToBodyEulers_f(&att); stateSetBodyRates_f(&ins_rates); #endif //uint8_t s = 4+VN100_REG_QMR_SIZE; //DOWNLINK_SEND_DEBUG(DefaultChannel, DefaultDevice,s,spi_buffer_input); vn100_trans.status = SPITransDone; } if (vn100_trans.status == SPITransFailed) { vn100_trans.status = SPITransDone; // FIXME retry config if not done ? } }