-
Notifications
You must be signed in to change notification settings - Fork 9
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
Updated from ArduinoJson 5 to latest. #278
Conversation
Serial.print("Adding SSID: "); | ||
Serial.print(ssid); | ||
Serial.print(ssid); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solution to "null" being returned instead of empty string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there a reason why we have a if
block instead of using the |
(OR) operation as indicated in the example? (also used in the existing code)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When config.txt is parsed, missing values are stored as a string "null" rather than an actual null value. To get around this, an if statement is used to set "null" strings to "". I didn't check what was returned before the update but the string "null" began to appear after updating to the latest version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the "if" block. Looked a bit redundant. Instead, now we use the "OR" functionality as demonstrated in the example https://arduinojson.org/v6/api/jsonvariant/or/
Review 01Pretty straight forward. Please see my comments below (some process changes, some code changes and comments on testing results).
Some notes about PR organization:
I have not personally run the code yet. I will wait to test it after you make the changes (at least till you bump the firmware version). Also, please feel free to add/update examples to any docs you may have referenced to create this PR. For example, adding an example about how to change the firmware version in the Review complete. @JaeminBBQ |
Review Checklist
|
Changed implementation for handling non-existent field in config file. Link to comment: https://github.com/EmotiBit/EmotiBit_FeatherWing/pull/278/files#r1232736934 Tests run
|
@JaeminBBQ I made some minor changes in the code, take a look at this comment. Let merge to master. Remember to complete the FW merge checklist in the PR description ☝🏽 .Make sure to pull before you make the changes to avoid conflicts. |
Description
Updating the ArduinoJson library to the latest version and added free_memory() to display during bootup.
Requirements
Issues Referenced
Documentation update
Documentation should be changed under:
Keeping EmotiBit up-to date => Update firmware using Arduino IDE => Library List
where "ArduinoJson (version 5.13.5, not v6.x.x)" should be replaced with "ArduinoJson" since it is the latest version.
PR to documentation change.
Notes for Reviewer
The ArduinoJson Library must be updated to 6, the changes will not work with version 5.
The free memory function was added to the function where emotibit data is displayed. This was only added in the case a featherwing m0 is used.
Testing
Results
Test to make sure config.txt file is still being parsed as expected.
Test to make sure the
info.json
file created when a recording is started is the same as the one created with the currect release.The library update reduces the memory used by the EmotiBit which was checked using the free memory function as seen here.
Feature Tests
Add the test heading from "EmotiBit Feature Test Protocol" here.
Steps to test
Import the steps from the
EmotiBit Feature Test Protocol
for quick access for the reviewerShared files
Firmware binary: 1.8.1.fix-JsonLibUpdate.1.zip
Other files.
Checklist to allow merge
master
ofxEmotiBitVersion.h
DIGITAL_WRITE_DEBUG
= false (if set true while testing)