mirror of
https://gitea.ecohim.ru:3000/RS485_Relay/RS485_Relay2_fw.git
synced 2025-08-07 16:20:30 +03:00
Smooth LED lights level change
This commit is contained in:
@@ -15,7 +15,7 @@ uint8_t recv_buffer[BUFFERS_SIZE];
|
||||
uint8_t send_buffer[BUFFERS_SIZE];
|
||||
|
||||
uint16_t bytes_to_send = 0;
|
||||
uint16_t last_rx_time = 0xFFFF;
|
||||
//uint16_t last_rx_time = 0xFFFF;
|
||||
enum recv_state cmd_receiving = RECV_IDLE;
|
||||
enum send_state cmd_sending = SEND_IDLE;
|
||||
uint16_t tranfer_errors_count;
|
||||
@@ -79,14 +79,7 @@ void modbus_loop_iterate()
|
||||
{
|
||||
if (cmd_receiving == RECV_ERROR)
|
||||
{
|
||||
// poor man's way to synchronize packets
|
||||
//if(last_rx_time>=BUS_IDLE_TIME)
|
||||
//{
|
||||
cmd_receiving = RECV_IDLE;
|
||||
//TXEN_485 = 1;
|
||||
//delay_us(10);
|
||||
//TXEN_485 = 0;
|
||||
//}
|
||||
cmd_receiving = RECV_IDLE;
|
||||
}
|
||||
if (cmd_receiving == RECV_IDLE)
|
||||
{
|
||||
|
Reference in New Issue
Block a user