From f3e4951521afd5f06524f2f155bc0956e6126579 Mon Sep 17 00:00:00 2001 From: midelic Date: Tue, 16 Aug 2016 19:48:13 +0300 Subject: [PATCH] change power on the fly --- Multiprotocol/A7105_SPI.ino | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Multiprotocol/A7105_SPI.ino b/Multiprotocol/A7105_SPI.ino index 9f9eb9d..418da70 100644 --- a/Multiprotocol/A7105_SPI.ino +++ b/Multiprotocol/A7105_SPI.ino @@ -137,7 +137,11 @@ void A7105_SetPower() power=IS_POWER_FLAG_on?A7105_HIGH_POWER:A7105_LOW_POWER; if(IS_RANGE_FLAG_on) power=A7105_RANGE_POWER; - A7105_WriteReg(0x28, power); + if(prev_power != power) + { + A7105_WriteReg(0x28, power); + prev_power=power; + } } void A7105_Strobe(uint8_t address) {