fix(examples): Modified code to led turn on/off properly (IDFGH-16294) #17445
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Congrats for the great work, big fan here !
I was studying with the Bluetooth examples, and notice that this script was suppose to check if was written on an specific GATT attribute the value ON or OFF, and turn on/ off the led, but the code was only checking if was written any value on the attribute and the OFF wasn't working. I corrected the main/main.c file and it worked, but I notice too that when the device starts, starts with the led GREEN, but when you write the attribute to turn OFF, them ON, the device turn ON in a white color led, so I changed the main/src/led.c file too, to make it turn GREEN when you apply the command, the same color as when the device starts.
Related
Testing
Build on idf.py, flashed and tested on esp32c6
Checklist
Before submitting a Pull Request, please ensure the following: