ARMmbed / mbed-semtech-lora-rf-drivers

Semtech's LoRa RF drivers for mbed OS
Other
32 stars 25 forks source link

Incorrect Time Units for set_tx_continuous_wave #25

Closed mattbrown015 closed 6 years ago

mattbrown015 commented 6 years ago

Description

set_tx_continuous_wave includes a parameter for specifying how long the continuous wave will last. As far as I can tell the units of this parameter are milliseconds but the documentation says 's'.

/** Sets the radio in continuous wave transmission mode
 *
 *  @param freq          Channel RF frequency
 *  @param power         Sets the output power [dBm]
 *  @param time          Transmission mode timeout [s]
 */
virtual void set_tx_continuous_wave(uint32_t freq, int8_t power, uint16_t time);

Possibly more controversially I think the type is wrong and the time should be a uint32_t to reflect the fact that the units are ms.

Currently the maximum time for the Tx continuous wave is only just over a minute; not very continuous. Is this really 'by design'?

There's a vaguely related API documentation typo for set_tx_config. The documentation says timeout Transmission timeout [us] but I think this timeout is milliseconds i.e. [ms].

SHA 5532d9d

Issue request type

[ ] Question [ ] Enhancement [X] Bug

ciarmcom commented 6 years ago

ARM Internal Ref: IOTCELL-1168

kivaisan commented 6 years ago

@mattbrown015 thanks for the report.

Yes, documentation for set_tx_config is wrong. Resolution should be [ms].

set_tx_continuous_wave time value should be in seconds, so it's correct, but the value is used incorrectly inside the mehtods (both 1272 and 1276 drivers).

hasnainvirk commented 6 years ago

@mattbrown015 Please check the PR opened. https://github.com/ARMmbed/mbed-semtech-lora-rf-drivers/pull/26