Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/clunet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey V. DUDANOV <sergey.dudanov@gmail.com>2016-07-08 12:21:50 +0300
committerGitHub <noreply@github.com>2016-07-08 12:21:50 +0300
commit7ab5dbce5a4fac0af6c106fe379a5909028f664e (patch)
tree03260f9f02744b44339f623ef7d313e060f92e52
parentacfb9ea5373bb5fa7970b4921d87c47fb24ec978 (diff)
Update clunet.c
-rw-r--r--clunet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/clunet.c b/clunet.c
index 8576277..94765eb 100644
--- a/clunet.c
+++ b/clunet.c
@@ -188,7 +188,8 @@ clunet_send(const uint8_t address, const uint8_t prio, const uint8_t command, co
}
/* Заполняем переменные */
- clunetCurrentPrio = (!prio) ? 1 : (prio > 4) ? 4 : prio; // Ограничим приоритет диапазоном (1 ; 4)
+ if (prio)
+ clunetCurrentPrio = (prio > 4) ? 4 : prio ? : 1; // Ограничим приоритет диапазоном (1 ; 4)
dataToSend[CLUNET_OFFSET_SRC_ADDRESS] = CLUNET_DEVICE_ID;
dataToSend[CLUNET_OFFSET_DST_ADDRESS] = address;
dataToSend[CLUNET_OFFSET_COMMAND] = command;