void stop_state() { soft_stop_motors(50); while(state == STOP) { float angle = gyro_get_degrees(); printf("\n%f", angle); pause(50); stop_filter(); } }
void mid_kvdb_filter_free(adv_demux_filter_t *f_filter) { // mid_kvdb_lock(); adv_demux_filter_t *m_filter = f_filter; MT_ASSERT(m_filter != NULL); stop_filter(m_filter); if(m_filter->p_buffer) { mtos_free(m_filter->p_buffer); } memset(m_filter, 0x0, sizeof(adv_demux_filter_t)); // mid_kvdb_unlock(); }
void set_filter(adv_demux_filter_t * filter, dmx_filter_setting_t * p_param, notify_call_back notify) { RET_CODE ret; adv_demux_filter_t * p_filter = NULL; // mid_kvdb_lock(); p_filter = filter; MT_ASSERT(p_filter != NULL); stop_filter(p_filter); KVDB_DRV_DEBUG("set filter_handle_id = 0x%x \n", p_filter->chanid); ret = dmx_si_chan_set_filter(p_ipannel_demux,p_filter->chanid, p_param); MT_ASSERT(ret == SUCCESS); p_filter->notify = notify; // mid_kvdb_unlock(); }