lpcmanager
Clone
Summary
Browse
Changes
Graph
Fixed Buzzer POU - was missing inhibit on TRIG when ACK was just rising, in case input value was changing too fast.
2019-03-27, Edouard Tisserant
ac9420feb6ab
Fixed Buzzer POU - was missing inhibit on TRIG when ACK was just rising, in case input value was changing too fast.
if(!pthread_mutex_lock(&UART_ReadMutex)){
int prevstate;
if((prevstate=uartDevReadBuf_plc_state) == FULL){
uartDevReadBuf_plc_state = LOCKED;
}
pthread_mutex_unlock(&UART_ReadMutex);
if(prevstate == FULL){
%(retrieve_code)s
/* unlock plc buffer */
uartDevReadBuf_plc_state = EMPTY;
}else{
/* No new data -> no update */
}
}