Добавлен ForceDisconnect
This commit is contained in:
		
							parent
							
								
									1c5ce14f0f
								
							
						
					
					
						commit
						6392d35129
					
				@ -32,7 +32,7 @@ void WriteFromSFunc(real_T* disc)
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    disc[2 * PORT_WIDTH + 0] = phase_A.ctrl.angle.delay_us;
 | 
					    disc[2 * PORT_WIDTH + 0] = phase_A.ctrl.angle.delay_us;
 | 
				
			||||||
    disc[2 * PORT_WIDTH + 1] = (uint16_t)((uint16_t)TIMER->CNT - phase_A.ctrl.angle.start_delay_tick);
 | 
					    disc[2 * PORT_WIDTH + 1] = ((uint16_t)TIMER->CNT - phase_A.ctrl.angle.start_delay_tick);
 | 
				
			||||||
    disc[2 * PORT_WIDTH + 2] = phase_A.ctrl.angle.start_delay_tick;
 | 
					    disc[2 * PORT_WIDTH + 2] = phase_A.ctrl.angle.start_delay_tick;
 | 
				
			||||||
    disc[2 * PORT_WIDTH + 3] = TIMER->CNT;
 | 
					    disc[2 * PORT_WIDTH + 3] = TIMER->CNT;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -61,9 +61,12 @@ void ReadToSFunc(real_T* in)
 | 
				
			|||||||
    detect_front(5, Upp.ForceStop, 1);
 | 
					    detect_front(5, Upp.ForceStop, 1);
 | 
				
			||||||
    detect_rise(5, Upp.ForceStop, 0);
 | 
					    detect_rise(5, Upp.ForceStop, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    detect_front(6, Upp.ForceDisconnect, 1);
 | 
				
			||||||
 | 
					    detect_rise(6, Upp.ForceDisconnect, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Upp.sine_freq = in[6];
 | 
					
 | 
				
			||||||
    Upp.Duration = in[7];
 | 
					    Upp.sine_freq = in[7];
 | 
				
			||||||
 | 
					    Upp.Duration = in[8];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (int i = 0; i < IN_PORT_WIDTH; i++)
 | 
					    for (int i = 0; i < IN_PORT_WIDTH; i++)
 | 
				
			||||||
 | 
				
			|||||||
@ -56,7 +56,7 @@
 | 
				
			|||||||
#define PORT_NUMB                       3           ///< amount of ports
 | 
					#define PORT_NUMB                       3           ///< amount of ports
 | 
				
			||||||
// Parameters of S_Function
 | 
					// Parameters of S_Function
 | 
				
			||||||
#define NPARAMS                 1                           ///< number of input parametrs (only Ts)
 | 
					#define NPARAMS                 1                           ///< number of input parametrs (only Ts)
 | 
				
			||||||
#define IN_PORT_WIDTH           (8)                         ///< width of input ports
 | 
					#define IN_PORT_WIDTH           (9)                         ///< width of input ports
 | 
				
			||||||
#define IN_PORT_NUMB            1                           ///< number of input ports
 | 
					#define IN_PORT_NUMB            1                           ///< number of input ports
 | 
				
			||||||
#define OUT_PORT_WIDTH          PORT_WIDTH                  ///< width of output ports
 | 
					#define OUT_PORT_WIDTH          PORT_WIDTH                  ///< width of output ports
 | 
				
			||||||
#define OUT_PORT_NUMB           PORT_NUMB                   ///< number of output ports
 | 
					#define OUT_PORT_NUMB           PORT_NUMB                   ///< number of output ports
 | 
				
			||||||
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user