Kor MYS time

This commit is contained in:
2021-01-23 13:48:46 +03:00
parent 9ddf7b2bee
commit 0d4d98954b

View File

@@ -2,7 +2,8 @@
#define MY_DEBUG
#define MY_RADIO_RF24
#define MY_RF24_CHANNEL (105)
#define MY_RF24_PA_LEVEL RF24_PA_HIGH
#define MY_RF24_PA_LEVEL RF24_PA_MAX
#define MY_REPEATER_FEATURE
#if F_CPU == 8000000L
#define MY_BAUD_RATE 38400
#endif
@@ -226,7 +227,8 @@ void sendData(MyMessage msg, bool status)
while(send_data == false){
count++;
send_data = send(msg.set(status));
wait(1000, C_SET, msg.type);
if(!send_data)
wait(1000, C_SET, msg.type);
if ((count == 3)&&(send_data == 0)){ // Если сделано 3 попытки и нет подтверждения отправки
count = 0; // Обнуляем счётчик
send_data = true; // Выходим из цикла
@@ -240,7 +242,8 @@ void sendData(MyMessage msg, float status)
while(send_data == false){
count++;
send_data = send(msg.set(status, 1));
wait(1000, C_SET, msg.type);
if(!send_data)
wait(1000, C_SET, msg.type);
if ((count == 3 )&&(send_data == 0)){ // Если сделано 3 попытки и нет подтверждения отправки
count = 0; // Обнуляем счётчик
send_data = 1; // Выходим из цикла
@@ -254,7 +257,8 @@ void sendData(MyMessage msg, int status)
while(send_data == false){
count++;
send_data = send(msg.set(status));
wait(1000, C_SET, msg.type);
if(!send_data)
wait(1000, C_SET, msg.type);
if ((count == 3 )&&(send_data == 0)){ // Если сделано 3 попытки и нет подтверждения отправки
count = 0; // Обнуляем счётчик
send_data = 1; // Выходим из цикла