pycom / pycom-documentation

Pycom Official Documentation for WiPy 2.0, Wipy 3.0 LoPy, Lopy4, SiPy, FiPy, GPy, etc.
https://docs.pycom.io
36 stars 81 forks source link

coding_rate response values seem to be wrong. #5

Closed tw-maelstrom closed 6 years ago

tw-maelstrom commented 7 years ago

While trouble shooting an issue with my LoPy it looks I uncovered a discrepancy between docs and implementation for coding_rate.

modlora.c shows:

typedef enum {
    E_LORA_CODING_4_5 = 1,
    E_LORA_CODING_4_6 = 2,
    E_LORA_CODING_4_7 = 3,
    E_LORA_CODING_4_8 = 4
} lora_coding_rate_t;

While docs indicate:

lora.coding_rate([coding_rate]) Get or set the coding rate in raw LoRa mode (LoRa.LORA). The allowed values are: LoRa.CODING_4_5 (0), LoRa.CODING_4_6 (1), LoRa.CODING_4_7 (2) and LoRa.CODING_4_8 (3).

I think this is just a documentation issue as setting the coding rate to 0 on the sx1272 would put it in FSK mode.

ep1cman commented 6 years ago

Fixed by d1c24a005caf8db84a147edbdb5ff23c1d795408