Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Battery Status callback #41

Merged
merged 1 commit into from
Sep 9, 2024
Merged

Conversation

rickhewes
Copy link

@rickhewes rickhewes commented Apr 17, 2024

Add Battery Status callback

Summary

This PR implements the following feature

  • Battery Status callback on DevStatusReq

Adds the ability to change the Battery Status byte when a DevStatusReq is made from the gateway

Validation


uint8_t battery_level_callback()
{
  return random(0, 256);  
}

void setup()
{
   modem.begin(EU868);
   modem.setBatteryLevelCallback(battery_level_callback);
    ...
    ...
}

@fpistm fpistm added the enhancement New feature or request label Sep 3, 2024
@fpistm fpistm added this to the 0.2.1/0.3.0 milestone Sep 3, 2024
Copy link
Member

@fpistm fpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks for the PR.

@fpistm fpistm merged commit 32b7e3d into stm32duino:main Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

2 participants