STM32CubeWL icon indicating copy to clipboard operation
STM32CubeWL copied to clipboard

[LoRaMac]Optimize code reading and execution conditions and Add functions for use by the outer layer

Open wdfk-prog opened this issue 1 year ago • 5 comments

LoRaMacGetMaxPayloadLength

  • This function is provided for external use to obtain the maximum payload and can be used by the program to determine the number of bytes to send

LoRaMacSendInfoGet && LoRaMacSendInfoClear

  • In the application, the current used power and the remaining power are obtained by calculation. So it is necessary to know the number of lora packets and the time in the air

wdfk-prog avatar May 07 '24 02:05 wdfk-prog

Hello @wdfk-prog,

Please can you give some details about your pull request.

Regards,

RJMSTM avatar May 08 '24 15:05 RJMSTM

Hello @wdfk-prog,

Please can you give some details about your pull request.

Regards,

As I read through the code, I noticed that it could be optimized; No further details could be provided

image

wdfk-prog avatar May 09 '24 01:05 wdfk-prog

ST Internal Reference: 180991

RJMSTM avatar May 09 '24 08:05 RJMSTM

Hello,

I forwarded your proposal to development team.

Regards,

RJMSTM avatar May 09 '24 08:05 RJMSTM

Hello,

I forwarded your proposal to development team.

Regards,

I have updated some code, please check it out

wdfk-prog avatar May 10 '24 03:05 wdfk-prog

Hello @wdfk-prog,

Thanks for your contribution, With the proposed change, LORAMAC_EVENT_INFO_STATUS_OK would only be set if MacCtx.NodeAckRequested is false AND the device is not in class C. The existing implementation, however, also sets LORAMAC_EVENT_INFO_STATUS_OK if MacCtx.NodeAckRequested is false AND the device is in class C.

This modification would alter the execution flow; therefore, it cannot be accepted.

Regards,

RJMSTM avatar Aug 15 '24 09:08 RJMSTM