diff --git a/src/energenie/radio.py b/src/energenie/radio.py index 45589ce..107a5f8 100644 --- a/src/energenie/radio.py +++ b/src/energenie/radio.py @@ -386,7 +386,7 @@ def transmit(payload): """Transmit a single payload using the present modulation scheme""" if not modulation_fsk: - HRF_send_OOK_payload_repeat(payload, times=4) + HRF_send_OOK_payload_repeat(payload, times=8) else: HRF_send_payload(payload) diff --git a/src/legacy.py b/src/legacy.py index 182ed5d..96fb9a7 100644 --- a/src/legacy.py +++ b/src/legacy.py @@ -59,16 +59,21 @@ print("Press the LEARN button on any switch %d for 5 secs until LED flashes" % switch_no) raw_input("press ENTER when LED is flashing") - radio.transmit(OFF_MSGS[switch_no]) + for i in range(8): + print("ON") + radio.transmit(ON_MSGS[switch_no]) + time.sleep(1) print("Device should now be programmed") print("Testing....") for i in range(4): time.sleep(1) - radio.transmit(ON_MSGS[switch_no]) - time.sleep(1) + print("OFF") radio.transmit(OFF_MSGS[switch_no]) + time.sleep(1) + print("ON") + radio.transmit(ON_MSGS[switch_no]) print("Test completed")