whaleygeek / pyenergenie

A python interface to the Energenie line of products
MIT License
81 stars 51 forks source link

Resolve discrepancies with radio.transmit and radio.send_payload #36

Closed whaleygeek closed 8 years ago

whaleygeek commented 8 years ago

send_payload() transmits the payload assuming the radio is preconfigured in transmit mode. transmit() is designed to sequence into transmit, send the payload, then sequence back to standby.

However, this is not quite working as expected and causes additional configuration messages and state changes, so I've parked this at the moment. But ultimately I want radio.transmit() to be the API that apps use (sequence into transmit mode, send payloads, sequence into standby).

Note however that it might be nice to have a push/pop state architecture, so that when you ask for a transmit, if you are already in receive, it changes to transmit, sends payloads, then pop's back into receive, so that we get back into receive mode as quickly as possible (and don't miss any receive packets).

whaleygeek commented 8 years ago

This is fixed in feature branch long-tx

Just waiting for me to finish some other stuff and merge back to master before closing.

whaleygeek commented 8 years ago

Tested, long-tx branch merged, closing