[IN PROGRESS] Features - 2g data GET request #13
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.
Don't merge yet because there is a bug documented below
There is a bug that occurs when you end a script and then try running it again. You get the following stack trace.
To re-create do the following:
I think this is happening because we are doing something wrong with the init or termination commands. @johnnyman727, could a state or command remain lingering on the chip between power cycles? Otherwise this is likely do the network not being discovered in time.
requestGET(webAddress, callback)
This PR introduces data support to the GRPS module. It adds a method,
#requestGET(webAddress, callback)
, that will perform a simple GET request to a given web address. The callback will return with any errors if the GET request fails.For example:
new CommandChain()
This PR also introduces a helper method for generating command chains. Previously you needed to create three separate arrays, for example:
This was cumbersome in that it required updating three arrays to add or remove commands. Now you can keep the command, patience, and reply together in one object. For example:
You can then get arrays from the command chain using the following methods: