[all] RSSI should be 0 when NO DATA

This commit is contained in:
bsongis@gmail.com
2013-05-29 15:43:21 +00:00
parent 3a8220a4bb
commit 61b8f4b4e4
+8 -6
View File
@@ -804,13 +804,15 @@ void FRSKY_Init(void)
void FrskyValueWithMin::set(uint8_t value)
{
if (this->value == 0)
if (this->value == 0) {
this->value = value;
sum += value;
if (link_counter == 0) {
this->value = sum / 8;
sum = 0;
}
else {
sum += value;
if (link_counter == 0) {
this->value = sum / 8;
sum = 0;
}
}
if (value && (!min || value < min))